tags:

views:

50

answers:

2

Is it possible for a client to access the IMR to get the host name of the servers?

+2  A: 

This is possible indirectly. As you'll receive a "location forward" from the IMR (implementation repository). Your ORB must be able to extract the host's address from the object redirection.

The question is: What do you want to do with this information?

CORBA is (shall be) location transparent... Thus, do not add location dependent services!

tuergeist
+1  A: 

Even what tuergeist suggests (the host address) isn't necessarily where a server is running. First and foremost, the server may not actually be running but may still be registered with the IMR. Second, the host name may map to many IP addresses; an IP address may resolve to multiple machines using some sort of additional fault-tolerance network layer. Finally, if CORBA's Fault Tolerant spec is combined with IMR, then there's another level of indirection.

The question raised by teurgeist is the most appropriate, and the advice of not adding location-dependent services is sage.

As a footnote, relying on any IMR behavior is also bad, because the IMR is one of the most underspecified aspects of the CORBA spec. Basically, it ends up saying, "a vendor can provide one, and here are the kinds of things it can do". That's about it. So, if you rely on specific behaviors or specific APIs, you've instantly tied yourself to one vendor's specific implementation of the IMR.

Chris Cleeland