You are on page 1of 7

PEER TO PEER NETWORK

INTRODUCTION:-

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 application. They are said to form a peer-to-peer network of nodes.

Peers make a portion of their resources, such as processing power, disk storage or network
bandwidth, directly available to other network participants, without the need for central
coordination by servers or stable hosts.[1] Peers are both suppliers and consumers of
resources, in contrast to the traditional client-server model in which the consumption and
supply of resources is divided. Emerging collaborative P2P systems are going beyond the
era of peers doing similar things while sharing resources, and are looking for diverse peers
that can bring in unique resources and capabilities to a virtual community thereby
empowering it to engage in greater tasks beyond those that can be accomplished by
individual peers, yet that are beneficial to all the peers.
 A peer-to-peer network’s architecture is generally formed dynamically by an ad-hoc
type of addition of nodes, meaning the loss of a certain node does not have a
significant impact on the rest of the network.
 This aspect of peer-to-peer networks gives the system the ability to easily scale to
any size that may be need for a certain application.
 Regarding different types of peer-to-peer architecture, there are generally two
major types, structured and unstructured. These two types of networks also contain
even more specific underlying types of networks.
 To be considered an unstructured peer-to-peer network, the network must not use
any algorithm for organization or optimization of the network.
 For unstructured peer-to-peer networks there are three different models which
include pure peer-to-peer networks, hybrid peer-to-peer networks, and centralized
peer-to-peer networks.
 In a pure peer-to-peer network, or sometimes called a purely decentralized network,
all nodes are of equal ability meaning that there are no nodes that have any special
infrastructure function that could affect the network.
 A great example of a popular purely decentralized peer-to-peer network is the
Gnutella network. The main purpose of the Gnutella network is for that of a file
sharing system.
 The Gnutella network, like many other peer-to-peer networks uses a virtual overlay
network with its own routing layers, allowing the peers of the network to share files
on their machine to all other peers connected to the network.
 The second type of unstructured peer-to-peer networks is called the hybrid peer-to-
peer network.
 n this type of network, infrastructure nodes are allowed to exist and are often a type
of central directory server.
 All clients connected to the network must connect to one of these servers.
 The central server maintains a table of registered user connection information (IP
address, connection bandwidth etc.) and a table listing the files that each user holds
and shares in the network, along with metadata descriptions of the files(e.g.
filename, time of creation, etc.)
 A user that wishes to join the network must first contact the central directory server
and report its files that wish to be shared. To find a file on this type of network, the
user must send a request for that file to the directory server. The server then
searches into database for said file and returns a list of users that possess that file.
The requesting user then opens a direct connection with the list of users and
downloads the file.
 Structured peer-to-peer networks generally hold the traits of using some type of
algorithm for organization or optimization of the network.
 Structured peer-to-peer networks use some type of global protocol to ensure that
any node in the network can proficiently route a search to some peer that has a
desired file.
 Distributed hash tables are a class of decentralized distributed systems that provide
a lookup service similar to that of a hash table.

How P2P works???

A peer-to-peer network allows computer hardware and software to


communicate without the need for a server. Unlike client-server architecture,
there is no central server for processing requests in a P2P architecture. The
peers directly interact with one another without the requirement of a central
server.
Now, when one peer makes a request, it is possible that multiple peers have
the copy of that requested object. Now the problem is how to get the IP
addresses of all those peers. This is decided by the underlying architecture
supported by the P2P systems. By means of one of these methods, the client
peer can get to know about all the peers which have the requested object/file
and the file transfer takes place directly between these two peers.

Three such Architectures exist:


1. Centralized Directory
2. Query Flooding
3. Exploiting Heterogeneity

1. Centralized Directory
 It is somewhat similar to client server architecture in the sense that it maintains a
huge central server to provide directory service.
 All the peers inform this central server of their IP address and the files they are
making available for sharing.
 The server queries the peers at regular intervals to make sure if the peers are still
connected or not.
 So basically this server maintains a huge database regarding which file is present at
which IP addresses.

Working
 Now whenever a requesting peer comes in, it sends its query to the server.
 Since the server has all the information of its peers, so it returns the IP addresses of
all the peers having the requested file to the peer.
 Now the file transfer takes place between these two peers.
The first system which made use of this method was Napster, for the purpose of Mp3
distribution.

The major problem with such an architecture is that there is a single point of failure.
If the server crashes, the whole P2P network crashes. Also, since all of the
processing is to be done by a single server so a huge amount of database has to be
maintained and regularly updated.

2. Query Flooding
 Unlike the centralized approach, this method makes use of distributed systems.
 In this, the peers are supposed to be connected into an overlay network. It means if a
connection/path exists from one peer to other, it is a part of this overlay network.
 In this overlay network, peers are called as nodes and the connection between peers
is called an edge between the nodes, thus resulting in a graph-like structure.

Working
 Now when one peer requests for some file, this request is sent to all its neighboring
nodes i.e. to all nodes which are connected to this node. If those nodes don’t have
the required file, they pass on the query to their neighbors and so on. This is called as
query flooding.
 When the peer with requested file is found (referred to as query hit), the query
flooding stops and it sends back the file name and file size to the client, thus
following the reverse path.
 If there are multiple query hits, the client selects from one of these peers.
Gnutella was the first decentralized peer to peer network.

This method also has some disadvantages like, the query has to be sent to all the
neighboring peers unless a match is found. This increases traffic in the network.

Exploiting heterogeneity
 This P2P architecture makes use of both the above discussed systems.
 It resembles a distributed system like Gnutella because there is no central server for
query processing.
 But unlike Gnutella, it does not treat all its peers equally. The peers with higher
bandwidth and network connectivity are at a higher priority and are called as group
leaders/super nodes. The rest of the peers are assigned to these super nodes.
 These super nodes are interconnected and the peers under these super nodes inform
their respective leaders about their connectivity, IP address and the files available for
sharing.

APPLICATIONS:-
 Some of the general applications for peer-to-peer networks include the ever
popular file sharing, streaming media, grid computing, instant messaging and
voice over internet protocol.
 The most popular peer-to-peer file sharing networks that are still active today
include G2, FastTrack, and Gnutella. The application of sharing files over peer-
to-peer networks is what first popularized the use of peer-to-peer technology.
 Major media streaming applications over peer-to-peer networks, or P2PTV,
include Joost, TVUPlayer and CyberSky-TV. These applications allow for the
streaming of media such as television channels over peer-to-peer networks.
 Grid computing is a peer-to-peer application that is gaining massive
popularity.
 Grid computing applications share processing power over a networking to
accomplish some type of goal.
 Voice over Internet Protocol, or VOIP, is another popular peer-to-peer
applications.
 The most popular voice application that uses peer-to-peer networking is
Skype.
 This application allows for the use of voice communications while using peer-
to-peer technology.

ADVANTAGES AND LIMITATIONS:-

 One of the major advantages to a peer-to-peer network is that each time a new
node is connected to the network the total capacity of the system increases.
 This point differs from the client-server model standpoint since the addition of new
nodes to a network that connects to a set number of servers could possibly slow
data transfers for all of the connected users.
 Another advantage in regards to a pure peer-to-peer network is that there is no
single point of failure in the network.
 When compared to the client-server model on this point if the server fails the
network is brought down since the server is unable to relay information to the
connected nodes.
 On the pure peer-to-peer side of the topic, if one of the nodes fails the rest of the
nodes are able to continue relaying information.
 One of the weaknesses of peer-to-peer networks is that of security. Generally
speaking peer-to-peer networks are more susceptible to security problems.

 Another disadvantage of peer-to-peer networks is the high bandwidth usage


required. This high bandwidth usage has lead to Internet Service Providers starting
to throttle, or limit, peer-to-peer traffic.
 On the other side, the server-client model usually consists of short quick bursts of
data.
 An emerging solution to this problem is called peer-to-peer caching.
 Peer-to-peer caching is defined as a network traffic management service that
accelerates data delivered over peer-to-peer networks by means of the Internet
Service Provider storing pieces of files that are most accessed by peer-to-peer users.

REAL LIFE EXAMPLE:-


Skype is a good example of P2P usage in VoIP. It was acquired by eBay in 2005.
Skype was built on top of the infrastructure of P2P file-sharing system, Kazaa. The
bandwidth is shared and the sound or video in real-time are shared as resources.

You might also like