[omniORB] ORB internals question

Duncan Grisby dgrisby@uk.research.att.com
Tue, 24 Jul 2001 14:49:59 +0100


On Tuesday 24 July, "Matthew N. White" wrote:

> In Henning & Vinoski pg. 271, it states
> 
> "Most ORB implementations open a connection when the first reference to
> an address space is created, and the close the connection when the last
> refernce to that address space is released.  (If the client has multiple
> references to different objects in the same server, most ORBs send all
> requests to objects in that server over the same single connection.)"
> 
> Can anyone tell me if these things are true for omniORB?

Amusingly enough, none of those things are true for omniORB. omniORB
opens a connection the first time an object reference to an address
space is _used_ (which includes the implicit call to _is_a() which
might be done by _narrow). The connection is, in some cases, closed
when the last reference to the address space is released, but it can
also be asynchronously scavenged if it hasn't been used for a while.

I'm surprised by H&V's assertion that most ORBs open a connection on
receipt of an object reference, since that is a plainly stupid thing
to do. First, consider something like the Naming service which stores
thousands (millions?) of object references, but never invokes on any
of them. Surely it shouldn't open connections to all of them.
Secondly, what if the server for the object is not contactable at the
time the object reference is received?  That is fine according to the
specification, provided it becomes available by the time you first
invoke on it.

On the last point, multiple object references to the same address
space do share the same connection, but if two threads attempt to make
a call to an address space at the same time, omniORB opens a new
connection to deal with it, rather than multiplexing the requests on a
single connection.

Cheers,

Duncan.

-- 
 -- Duncan Grisby  \  Research Engineer  --
  -- AT&T Laboratories Cambridge          --
   -- http://www.uk.research.att.com/~dpg1 --