Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Java Applications Replicating State

Tags:

java

jgroups

I have the same server side application running on multiple machines.

I would like to provide a way to push changes to all the applications. I'm more interested in state/property changes to the objects themselves, and not so much replication of files, etc.

So I'm envisioning an admin console, where I would change some property, and have the change affect each applications state.

I am currently looking into JGroups, which is a toolkit for reliable multicast communication. In this case, each application would listen in on the same multicast group, and the admin console would send changes to the group.

Are there any other solutions/techniques available?

like image 224
Steve Avatar asked Jun 12 '26 14:06

Steve


2 Answers

There exist alot of techniques, corba, rmi etc etc. However if you want a fully distributed system with no central server, I would personally recommend JGroups.

If you have a central server you can either

  • Let the server push the changes to all clients. The server must be aware of all clients, either directly or by having the clients register themselves.
  • Let clients poll the server.
like image 104
Johan Sjöberg Avatar answered Jun 15 '26 04:06

Johan Sjöberg


Other simple solutions might including, polling a central database or a central file.

A quick Google search turns up: http://www.hazelcast.com/product.jsp. Which looks promising but I have no experience with it.

like image 25
jzd Avatar answered Jun 15 '26 04:06

jzd