[omniORB] Immediate rope switch

Lazar Stricevic lucky at uns.ns.ac.yu
Fri Nov 30 19:29:12 GMT 2007


Hi everyone,

We are using omniORB in a client-server configuration, where both server 
and client have two network interfaces and are configured with two 
endpoints (one for each interface). The reason for this is fault 
tolerance: when connection is lost on one network connection (e.g. 
because of cable was disconnected).
Upon the loss of connection, current behavior of omniORB is to try to 
reestablish connection over the same "rope" i.e. network interface, to 
wait if reestablishment fails (to make sure that the connection is 
impossible over that interface), and only then switch the connection to 
the other "rope". This makes sense in regular non-real-time usage, but 
unfortunately that is not the case with our system.
We decided that the best for our system is to switch rope when it 
encounters problems in communication (transient exception), even if it 
is possible to continue to use current interface. The waiting proved to 
be too costly for us.
Desired behavior is achieved by changing the method notifyCommFailure() 
of the GIOP_C object (file 
omniORB-4.1.1/src/lib/omniORB/orbcore/GIOP_C.cc). The part which decides 
whether to check connection again over the same interface is commented 
out. Patch file is attached.

Is there any other, regular way to do this (without changing the code of 
omniORB)?

Best regards,
Lazar

-------------- next part --------------
diff -cr omniORB-4.1.1/src/lib/omniORB/orbcore/GIOP_C.cc src/lib/omniORB/orbcore/GIOP_C.cc
*** omniORB-4.1.1/src/lib/omniORB/orbcore/GIOP_C.cc	Tue Jul 18 18:21:22 2006
--- src/lib/omniORB/orbcore/GIOP_C.cc	Tue Jun 26 18:38:35 2007
***************
*** 289,295 ****
  
    OMNIORB_ASSERT(pd_calldescriptor);
  
!   if (pd_strand->first_use) {
      const giopAddress* firstaddr = pd_calldescriptor->firstAddressUsed();
      const giopAddress* currentaddr; 
  
--- 289,295 ----
  
    OMNIORB_ASSERT(pd_calldescriptor);
  
! //  if (pd_strand->first_use) {
      const giopAddress* firstaddr = pd_calldescriptor->firstAddressUsed();
      const giopAddress* currentaddr; 
  
***************
*** 303,314 ****
        currentaddr = pd_calldescriptor->currentAddress();
      }
  
!     if (pd_strand->orderly_closed) {
!       // Strand was closed before / during our request. Retry with the
!       // same address.
!       retry = 1;
!     }
!     else {
        currentaddr = pd_rope->notifyCommFailure(currentaddr,heldlock);
        pd_calldescriptor->currentAddress(currentaddr);
  
--- 303,314 ----
        currentaddr = pd_calldescriptor->currentAddress();
      }
  
! //    if (pd_strand->orderly_closed) {
! //      // Strand was closed before / during our request. Retry with the
! //      // same address.
! //      retry = 1;
! //    }
! //    else {
        currentaddr = pd_rope->notifyCommFailure(currentaddr,heldlock);
        pd_calldescriptor->currentAddress(currentaddr);
  
***************
*** 322,330 ****
  	// Retry will use the next address in the list.
  	retry = 1;
        }
!     }
!   }
!   else if (pd_strand->biDir && 
  	   pd_strand->isClient() && 
  	   pd_strand->biDir_has_callbacks) {
  
--- 322,330 ----
  	// Retry will use the next address in the list.
  	retry = 1;
        }
! //    }
! //  }
! /*  else if (pd_strand->biDir && 
  	   pd_strand->isClient() && 
  	   pd_strand->biDir_has_callbacks) {
  
***************
*** 356,362 ****
      minor = TRANSIENT_ConnectionClosed;
      break;
    }
! }
  
  ////////////////////////////////////////////////////////////////////////
  CORBA::ULong
--- 356,362 ----
      minor = TRANSIENT_ConnectionClosed;
      break;
    }
! */}
  
  ////////////////////////////////////////////////////////////////////////
  CORBA::ULong


More information about the omniORB-list mailing list