Dynamic Searching

We had implemented the Gnutella Dynamic Search Protocol. However, we observed that sometimes the search returned far too many results than it should.

Occasionally it turned out that we switched the search off in our latest improvements. So before I could start testing the dynamic search I turned the search on. For that reason I implemented a new Searcher class which makes the connection between the GUI and the LocalPeer by converting the search string to a Query packet, when the search is started, and the QueryHits to search results, when results are returned from the network.

Afterwards I solved the problem with the DynamicSearch . The reason why it returned so many results was, that two variables (returnedResults and hostsQueried) were not initialised and it could not count the actual number of the received results and the queried hosts respectively. Now it can still happen that more than 1000 results are returned, but that happen at very popular searches when only the probe queries return this number of results.

A thing that is still missing is grouping the received results, so that afterwards a file can be downloaded from more than one source simultaneously. For this reason we should first interpret the additional information in the QueryHits.

Would you like to post a relpy?


This post starts a thread.
Follow-ups:
Re: Dynamic Searching
Hi Slavcho, Sorry for the late comments. As you know I was away for awhile... So, I did some tests using searches of different popularity and with different number of peer connections. (more...)