I believe the generally accepted approach for this would be an event based system for handling the updates. Lets say you had a server side object like:
SimObject implements ManagedObject, SimEventListener
{
private HashMap values;
public String getValue(String name){...}
public void setValue(String name, String value){
//setting values here would generate SimEvents and update the server side model
}
public void event(ClientSimEvent e)
{
// changes to the client proxy would get sent here, where the model
// object in the simulation would get updated if the server decides it is ok, and fire off an update to the client proxy
}
}
You might create a client side object that would be something like this
SimObjectProxy implements SimListener
{
private HashMap values;
public String getValue(String name){…}
public void setValue(String name, String value){
//This would generate an event to the server, the model would be updated there and
// the simulation would send the new value if things were ok
}
public void event(SimEvent e)
{
// This method receives events generated server side and updates your client proxy model
}
}
The idea is that the server would always validate changes to the simulation side, and that you have the ability to control the amount and priority of updates that the client receives. Ideally, the client object and the simulation object would implement the same interface.