[p2p-hackers] Question about Kademlia Search
Tiago Macambira
macambira at gmail.com
Mon May 30 15:10:44 UTC 2005
On 5/30/05, marco at bice.it <marco at bice.it> wrote:
> Hello.
> A simple query on a DHT should have a "lookup(key)" function as its first
> operation.
> How can an application that uses Kademlia (e.g. Overnet or Emule), send this
> query?
>
> I mean, what you do is to search for a string, that is the partial name of an
> object (a file).
> How is this string transformed in a hash value to look up for on the Kad nodes?
What Kad (and probably overnet too) does is converting the first word
of the search string to a key (MD4 hash) and sending a query for this
keyword (now a common DHT query). Once if has find nodes close enough
to this key, it will submit the whole query to those nodes.
If you grab its source code, you will find it looking at:
CSearchResultsWnd::DoNewKadSearch - SearchResultsWnd.cpp
CSearchManager::prepareFindKeywords - SearchManager.cpp
Kademlia::KadGetKeywordHash - SearchManager
Hope it helps.
Perhaps someone else can give you some article references on this
problem if this is what you are looking form.
--
[]s
Tiago Alves Macambira
More information about the P2p-hackers
mailing list