First Last Prev Next    No search results available
Details
: ORB eagerly resolves hostnames in IORs
Bug#: 1220
: TAO
: ORB
Status: RESOLVED
Resolution: FIXED
: All
: All
: 1.2.3
: P3
: enhancement
: ---

:
:
:
:
  Show dependency tree - Show dependency graph
People
Reporter: Carlos O'Ryan <coryan@atdesk.com>
Assigned To: DOC Center Support List (internal) <tao-support@dre.vanderbilt.edu>

Attachments
The patch corresponding to this bug fix. (3.00 KB, patch)
2002-06-12 12:23, Carlos O'Ryan
Details | Diff


Note

You need to log in before you can comment on or make changes to this bug.

Related actions
Votes: 0


Description:   Opened: 2002-06-12 10:37
Resolving hostnames inside an IOR is a potentially expensive operation, in
fact,
it can take dozens or even hundreds of milliseconds to resolve a single
hostname, and some IORs contain a handful of hostnames.

To avoid this problem the IOR demarshaling code carefully avoids resolving
hostnames, it uses lazy evaluation to obtain the IP address only when needed. 
The key function to perform this lazy evaluation is
TAO_IIOP_Endpoint::object_addr().

This optimization is defeated in practice, every time an object reference is
demarshaled the ORB checks if the object reference is collocated. Check the
code
in TAO_ORB_Core::create_object() to find out how this is done.  The code to
check for collocation depends on the RT-CORBA settings, the thread-lane
resources and a number of other configuration strategies, but finally it boils
down to TAO_IIOP_Acceptor::is_collocated(), where it reads:

if(endp->object_addr () == this->addrs_[i])

i.e. the IIOP_Endpoint::object_addr() lazy-evaluation function is called every
time an object is demarshaled.  Apparently this code is trying to avoid
comparing the hostname strings, and using the ipaddresses because the latter
are
"faster".  The correct code should be:

if(this->addrs_[i].port() == endp->port()
   && ACE_OS::strcmp(this->hosts_[i], endp->host()) == 0)
------- Comment #1 From Carlos O'Ryan 2002-06-12 12:23:45 -------
Created an attachment (id=120) [details]
The patch corresponding to this bug fix.
------- Comment #2 From Carlos O'Ryan 2002-06-12 12:30:47 -------
Commit fixes contained in the attachment.  Also documented some problems with
the collocation approach for SSLIOP and SHMIOP, they probably deserve their own
bug reports, but I do not understand those protocols in enough detail to make
sensible decisions about them.

More details about the fixes in the following ChangeLog entry:

Wed Jun 12 13:24:11 2002  Carlos O'Ryan  <coryan@atdesk.com>
------- Comment #3 From Carlos O'Ryan 2002-06-17 11:52:40 -------
Fixed some problems exposed by the last change, more details in the following
ChangeLog entry:

Mon Jun 17 12:43:07 2002  Carlos O'Ryan  <coryan@atdesk.com>
------- Comment #4 From Nanbor Wang 2002-06-27 08:46:12 -------
Could you just mark this as fixed, if it is so? If not please accept this bug 
(atleast for tao-support)
------- Comment #5 From Carlos O'Ryan 2002-06-27 09:27:54 -------
AFAIK the bug is fixed, thanks for the remainder.

First Last Prev Next    No search results available