Results 1 to 5 of 5

Thread: question about replicated objects

  1. #1
    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

  2. #2
    matthew's Avatar
    matthew is offline ZeroC Staff
    Name: Matthew Newhook
    Organization: ZeroC, Inc.
    Project: Internet Communications Engine
    Join Date
    Feb 2003
    Location
    NL, Canada
    Posts
    1,458
    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.

  3. #3
    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?

  4. #4
    matthew's Avatar
    matthew is offline ZeroC Staff
    Name: Matthew Newhook
    Organization: ZeroC, Inc.
    Project: Internet Communications Engine
    Join Date
    Feb 2003
    Location
    NL, Canada
    Posts
    1,458
    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.

  5. #5
    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.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replicated admin interface to the registry
    By lafayej in forum Help Center
    Replies: 0
    Last Post: 01-22-2010, 05:51 AM
  2. Publishing to replicated IceStorms
    By bigtim in forum Help Center
    Replies: 4
    Last Post: 02-13-2008, 12:19 PM
  3. Replies: 1
    Last Post: 04-13-2007, 10:49 PM
  4. A problem about IceGrid's replicated servers
    By rc_hz in forum Help Center
    Replies: 3
    Last Post: 05-30-2005, 10:01 AM
  5. Replicated Object Adapter
    By vsonnathi in forum Help Center
    Replies: 3
    Last Post: 04-13-2005, 04:30 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •