Load Balancing and Fault Tolerance

All ORB NamingContexts implement two additional methods as specified by the IDL below:
/**
 * Extended Naming Context.
 */
interface NamingContext : ::CosNaming::NamingContextExt
{
    void add(in ::CosNaming::Name n, in Object obj) raises(
        NotFound, CannotProceed, InvalidName, AlreadyBound);

    void add_context(in ::CosNaming::Namen,
        in ::CosNaming::NamingContext nc) raises(NotFound,
           CannotProceed, InvalidName, AlreadyBound);
};

The add method is used to bind more than one object with a given name. That is, you can invoke the method multiple times and bind multiple objects with the same name to form an Object Group. When a NamingContext has no binding with the given name, add is equivalent to a bind.

The add_context method is used to bind more than one NamingContexts with a given name. That is, you can invoke the method multiple times and bind contexts with the same name to form a Context Group. When a NamingContext has no bindings with the given name, add_context is equivalent to a  bind_context.

When the client resolves a name, one of the objects with the given name is returned back providing load balancing and fault tolerance.

Object Group Example
In this example we will bind multiple objects to the same name in the namespace. Everytime the client resolves the name, it can potentially get a different object.

Copyright © 1998-2003, Novell, Inc. All rights reserved.