Developers.Gnutella.Bootstrapping

From Shareaza Wiki
Revision as of 20:09, 20 June 2009 by Kevogod (talk | contribs) (1 revision)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Bootstrapping

To connect to the Gnutella network, a servent needs to find and store hosts' addresses.

Here are the ways a Gnutella program finds out about IP addresses of other Gnutella programs it can try to connect to:

  • Web: Calling a GWebCache, which is a PHP script sitting on a Web server with a Web address that exchanges the IP addresses of Gnutella programs that post and download the list.
  • Handshake: The X-Try and X-Try-Ultrapeers handshake headers have IP addresses in them.
  • Packets: There are IP addresses in Pong and QueryHit packets

(find where shareaza calls a gwebcache)


Below is a suggested bootstrapping algorithm which should ensure that the mean count of GWebCache calls per session is near (slightly above) one

(find where shareaza's algorithm is that keeps it from calling gwebcaches too frequently)


Suggested values in seconds for X, Y and Z are respectively 5, 10, 2

(what values does shareaza use)


Every servent SHOULD send an X-Try header during the handshake. This header gives a list of hosts to which the servent can attempt to connect, allowing it to get new host addresses without using the GWebCache.

(find where shareaza assembles the x-try header)


Hosts found in Pongs are supposed to have free slots if the servent implements a pong-caching scheme (see section 3.4). This is not the case for hosts obtained by monitoring the QueryHits. Thus, hosts found in Pongs are good candidates for placement in X-Try headers, while hosts found in QueryHits are not.

Shareaza does impliment pong caching.