Different apps using same database

0
Hello Everyone! I will appreciate if anyone can share their experience of 2 (or more) mendix apps using same database. Our environment is on-premise application using Sql server as database. If it’s possible, wondering how database synchronization would work. Also, is it possible to share common modules (for e.g. MxModelReflection) between them. Because if the common modules can’t be shared then the mendix app. or database could break depending on different module configurations on different mendix applications.
asked
3 answers
5

It is a great idea and possible at platforms equipped with the right tools for it. For instance SAP does some sort of that thing, having a database-server for read-write and different application-servers (covering different fields of functionality) talking to the database-server.

To my knowledge Mendix does not offer this option. The MBS is just not equipped with the tools for it, but I would love to get surprised.

With Mendix the closest thing to this is creating on application (databaseApp) that holds the domain model and have your other application-apps hovering around it interfacing with the databaseApp, read from and writing to it and not having any generic data themselves.

These application-apps can also use the common modules you mentioned, like MxModelReflection, but also other generic modules: one for logging, one for queueing, one for communication (mail, sms,...) etcetera. Never let the users log on to the databaseApp.

Make them have the same look by letting them only use UI-items from a general module like Atlas_UI_Resources.

To top it all off, you want to use Single Sign On to enable your users to jump from one applicationApp to the other, without them even noticing.

Your rewards will be that you end up with a landscape full of microservices that are very maintainable and once you have this setup, you can reuse this setup at any customer.

answered
1

I have never done this, so I can’t share my experience with you. But to me, it does not seem to be a good Idea. What is the use case? Why is there the need to do something like this? Maybe there is a better solution?

If you need to share data between two applications, interfaces seem to be the best practice. But without knowing the usecase, it will be hard to tell what to do.

answered
1

We have two applications using the same database. The second one is executing load-heavy tasks, to keep performance of the other one (where all our users are) up to par. Both have the same deployment package.

One thing to keep in mind is to ALWAYS stop both applications before an update / patch. Update and start one and wait for it to apply all database changes and only when it's fully started, update and start the other one.

answered