Design Pattern – Move a single tenant tenant application to a multi-tenant web application

I have to move a single tenant web application to a multi tenant web application (around 100 tenants). Tenants will share the same application, but each tenant has its own database (tenant database). I have already planned to move the application cache to a shared distributed cache during the process to identify cache elements by adding a prefix (the tenant) -id) to the cache item keys (pattern with leading tenant).

The application also relies on RabitMQ to implement asynchronous processes. Actually, I don't have many queues, only a dozen and a few exchanges, but I expect the number of queues and exchanges to increase in the future.

Now I'm confused about the best architecture pattern for queues when I switch to multi-tenant architecture.


1) Multiple virtual hosts (one per tenant) with the same topology that was replicated per virtual host

2) Single virtual hoost with the same queues, exhanges and ecc shared by tenants.

The first choice seems to be more complicated because I should synchronize the topology for each virtual host (assuming 100 tenants mean 100 vhost). The second choice is the simpler one, which I only have to pass on in the context of each message sent. Queues the tenant ID so that the consumer knows who is the owner of the message and what to do with it.

I would know some opinions especially regarding the second choice as it seems more affordable to me.

pubsub – Publication of data change events by microservice compared to a separate application – Best Practice

Suppose there is a microservice with an HTTP API for CRUD operations in a database – nothing special, but there is a journal table with all changes that have been recorded for audit purposes.
Suppose there is also an event bus (Kafka in my case, but it could be anything) on ​​which data change events have to be published.

The journal table contains enough information to create all events.

The options on the table are:

  1. Microservice publishes its own events
  2. Another application publishes events based on querying the journal table

Both options guarantee that all events will be published (sometime) and have a similar performance and a similar, simple design complexity. Both approaches are 100% robust.

Things to consider that may or may not affect the answer:

  • The performance is similar and largely irrelevant anyway
  • Although the journal table is not expected to change, option 2 means that a third-party application is dependent on it, creating an API / SLA that is closely related to an implementation choice (using a table for the journal) and its schema ,
  • Option 2 requires DB connection data, network routing, security logoff, certificates, etc
  • Option 1 means that the microservice increases responsibility for the publication of events
  • Option 2 means that another application has to be created, deployed, operated and maintained
  • Both options work

Which is (closer to) best practice?

usa – US J1 Visa Extension – Did I skip the actual application form step …?

I am currently in the U.S. on a J1 program that is about to expire but has been properly expanded – DS-2019 and all. What is getting low is the current visa stamp in my passport. Since I will have to leave the country a few times in the future and therefore need a valid stamp, I will go home (Germany) in February to get it on the passport.

After completing the process to successfully book an interview, I only realized that I never actually had to submit a new one registration form (DS-160, I think?). The system only let me through based on my renewed DS 2019 data. Now I'm somehow used to it from other countries that a completely new application form is required to renew a visa, just like a new application. And I can't find any opposite statement on US visas.

So I wonder if I expect a completed DS-160 from me when I come to my interview. Or do they only use the saved information from the original application as well as the information about the extension J1 / new DS-2019? Could someone give advice here?

Paperwork – Visa application for Poland. Is an invitation letter required?

I would like to ask a question,

I do not have an invitation letter, only hotel reservation, itinerary, attached bank statements, ID cards, offer letters, cover letters and land, but I have a challenge, I do not have a visa invitation for Poland. Here is what I want to know. How do I proceed? Do I need a visa invitation letter to apply for a Schengen visa? I am from Nigeria.

Building a mobile JS application for indoor navigation without relying on GPS or other sensors

I want to build a SIMPLE mobile (Android + IOS) indoor navigation app that is used for navigation in complex buildings. The app would not use GPS or rely on sensors (mobile or external). Each level of the building would be represented with a 2D map (bird's eye view). The user would enter his starting point (point A) and the destination (point B). The app calculates the shortest route from A to B and displays it by drawing the line on the 2D map. I would first like to use HTML, CSS and JavaScript to create the web app, later I convert it to a mobile app. Please answer all questions and label the answers with numbers. Any help is greatly appreciated!

1) Can anyone give me advice on how to build such an application? For example programming examples, libraries, technologies, tutorials etc. I have no idea what to use and how to create the app.

As I understand it, this app should use:

2) 2D MAP of each level of the building (bird's eye view). Could someone recommend the software that I could use to create this type of card? I already have simple level plans (bird's eye view) of the building. Do I have to change images of the levels in software to make them usable in the application?

3) Mathematical algorithm to calculate the shortest part from A to B. Can anyone recommend the best mathematical algorithm for this type of app?

4) JavaScript graphics library to draw the shortest path on a 2D MAP from A to B. Can anyone recommend the best JavaScript library for this type of app?

Thanks in advance! John

Javascript – Because the error "SCRIPT1004: & # 39 ;; & # 39; is expected" generated when running the application in Internet Explorer?

The for..of is not supported by IE, I mean this:

for (let child of element.children){

The let is partially supported by IE11, set to:

for (var i = element.children.length - 1; i >= 0; i--) {

The loop must be backward because the index is "readjusted" each time an element is removed.

Take advantage and isolate the math operation from chaining by isolating with (...) = (element.offsetWidth / 2 - triangle.offsetWidth / 2) + "px"; = (element.offsetHeight / 2 - triangle.offsetHeight / 2) + "px";

It is good to be careful and isolate even when doing math operations, because then you will not be disturbed by the operators who have "priority".