Well there are a couple of different ways. 

First off if you only use a single server instead of a server cluster then 
you can create a singleton class that manages your simulations and clients 
that connect to your server can ask this singleton class about live 
information of a specific simulation that is currently running. Of course 
you could also save "snapshots" of your simulation data to a database and 
let the clients fetch these snapshots. But depending on the complexity of 
the simulation you may end up with a lot of database queries to save the 
snapshots. But maybe you want to snapshot anyways because you want to be 
able to resume the simulation if the server crashes or something like that.

If you have a server cluster things get a bit more complicated if you want 
live information without using simulation snapshots stored in a database. 
Because in that case you first have to identify the server on which the 
requested simulation runs and then find a way to communicate with that 
server to get live information. 
For a cluster setup something like Terracotta (terracotta.org) can also be 
interesting. It can create a JVM-level cluster which allows you to create 
objects that are shared/accessible by all JVMs in that cluster. Which 
instance should be shared can be defined in a configuration file. Take a 
look at http://video.google.com/videoplay?docid=7660457673499305140 to get 
an impression of what terracotta does.

-- J.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/-aYZOsYdJn4J.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

Reply via email to