Question

I am creating a web application. Same application will run from different machine, but they will use common database. When application starts it will get all data from database. But when I update data from one application, how other running application will know that data has been updated, I want when I update database form any application, other running application will get notification immediately, and they should update their data.

One possible solution is I can take all applications URL in a list, then after updating value I will send request to all application, but how to do this using send Redirect. Is it correct way ? or is their any other easiest way to do this. Please help me.

Was it helpful?

Solution

Is it a requirement that data is loaded once on startup? If it's not than you can just read directly from the database with a low cache invalidation time.

In case your apps need to be synchronized "almost immediately" I would do it like this:

You can set up a messaging server which would create a JMS topic. All of the clients will listen to messages from that topic. When one of the apps update something in the DB it will send a message to the topic. The rest of the apps will get the message and update.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top