Archived
IceStorm Publisher Subscriber Architecture
As part of a course project, I must use IceStorm to exchange primitive informations (string) and Serialized Object (managed by Ice as string I guess), between a client, multiple servers, and meta-server (servers federation).
Each server must contain a list of Objects (excepted meta-server).
Client must be able to :
get an object by using his name (object’s string attribute).
add an object to the server who has the less object number or random choice if all servers have the same number….
remove an object from servers by using object's name string attribute
I must use IceStorm and avoid to use synchronous queries as much as possible
Servers must be discovered by meta-server automatically
Hot discover
Could you help me to find an architecture for the data exchange between components… ?
Client,Servers,meta-server coded in Java
I think do something like this :
- To get an object by name => Client send synchronous query to meta-server (specific method call with object name attribute in parameter). Then, meta-server publish message to servers, the server which have the object, send Serialized object to meta-server with sychronous query. Finaly, the meta-server reply to client in returning the Serialized object in the previously called function.
But I don't know if is a clean architecture and If its possible to send synchronous messages and have IceStorm mensenger on the same server....
For the rest I can't find a solution
Comments
-
Could you help please ?
0 -
I have find a good architecture, but I need to access servant attributes ( of com.zeroc.Ice.ObjectAdapter) after the add method invocation.
In fact, I need to know if I can
put
static volatile com.zeroc.Ice.Object object
in class attributethen instaniate the servant before do this (in main) :
adapter.add(object, com.zeroc.Ice.Util.stringToIdentity("clientmetaserveur"));
adapter.activate();
communicator.waitForShutdown();Finally, access to object (servant) attributes in a Thread while client modify them by calling interface methods....
Could you help ?
0