Gnutella2

From Wikipedia, the free encyclopedia

The Gnutella2 peer-to-peer protocol is a reworking of the Gnutella protocol. Written mainly by Michael Stokes, Gnutella2 drops all of the old Gnutella protocol except for the connection handshake and adopts an entirely new search algorithm. Gnutella2 is often abbreviated as G2.

Contents

[edit] History

In November 2002, Michael Stokes announced the Gnutella2 protocol to the Gnutella Developers Forum, which immediately caused a schism among the developers. Some thought the goals behind Gnutella2, primarily to make a clean break with the Gnutella 0.6 protocol and start over so that much of the kludge would be done elegantly, to be impressive and desirable. Other developers, primarily those of LimeWire and BearShare, thought it a "cheap publicity stunt" and discounted any technical merits. Many of that group still refuse to refer to the network as "Gnutella2" and instead refer to it as "Mike's Protocol".[1]

Curiously, the Gnutella2 protocol still uses the old "GNUTELLA CONNECT/0.6" handshake string for its connections[2] as defined in the Gnutella 0.6 specifications which was criticized by the GDF as an attempt to use the Gnutella network for bootstrapping the new, unrelated network, while proponents of the network claimed that its intent was to remain backwards-compatible with Gnutella to allow current Gnutella clients to add Gnutella2 at their leisure.

With the developers entrenched in their positions, a flame war soon erupted centering around lead BearShare developer Vincent Falco, who lost his cool and started insulting anybody who did not agree with him[3][4][5][6], further cementing both sides' resolves.


The draft specifications were released on March 26, 2003, and more detailed specifications soon followed. Gnutella2 (G2) is not supported by many of the "old" Gnutella network clients, however many Gnutella2 clients still also connect to Gnutella. Many Gnutella2 proponents claim that this is because of political reasons, while Gnutella supporters claim technical reasons for avoiding the new protocol.[7]

[edit] How it works

Gnutella2 divides nodes into two groups: leaves and hubs. Leaves maintain one or two connections to hubs, while hubs accept hundreds of leaves, and many connections to other hubs. When a search is initiated, the node obtains a list of hubs if needed, and contacts the hubs in the list, noting which have been searched, until the list is exhausted, or a predefined search limit has been reached. This allows a user to find a popular file easily without loading the network, while theoretically maintaining the ability for a user to find a single file located anywhere on the network.

Hubs index what files a leaf has by means of a Query Routing Table, which is filled with single bit entries of hashes of keywords which the leaf uploads to the hub, and which the hub then combines with all the hash tables its leaves have sent it in order to create a version to send to their neighboring hubs. This allows for hubs to reduce bandwidth greatly by simply not forwarding queries to leaves and neighboring hubs if the entries which match the search are not found in the routing tables.

Gnutella2 relies extensively on UDP, rather than TCP, for searches. The overhead TCP introduces would make a random walk search system unworkable, though UDP is not without its own drawbacks.

[edit] Protocol features

Gnutella2 has an extensible binary XML-like packet format which was conceived as an answer for Gnutella's many kludges, as future network improvements and individual vendor features could be added without worry of causing bugs in other clients on the network[8] . While many developers who came after the flame war have proclaimed that this feature makes it much easier to code a client for Gnutella2 than Gnutella[9], Gnutella developers still maintain that the Generic Gnutella Extension Protocol (GGEP) allows for flexible additions to the Gnutella 0.6 protocol.

Gnutella2 employs SHA-1 hashes for file identification and secure integrity check of files. To allow for a file to be reliably downloaded in parallel from multiple sources as well as to allow for the reliable uploading of parts as the file is being downloaded (swarming), Tiger tree hashes are used.[10]

To create a more robust and complete system for searching, Gnutella2 also has a metadata system for more complete labelling, rating, and quality information to be given in the search results than would simply be gathered by the file names.[11] Nodes can even share this information after they have deleted the file, allowing users to mark viruses and worms on the network without requiring them to keep a copy.

Gnutella2 also utilizes compression in its network connections to reduce the bandwidth used by the network.[10]

Shareaza has the additional feature to request previews of images and videos, though currently no additional clients take advantage of this.

[edit] Differences between Gnutella2 and Gnutella

Overall, the two networks are fairly similar, with the primary differences being in the packet format and the search methodology. Gnutella's packet format has been criticised because it was not originally designed with extensibility in mind, and has had many additions over the years, leaving the packet structure cluttered and inefficient.[9] Gnutella2 learned from this, and aside from having many of the added features of Gnutella standard in Gnutella2, designed in future extensibility from the start.

The other major difference is the search algorithm. While Gnutella uses a query flooding method of searching, Gnutella2 uses a walk system where a searching node gathers a list of hubs and contacts them directly, one at a time. This has several advantages over the Gnutella's query flooding system. It is more efficient, as continuing a search does not increase the network traffic exponentially, queries are not routed through as many nodes, and it increases the granularity of a search, allowing a client to stop once a pre-defined threshold of results has been obtained more effectively than in Gnutella. It also increases the complexity of the network and the network maintenance required, as well as requiring safeguards to prevent a malicious attacker from using the network for Denial-of-service attacks.

There is also difference in terminology, with the more capable nodes which are used to condense the network being referred to differently, Ultrapeer in Gnutella and Hub in Gnutella2, and they are also used differently in topology. In Gnutella, the Ultrapeers generally maintain a relatively small number of leaves and a high number of peer connections, while Gnutella2 Hubs maintain far more leaves, and fewer peer connections. The reason for this is that the search methods of the various networks have different optimum topologies.

[edit] Clients

Some current Gnutella2 clients are:

  • Shareaza (Windows), Open source C++ under the GPL.
  • Kiwi Alpha (Windows), Closed source.
  • Morpheus (Windows), Closed source.
  • Gnucleus (Windows), Open source core in C/C++ under the LGPL.
  • Adagio (Cross Platform), Open source Ada under the GPL.
  • Pocket G2 (Windows Pocket PC), Closed Source.
  • FileScope (Cross Platform), Open source C# under the GPL.
  • iMesh (Windows), Closed source.
  • MLDonkey (Cross Platform), Open source Ocaml under the GPL.
  • TrustyFiles (Windows), Closed source.

[edit] References

  1. ^ GDF Discussion on the Gnutella2 name. The Gnutella Developer Forum. Retrieved on May 10, 2006.
  2. ^ Developer discussion of similarities between Gnutella and Gnutella2. The Gnutella Developer Forum. Retrieved on May 10, 2006.
  3. ^ Part of the Gnutella/Gnutella2 Flame War (1). The Gnutella Developer Forum. Retrieved on August 6, 2006.
  4. ^ Part of the Gnutella/Gnutella2 Flame War (2). The Gnutella Developer Forum. Retrieved on August 6, 2006.
  5. ^ Part of the Gnutella/Gnutella2 Flame War (3). The Gnutella Developer Forum. Retrieved on August 6, 2006.
  6. ^ Part of the Gnutella/Gnutella2 Flame War (4). The Gnutella Developer Forum. Retrieved on August 6, 2006.
  7. ^ Developer discussion on migration to Gnutella2. The Gnutella Developer Forum. Retrieved on May 10, 2006.
  8. ^ Packet Structure. Gnutella2 wiki. Retrieved on May 9, 2006.
  9. ^ a b Comparison of Gnutella and Gnutella2 packet structure. The Gnutella Developer Forum. Retrieved on May 15, 2006.
  10. ^ a b Gnutella2 Standard. Gnutella2 wiki. Retrieved on May 9, 2006.
  11. ^ Simple Query Language and Metadata. Gnutella2 wiki. Retrieved on May 9, 2006.

[edit] External links