Gnutella2
   HOME

TheInfoList



OR:

Gnutella2, often referred to as G2, is a
peer-to-peer Peer-to-peer (P2P) computing or networking is a distributed application architecture that partitions tasks or workloads between peers. Peers are equally privileged, equipotent participants in the network, forming a peer-to-peer network of Node ...
protocol developed mainly by Michael Stokes and released in 2002. While inspired by the
gnutella Gnutella is a peer-to-peer network protocol. Founded in 2000, it was the first decentralized peer-to-peer network of its kind, leading to other, later networks adopting the model. In June 2005, Gnutella's population was 1.81 million computer ...
protocol, G2 shares little of its design with the exception of its connection handshake and
download In computer networks, download means to ''receive'' data from a remote system, typically a server such as a web server, an FTP server, an email server, or other similar systems. This contrasts with uploading, where data is ''sent to'' a remote ...
mechanics. G2 adopts an extensible binary packet format and an entirely new
search algorithm In computer science, a search algorithm is an algorithm designed to solve a search problem. Search algorithms work to retrieve information stored within particular data structure, or calculated in the Feasible region, search space of a problem do ...
. Furthermore, G2 has a related (but significantly different)
network topology Network topology is the arrangement of the elements (Data link, links, Node (networking), nodes, etc.) of a communication network. Network topology can be used to define or describe the arrangement of various types of telecommunication networks, ...
and an improved
metadata Metadata (or metainformation) is "data that provides information about other data", but not the content of the data itself, such as the text of a message or the image itself. There are many distinct types of metadata, including: * Descriptive ...
system, which helps effectively to reduce fake files, such as
viruses A virus is a submicroscopic infectious agent that replicates only inside the living cells of an organism. Viruses infect all life forms, from animals and plants to microorganisms, including bacteria and archaea. Viruses are found in almo ...
, 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 LimeWire was a free peer-to-peer file sharing client for Windows, macOS, Linux, and Solaris. Created by Mark Gorton in 2000, it was most prominently a tool used for the download and distribution of pirated materials, particularly pirated m ...
and BearShare, thought it to be a "cheap
publicity stunt In marketing, a publicity stunt is a planned event designed to attract the public's attention to the event's organizers or their cause. Publicity stunts can be professionally organized, or set up by amateurs. Such events are frequently utiliz ...
" 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 In general, bootstrapping usually refers to a self-starting process that is supposed to continue or grow without external input. Many analytical techniques are often called bootstrap methods in reference to their self-starting or self-supporting ...
the new, unrelated network, while proponents of the network claimed that its intent was to remain
backwards-compatible In telecommunications and computing, backward compatibility (or backwards compatibility) is a property of an operating system, software, real-world product, or technology that allows for interoperability with an older legacy system, or with Input ...
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 A specification often refers to a set of documented requirements to be satisfied by a material, design, product, or service. A specification is often a type of technical standard. There are different types of technical or engineering specificati ...
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 Politics () is the set of activities that are associated with decision-making, making decisions in social group, groups, or other forms of power (social and political), power relations among individuals, such as the distribution of Social sta ...
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 A leaf (: leaves) is a principal appendage of the stem of a vascular plant, usually borne laterally above ground and specialized for photosynthesis. Leaves are collectively called foliage, as in "autumn foliage", while the leaves, stem, ...
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
upload Uploading refers to ''transmitting'' data from one computer system to another through means of a network. Common methods of uploading include: uploading via web browsers, FTP clients, and terminals ( SCP/ SFTP). Uploading can be used in th ...
s to the Hub, and which the Hub then combines with all the
hash table In computer science, a hash table is a data structure that implements an associative array, also called a dictionary or simply map; an associative array is an abstract data type that maps Unique key, keys to Value (computer science), values. ...
s its Leaves have sent, it in order to create a version to send to their neighboring Hubs. This allows for Hubs to reduce
bandwidth Bandwidth commonly refers to: * Bandwidth (signal processing) or ''analog bandwidth'', ''frequency bandwidth'', or ''radio bandwidth'', a measure of the width of a frequency range * Bandwidth (computing), the rate of data transfer, bit rate or thr ...
greatly by simply not forwarding queries to Leaves and neighboring Hubs, if the entries which match the search are not found in the
routing table In computer networking, a routing table, or routing information base (RIB), is a data table stored in a router or a network host that lists the routes to particular network destinations, and in some cases, metrics (distances) associated wi ...
s. Gnutella2 relies extensively on UDP, rather than TCP, for searches. The overhead of setting up a TCP connection would make a
random walk In mathematics, a random walk, sometimes known as a drunkard's walk, is a stochastic process that describes a path that consists of a succession of random steps on some Space (mathematics), mathematical space. An elementary example of a rand ...
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 A message is a unit of communication that conveys information from a sender to a receiver. It can be transmitted through various forms, such as spoken or written words, signals, or electronic data, and can range from simple instructions to co ...
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 A flag is a piece of textile, fabric (most often rectangular) with distinctive colours and design. It is used as a symbol, a signalling device, or for decoration. The term ''flag'' is also used to refer to the graphic design employed, and fla ...
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 Extensible Markup Language (XML) is a markup language and file format for storing, transmitting, and reconstructing data. It defines a set of rules for encoding electronic document, documents in a format that is both human-readable and Machine-r ...
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 Integrity is the quality of being honest and having a consistent and uncompromising adherence to strong moral and ethical principles and values. In ethics, integrity is regarded as the honesty and Honesty, truthfulness or of one's actions. Integr ...
check of files it employs
SHA-1 In cryptography, SHA-1 (Secure Hash Algorithm 1) is a hash function which takes an input and produces a 160-bit (20-byte) hash value known as a message digest – typically rendered as 40 hexadecimal digits. It was designed by the United States ...
hashes. To allow for a file to be reliably
download In computer networks, download means to ''receive'' data from a remote system, typically a server such as a web server, an FTP server, an email server, or other similar systems. This contrasts with uploading, where data is ''sent to'' a remote ...
ed 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 Metadata (or metainformation) is "data that provides information about other data", but not the content of the data itself, such as the text of a message or the image itself. There are many distinct types of metadata, including: * Descriptive ...
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 A virus is a submicroscopic infectious agent that replicates only inside the living cells of an organism. Viruses infect all life forms, from animals and plants to microorganisms, including bacteria and archaea. Viruses are found in almo ...
and
worms The World Register of Marine Species (WoRMS) is a taxonomic database that aims to provide an authoritative and comprehensive catalogue and list of names of marine organisms. Content The content of the registry is edited and maintained by scien ...
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
image An image or picture is a visual representation. An image can be Two-dimensional space, two-dimensional, such as a drawing, painting, or photograph, or Three-dimensional space, three-dimensional, such as a carving or sculpture. Images may be di ...
s and
video Video is an Electronics, electronic medium for the recording, copying, playback, broadcasting, and display of moving picture, moving image, visual Media (communication), media. Video was first developed for mechanical television systems, whi ...
s though only FilesScope takes limited advantage of this.
gtk-gnutella gtk-gnutella is a peer-to-peer file sharing application which runs on the gnutella network. gtk-gnutella uses the GTK+ toolkit for its graphical user interface. Released under the GNU General Public License, gtk-gnutella is free software. Histo ...
extended the protocol to further reduce the gap between
Gnutella Gnutella is a peer-to-peer network protocol. Founded in 2000, it was the first decentralized peer-to-peer network of its kind, leading to other, later networks adopting the model. In June 2005, Gnutella's population was 1.81 million computer ...
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.


Protocol

Gnutella's packet format has been criticized because it was not originally designed with
extensibility Extensibility is a software engineering and systems design principle that provides for future growth. Extensibility is a measure of the ability to extend a system and the level of effort required to implement the extension. Extensions can be t ...
in mind, and has had many additions over the years, leaving the packet structure cluttered and inefficient. 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.


Search algorithm

While gnutella uses a query flooding method of searching, Gnutella2 uses a
random walk In mathematics, a random walk, sometimes known as a drunkard's walk, is a stochastic process that describes a path that consists of a succession of random steps on some Space (mathematics), mathematical space. An elementary example of a rand ...
system, where a searching node gathers a list of Hubs and contacts them directly, one at a time. However, as Hub organize themselves in, so called, "Hub clusters", where each Hub mirrors the information stored by its neighbors, the Leaf is returned the information of the entire Hub cluster (usually 7 Hubs). 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 Network traffic or data traffic is the amount of data moving across a network at a given point of time. Network data in computer networks is mostly encapsulated in network packets, which provide the load in the network. Network traffic is the main ...
exponentially, queries are not routed through as many nodes, and it increases the
granularity Granularity (also called graininess) is the degree to which a material or system is composed of distinguishable pieces, "granules" or "grains" (metaphorically). It can either refer to the extent to which a larger entity is subdivided, or the ...
of a search, allowing a client to stop, once a pre-defined threshold of results has been obtained, more effectively than in gnutella. However, the walk system also increases the complexity of the network and the network maintenance and management required, as well as requiring safeguards to prevent a malicious attacker from using the network for
denial-of-service attack In computing, a denial-of-service attack (DoS attack) is a cyberattack in which the perpetrator seeks to make a machine or network resource unavailable to its intended users by temporarily or indefinitely disrupting services of a host co ...
s.


Terminology

There is also a difference in terminology: while the more capable nodes, which are used to condense the network, are referred to as ''Ultrapeers'' in gnutella, they are called ''Hubs'' in Gnutella2, and they are also used slightly differently in topology. In gnutella, the Ultrapeers generally maintain as many leaves as peer connections, while Gnutella2 Hubs maintain far more leaves, and fewer peer (Hub-to-Hub) connections. The reason for this is that the search methods of the various networks have different optimum topologies.


Clients


List

Free software Free software, libre software, libreware sometimes known as freedom-respecting software is computer software distributed open-source license, under terms that allow users to run the software for any purpose as well as to study, change, distribut ...
Gnutella2 clients include: * Adagio (Cross Platform), written in Ada, under the GPL. * Gnucleus (Windows), written in C/ C++, under the LGPL *
Gtk-gnutella gtk-gnutella is a peer-to-peer file sharing application which runs on the gnutella network. gtk-gnutella uses the GTK+ toolkit for its graphical user interface. Released under the GNU General Public License, gtk-gnutella is free software. Histo ...
(Cross Platform), written in C. Only supports leaf-mode connections to G2 since version 1.1. * MLDonkey (Cross Platform), written in
OCaml OCaml ( , formerly Objective Caml) is a General-purpose programming language, general-purpose, High-level programming language, high-level, Comparison of multi-paradigm programming languages, multi-paradigm programming language which extends the ...
, under the GPL, however as of version 2.9.0 (2007), support is officially unmaintained and disabled in the binaries. * Shareaza (Windows), multi-network, written in C++, under the GPL, currently +/- 93% network share
Proprietary software Proprietary software is computer software, software that grants its creator, publisher, or other rightsholder or rightsholder partner a legal monopoly by modern copyright and intellectual property law to exclude the recipient from freely sharing t ...
implementations include: * Foxy (Windows) Chinese GnucDNA-derived program, no interaction with any other G2 clients possible, and uses its own "Foxy"-Network, which is separated from the original G2 and known for network leakage into G2. Theoretically, the client is compatible to G2. * Morpheus (Windows)


Comparison

The following table compares general and technical information for a number of available applications supporting the G2 network.


See also

* GnucDNA * Shareaza


References


External links


Gnutella2 wiki

g2paranha - G2 Network Crawler
{{Gnutella2 File sharing networks