Skip to main content

undestand discovery in JXTA

2 replies [Last post]
meriadoc
Offline
Joined: 2007-10-01
Points: 0

Hello to everybody! I'm new in JXTA, I'm studying a lot of documentation (i.e. "JXTA v2.0 Protocols Specification" and "JXTA Javaâ„¢ Standard Edition v2.5:") but I've still missed a couple of basic concepts.

1. How Shared Resource Distributed Index (SRDI) and DiscoveryProtocol are related? I've undestand that when a peer invoke, for instance, a getRemoteAdvertisement(null, DiscoveryService.PEER, attributeName, attributeValue, treshold), the query is propagated, via RDV peer, to edge peers. A TTL-based system is used to avoid network congestion. Are the DHT used in this scenario? Why advertisement indexes are stored and pushed by RDVs and how it is used in discovery?

2. I would like to work with Java SE binding but I've not properly understood the concept of QueryHandler. Am I forced to implement this interface or a "default" implementation is availabe in the reference implementation? What's the role of this class? The discovery still works if I don't implement the QueryHandler interface?

Thanks in advance for your help!

M.

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
fszwt
Offline
Joined: 2007-08-11
Points: 0

For the first question, DiscoveryService using ResolverService, and ResolverService in turn CAN uses SRDI in finding answer in more accurated and timely fashion.
Whenever an advertisement is published its ID and some other attributes r linked together, the hashed value of this linked string r calculated and propulated within the RDV view. The following discover operation of the advertisement using the same trick, first, and hash vaule is generated base on the query information given, then it is used as a hint in directing the query to the direction where the answer is probably located.

meriadoc
Offline
Joined: 2007-10-01
Points: 0

Thanks a lot for your helpful explanation! I'm starting to undestand to understand how to put all of the pieces together...
Meriadoc