river-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Patrick Wright <pdoubl...@gmail.com>
Subject Re: LookupLocator transport dependence
Date Thu, 12 Nov 2009 10:08:58 GMT
This sounds like a good direction to go in. I think that having the
code throughout rely more on lookup methods like getRegistrar() could
make certain types of testing easier--don't need to set up the
infrastructure for socket-based testing if you can mock or stub the
getRegistrar() method, for example.

An important question will be how to make any such changes backwards
compatible. If I understand the documentation and code correctly, both
LookupLocator and DiscoveryV1 implement version 1 of the discovery
protocol, but DV1's implementation in doUnicastDiscovery() is more
complex (and does more) than that in LookupLocator's
getRegistrarFromSocket(). Apart from the fact that both rely directly
on socket calls, it would seem good to bring these two together if it
can be done compatibly, e.g. if LookupLocator could delegate to
DiscoveryV1, for example (and extract the registrar from the

I'm really not familiar with the code, though, so I may be reading
this incorrectly.


View raw message