Dear Ice experts,
I've experimenting with replicated objects and the chat server code that appeared in Connection. What I tried to achieve is to replicate the UserManager object. Here is what I did in the IceGrid descriptor:
After depoyment there is a UserManager available on two nodes.Code:<replica-group id="UserManagers"> <load-balancing type="adaptive" load-sample="5" n-replicas="2"/> <object identity="UserManager" type="::Chat::UserManager"/> </replica-group>
Now, when I want to add a new User using the add() method I would like to add it on all nodes where UserManager is deployed to keep them in synch. I thought that I could use the IceGrid::Query interface and find all objects of type ::Chat::UserManager with findAllObjectsByType() but that call returns only one Proxy most probably using the load balancing strategy configured in the IceGrid descriptor.
So, on one hand it is very convenient to have the replicated objects for some operations like finding a user because then we don't care which UserManager object will handle the request but on the other hand for updating the UserManager replicated objects seems to be a problem because it is not possible to access the replicas separately.
Maybe this is not a problem and only due to my lack of knowledge but I would appreciate any advice on how to handle such case.
Thanks,
Istvan

Reply With Quote