I am building a client/server application that will have a fairly complex (but not large -say 10,00 objects) object model at its heart. Multiple clients will need to view the model (via an Eclipse RCP GUI), but the server will be the only node that can directly edit the model. I want edits to the model to be published out to the clients. New clients will be able to request the model, and register for updates.
Its a fairly standard Model-View-Controller pattern really.
Can anyone suggest good, Open Source, replicated cache solutions that will handle the distribution of my object model, plus distributing changes to the model. I want 'deltas' to be sent to the clients, rather than sending the complete model every time one field changes.
Also, I need to be able to replicate an object graph and maintain coherence, e.g., if I have a 'Person' object:
public class Person implements Serializable {
private Person manager;
private String name;
public Person (Person manager, String name) {
add three people to my cache:
Person boss = new Person(null,"TheBoss");
Person employee1 = new Person(boss,"employee 1");
Person employee2 = new Person(boss,"employee 2");
cache.put(new Element("boss",boss)
cache.put(new Element("employee1",employee1)
cache.put(new Element("employee2",employee2)
And then update 'boss's name:
boss.setName("TheBossXX");
cache.put(new Element("boss",boss)
I would expect the following code to return 'TheBossXX' on all nodes:
Person e1 = (Person) cache.get("employee1").getValue()
Person b1 = e1.getManager()
LOG.info(b1.getName());
In other words, I want my solution to know which objects reference each other and maintain those replationships on all nodes.
Interested to hear your suggestions.
Nick
I suggest Spring Web Flow.
Here is link to Spring Web Flow Demo