ArticleslgStudy

computer science

Gnutella2

Gnutella2 is a computer science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Gnutella2 rather than just read about it. In short: Gnutella2, often referred to as G2, is a peer-to-peer protocol developed mainly by Michael Stokes and released in 2002. While inspired by the gnutella protocol, G2 shares little of its design with the exception of its connection handshake and download mechanics.

Gnutella2 — main illustration
Gnutella2 — illustration

Key takeaways

  • Gnutella2 belongs to computer science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Gnutella2 to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Gnutella2 from memory before moving on to harder problems.

Reference excerpt

Gnutella2, often referred to as G2, is a peer-to-peer protocol developed mainly by Michael Stokes and released in 2002. While inspired by the gnutella protocol, G2 shares little of its design with the exception of its connection handshake and download mechanics. G2 adopts an extensible binary packet format and an entirely new search algorithm. Furthermore, G2 has a related (but significantly different) network topology and an improved metadata system, which helps effectively to reduce fake files, such as viruses, on the network.

History In November 2002, Michael Stokes announced the Gnutella2 protocol to the Gnutella Developers Forum. While some thought the goals stated for Gnutella2 are primarily to make a clean break with the gnutella 0.6 protocol and start over, so that some of gnutella's less clean parts would be done more elegantly and, in general, be impressive and desirable; other developers, primarily those of LimeWire and BearShare, thought it to be a "cheap publicity stunt" and discounted technical merits. Some still refuse to refer to the network as "Gnutella2", and instead, refer to it as "Mike's Protocol" ("MP"). The Gnutella2 protocol still uses the old "GNUTELLA CONNECT/0.6" handshake string for its connections as defined in the gnutella 0.6 specifications. This backwardly compatible handshake method was criticized by the Gnutella Developers Forum 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 and to allow current gnutella clients to add Gnutella2 at their leisure. With the developers entrenched in their positions, a flame war soon erupted, further cementing both sides' resolve. The draft specifications were released on March 26, 2003, and more detailed specifications soon followed. 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 that the drastic changes don't have enough merit to outweigh the cost of deep rewrites.

Design Gnutella2 divides nodes into two groups: Leaves and Hubs. Most Leaves maintain two connections to Hubs, while Hubs accept hundreds of Leaf connections, and an average of 7 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 of setting up a TCP connection would make a random walk search system, requiring the contacting of large numbers of nodes with small volumes of data, unworkable. However, UDP is not without its own drawbacks. Because UDP is connectionless, there is no standard method to inform the sending client that a message was received, and so if the packet is lost, there is no way to know. Because of this, UDP packets in Gnutella2 have a flag to enable a reliability setting. When an UDP packet with enabled reliability flag is received, the client will respond with an acknowledge packet to inform the sending client that their packet arrived at its destination. If the acknowledge packet is not sent, the reliable packet will be retransmitted in an attempt to ensure delivery. Low importance packets, which do not have the flag enabled, do not require an acknowledge packet, reducing reliability, but also reducing overhead, as no acknowledge packet needs to be sent and waited upon.

Protocol features Gnutella2 has an extensible binary packet format, comparable to an XML document tree, which was conceived as an answer for some of gnutella's less elegant parts. The packet format was designed so that future network improvements and individual vendor features could be added without worry of causing bugs in other clients on the network. For the purpose file identification and secure integrity check of files it employs SHA-1 hashes. 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 while the file is still being downloaded (swarming), Tiger tree hashes are used. To create a more robust and complete system for searching, Gnutella2 also has a metadata system for more complete labeling, rating, and quality information to be given in the search results than would simply be gathered by the file names. 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. Shareaza has the additional feature to request previews of images and videos though only FilesScope takes limited advantage of this. gtk-gnutella extended the protocol to further reduce the gap between Gnutella and G2. In particular, the semi-reliable UDP layer was enhanced to add cumulative and extended acknowledgments in a way that is backward compatible with legacy G2 clients. Further extensions include the "A" string in /Q2/I and the introduction of /QH2/H/ALT, /QH2/H/PART/MT, /QH2/HN, /QH2/BH and /QH2/G1 in the query hits.

Differences from gnutella Overall, the two networks are fairly similar, with the primary differences being in the packet format and the search methodology.

… excerpt ends here. Continue reading the full article.

Illustrations

Gnutella2 illustration
Gnutella2 illustration

Worked examples

Example 1 — a first encounter with Gnutella2

Start with the simplest possible case. Write down what Gnutella2 claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In computer science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Gnutella2 before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Gnutella2 ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Gnutella2

In research
Gnutella2 appears in computer science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Gnutella2 in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Gnutella2 is common in secondary-school and first-year university syllabi. It links to neighbouring topics File sharing networks, Gnutella2, so understanding it makes those chapters shorter.
In everyday life
Look for Gnutella2 outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Gnutella2” →

How to study Gnutella2 in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Gnutella2 means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Gnutella2 out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Gnutella2 in simple terms?

Gnutella2, often referred to as G2, is a peer-to-peer protocol developed mainly by Michael Stokes and released in 2002. While inspired by the gnutella protocol, G2 shares little of its design with the exception of its connection handshake and download mechanics.

Why does Gnutella2 matter?

Because it connects several computer science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Gnutella2?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Gnutella2.

Tags

  • File sharing networks
  • Gnutella2

Keep exploring