[omniORB] Rollover to backup Naming Service

Bruce Fountain B_Fountain@motherwell.com.au
Tue, 17 Jul 2001 17:11:12 +0800


Arup Choudhury
> I am trying to build a fault tolerent system with active and 
> backup Naming
> service. So I am running two NamingService in two different 
> m/c but Naming
> services have exactly same content. Can anybody please 
> suggest me when the
> connection to the active connection fail how I can rollover 
> to secondary
> naming service

Hi Arup,

what I did in our system was to write a wrapper class which
contains the cached object reference and associated name. The
name is set on construction, but the reference is not resolved
until you want to use it. When you want to use the reference
it is retrieved and stored in the cache. The next time you
need it you use the cached reference.

All your wrapper objects register with a failover object. When
failover is detected an internal callback is made to all the
wrapper objects. These objects then clear their cache so that
the next time they are used the object reference will be
resolved from scratch using the new naming service.

I templatised the wrapper class so that it automatically
narrows to the appropriate interface and overloaded the ->
operator so that it can be used just like a normal object
reference.

Bruce Fountain
b_fountain@motherwell.com.au