Gnutella2 - Design

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 neighbouring Hubs. This allows for Hubs to reduce bandwidth greatly by simply not forwarding queries to Leaves and neighbouring 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.

Read more about this topic:  Gnutella2

Famous quotes containing the word design:

    Joe ... you remember I said you wouldn’t be cheated?... Nobody is really. Eventually all things work out. There’s a design in everything.
    Sidney Buchman (1902–1975)

    I always consider the settlement of America with reverence and wonder, as the opening of a grand scene and design in providence, for the illumination of the ignorant and the emancipation of the slavish part of mankind all over the earth.
    John Adams (1735–1826)

    With wonderful art he grinds into paint for his picture all his moods and experiences, so that all his forces may be brought to the encounter. Apparently writing without a particular design or responsibility, setting down his soliloquies from time to time, taking advantage of all his humors, when at length the hour comes to declare himself, he puts down in plain English, without quotation marks, what he, Thomas Carlyle, is ready to defend in the face of the world.
    Henry David Thoreau (1817–1862)