Go Back   ZeroC Forums > Help Center

Reply
 
LinkBack Thread Tools Rate Thread Display Modes
  #1 (permalink)  
Old 08-18-2006
istvan istvan is offline
Registered User
 
Name: Istvan Buki
Organization: Fedex
Project: just experimenting
 
Join Date: Mar 2003
Location: Brussels, Belgium
Posts: 18
question about replicated objects

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:

Code:
  <replica-group id="UserManagers">
    <load-balancing type="adaptive" load-sample="5" n-replicas="2"/>
    <object identity="UserManager" type="::Chat::UserManager"/>
  </replica-group>
After depoyment there is a UserManager available on two nodes.
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
  #2 (permalink)  
Old 08-18-2006
matthew's Avatar
matthew matthew is online now
ZeroC Staff
 
Name: Matthew Newhook
Organization: ZeroC, Inc.
Project: Internet Communications Engine
 
Join Date: Feb 2003
Location: NL, Canada
Posts: 1,088
While this is a possible approach for replicating the user manager I don't think it is the best approach. As you say you would need to add all of the users to each user manager. Furthermore you would have to keep all of the users in sync somehow. That is quite a difficult problem.

I recommend reading issue 10 of the newsletter for an article on an alternative approach to solving this problem.
Reply With Quote
  #3 (permalink)  
Old 08-18-2006
istvan istvan is offline
Registered User
 
Name: Istvan Buki
Organization: Fedex
Project: just experimenting
 
Join Date: Mar 2003
Location: Brussels, Belgium
Posts: 18
Thanks for your reply Matthew,

unfortunately I think the UserRegistry solution is only displacing the problem I was trying to solve: avoiding single points of failure. If I replicate the registry I'll have the same problem I have with the replicated UserManager, isn't it?
Reply With Quote
  #4 (permalink)  
Old 08-18-2006
matthew's Avatar
matthew matthew is online now
ZeroC Staff
 
Name: Matthew Newhook
Organization: ZeroC, Inc.
Project: Internet Communications Engine
 
Join Date: Feb 2003
Location: NL, Canada
Posts: 1,088
Replicating the user registry is a much simpler task than replicating the user manager. If a single user manager fails some number of your users will lose the ability to login (until you fix whatever problem caused the failure). If this is acceptable then I would recommend the solution outlined in the article. If this is not acceptable, then you need to do full replication as you intend ... but this is a far from trivial problem.

I would also not recommend peer replication, but rather some sort of master-slave system. In this type of replication ONLY the master is always updated by the client. The master then sends updates to the slaves. If there is a failure of the slave, no problem -- the client doesn't talk with it and the master can re-sync when it comes back up. If there is a failure of the master the client can then fallback on the slave.

In this case then you have some choices -- for example, the slave now becomes the master and the master when it comes back becomes the slave. Another choice is that the slave does not accept any data updates, but only provides read-only access to its data.

Last edited by matthew : 08-18-2006 at 09:16 PM.
Reply With Quote
  #5 (permalink)  
Old 08-19-2006
istvan istvan is offline
Registered User
 
Name: Istvan Buki
Organization: Fedex
Project: just experimenting
 
Join Date: Mar 2003
Location: Brussels, Belgium
Posts: 18
Thank you for all your comments Matthew.
I'll experiment with the user registry to get a better feeling of what can be done before going for the more complicated solutions.
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
How can I get all Objects in evictor db? Yunqiao Yin Help Center 2 02-10-2006 04:21 AM
A problem about IceGrid's replicated servers rc_hz Help Center 3 05-30-2005 10:01 AM
Replicated Object Adapter vsonnathi Help Center 3 04-13-2005 04:30 PM
persistency and Ice objects nsns Help Center 3 07-19-2004 09:43 AM
Objects as argument ? ChMeessen Comments 2 09-18-2003 05:48 PM


All times are GMT -4. The time now is 11:42 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.0.0
(c) 2008 ZeroC, Inc.