[omniORB] Can I use a naming service with different orbs?

Craig Rodrigues rodrigc@mediaone.net
Tue, 31 Aug 1999 11:36:08 -0400


On Tue, Aug 31, 1999 at 10:00:37AM -0500, Mike Bendickson wrote:
> Oops, I wasn't clear.  I don't want to have to deal with IORs at all.  The
> client configuration needs to consist of specifying a hostname and possibly
> a port.  From that I want to be able to query for the IOR.  I think that
> most orbs provide this, but as an extension (is this the Binder that you
> mentioned?).  Forgive me, I'm new to all of this.  :)

Well, other people might have more elegant solutions, but I once
tried a cheapo solution that seemed to work.
(1) Set up your name service, get the IOR to it using object_to_string()
    in the ORB class.
(2) Write the IOR to a file on a shared filesystem, or keep it in memory, 
    or put it in a database, etc.

(3) Write a server program (not necessarily a CORBA server) which accepts
    client incoming
    requests, and sends out the IOR of the naming service

(4) In your client, do string_to_object() on the IOR, and start invoking
    methods on your Naming Service

I once implemented (3) as a server which accepted incoming HTTP
requests.  The HTTP request/response looked something like:

GET /NameService.ior HTTP/1.0

HTTP/1.0 200 OK
Content-Length: [length of IOR]
Content-Type: application/corba-ior

IOR:[IOR string here]


By using this method, I could test with a web browser.

As my professors in school used to say, the implementation is
left as an exercise for the reader. :)
-- 
Craig Rodrigues        
http://www.gis.net/~craigr    
rodrigc@mediaone.net