P2P

Peer-to-peer (P2P) technology is emerging as a new model to organize distributed systems for file sharing, distributed computing, system integration, or information search. However, P2P is not a new idea for network communication. In an earlier age of the Internet, many network systems depended on P2P technology. Usenet and the Domain Name System (DNS) were early examples of P2P based systems. However, recent Usenet departs from pure P2P by providing only selective Newsgroups and messages, because the Internet Service Provider (ISP) does not serve all Newsgroups, due to the huge volume of News messages. The newer Freenet restores the original P2P architecture. It is designed to protect itself from censorship using encrypted files and "route-through" data communication. It serves a full list and the server cannot block a particular Newsgroup. DNS is a mixed form of P2P and a hierarchical model. Searching a particular name is referred from lower level to higher level name servers. The name server has the role of server as well as client.

1. Napster
Figure 1. Napster Architecture
Napster was the most famous P2P file sharing system prior to the lawsuit that closed it down. In Napster, the metadata of the shared files are indexed on a centralized server. All the requests for locating files are served through this server. Only the actual file transfer occurs between peers. When a user joins the system, the user connects to the server and sends a list of possessed sharable files. To obtain target files from Napster, a "wanted" list is sent to the server. The result of the query returns the IP addresses of peers possessing the wanted files. The user can select one of the returned IP addresses and download the file. When a user disconnects from the server, the list of sharing files possessed by that user is deleted from the server.

2. Gnutella
Figure 2. Gnutella Architecture
Gnutella is a pure P2P network protocol. The initial list of hosts is usually obtained from a transitory Web lookup. A servant (node or peer) broadcasts a Ping message to find the active hosts forming the initial network. Those hosts are neighbors and the actual query is broadcast to the neighbor hosts. The neighbor servants send the query to their own neighbors again, even when they have the target file. All the messages are forwarded to the neighbors within the limited number of hops defined by the Time to Live (TTL) in the message header. If the desired files were found, the servant sends back the matched result set to the neighbor through which it received the query. The request servant selects the file from the result set and downloads the target file directly from the possessing host in the same way as in HTTP download. Due to the Breadth-First-Search (BFS) mechanism of query in the Gnutella protocol, Gnutella may cause network traffic to significantly increased. A number of studies have been focused on reducing such inefficient network usage. Distributed Hash Tables (DHTs) is one approach that reduces network communication. In DHTs, a key is mapped onto a node, which is assigned through a hash table.

3. Supernode
Figure 3. Fasttrack Architecture
The Supernode (Hub, Ultrapeer, Ultranode, or Reflector) architecture is introduced to the unstructured peer-to-peer network for better performance. Fasttrack organizes a hybrid---centralized and decentralized---form of network topology as in Figure3. Instead of centralized control, a peer node that has enough bandwidth and storage is voluntarily selected as a supernode. The supernode has a larger number of connections than ordinary nodes. Most peers act the same way as in Gnutella and also query the supernode to find target data. The large amount of cached metadata in supernodes dramatically reduces the network traffic. From the list of target data from peers including supernodes, the selected target files can be downloaded through the simplified HTTP protocol.

4. JXTA
JXTA is the first open, platform and language independent protocol for general P2P communication and collaboration between network devices. JXTA makes it possible to organize a virtual network in which heterogeneous peers can share files, communicate with each other, and collaborate on top of the JXTA protocol.

A unique JXTA ID is allocated to each network resource. The JXTA ID is not related to the Internet Protocol (IP) address, and the ID is not changed even if IP addresses are dynamically allocated. Any network entity that executes the JXTA protocols is called a peer. Peers may be not only computers but also network devices. Each peer has network functionalities that are "independent and asynchronous" from other peers. A peer endpoint links a peer. Several peer endpoints, which represent various network connections, can reach the same peer. A group of peers that are interested in the same category can form a peer group. A peer group is identified with an ID for the group. Peers in the different domains, possibly separated by a firewall or Network Address Translation (NAT), can belong to the same group. A peer is allowed to have membership of multiple peer groups.

Messages are used to communicate between JXTA peers. An ordered sequence of named and typed elements forms a message. There are two formats for the message---XML and binary---but only a binary format is used for the physical transfer. The messages are transferred through pipes, which is the JXTA virtual abstraction for a network connection. There are three kinds of pipe connections---a point-to-point pipe, a propagate pipe, and a secure unicast pipe. A point-to-point pipe is a one-to-one connection. A propagate pipe provides one-to-many connections. A secure pipe is a point-to-point communication through a secure network channel. All the pipe operations are based on "asynchronous and unidirectional" communications. Bi-directional communications are provided on top of the pipe service. Multicasting may be used in the propagate pipe.

An advertisement is an XML-based metadata script, which describes JXTA network resources---peer, peer group, pipe, service, and other core resources. The JXTA resolver is a generic object discovery to resolve any kind of information used in typical distributed systems. All actions of resolution are integrated into the discovery of advertisements. The advertisement search mechanism depends on the policy of the application, though JXTA protocol provides a substitutable protocol framework for resolution. The resolver service includes query send and response, query propagation, and security functions---authentication and verification of credentials. Each advertisement has an expiration time, which is extensible.

The Rendezvous super-peer is the optional but default policy model for resolution in a JXTA network. The Rendezvous peer is the same as other peers but has an additional cache of advertisement indexes. Through the Shared Resource Distributed Index (SRDI) service, non-rendezvous (edge) peers can publish their advertisement indexes on the rendezvous peers. The physical location of a peer does not affect the qualification of a rendezvous peer. When a peer queries an advertisement, it sends a request to its rendezvous peer. If the rendezvous peer does not have the index of the query, it propagates the query to the next rendezvous. However, from JXTA version 2.0, the propagation is transferred only among the rendezvous peers.

From Jungkee Kim's dissertation