Peer to peer network, also known as the P2P network, is a distributed architecture that subdivides the workloads among a vast pool of nodes. It can be seen as a network between two or more computers without any intermediate device like a hub or server.

The computers in this setup can share resources among themselves, and they are called nodes or peers.

In the Client-server network, there is a central server and devices has to take permission from that server for data sharing but in peer to peer network, there is no need for that.

All individual participants or nodes itself are a server and a client. Moreover, they are both consumer and supplier of resources like CPU, memory, network bandwidth, etc

The first application that used peer to peer network was Napster. It was a file sharing application, but since then many applications have been build on a peer to peer network, and the most popular one is utorrent.

Defining Peer to peer network in different ways

There are many definitions suggested for peer to peer networks, and each one of them is correct in its way. None of the descriptions defines peer to peer network accurately.

These definitions are based on the functionality provided by the network. Some of the most common explanations are.

  • A system to be P2P if the elements that form the this share their resources to provide the service the system has been designed to provide. The elements in the system both provide services to other elements and request services from other elements.
  • The peer-to-peer network consists of distributed systems with interconnected nodes able to self-organize into network topologies for sharing resources such as content, storage, CPU cycles, and bandwidth.

They have the ability of fault tolerance and accommodating transient populations of nodes while maintaining acceptable connectivity and performance, without requiring the intermediation or support of a global centralized server or authority.

  • The distributed network architecture may be called a Peer-to-Peer (P-to-P, P2P,) network if the participants share a part of their hardware resources like processing power, printers, storage capacity, network link capacity, etc.
  • P2P Networks explicitly designed to share files amongst users are known as P2P file sharing networks.

These shared resources are necessary to provide the Services and content offered by the network (e.g., file sharing or shared workspaces for collaboration).

These resources are accessible by other peers directly, without passing intermediary entities.

The participants of such a network are thus resource (Service and content) providers as well as resource (Service and content) requestors (Servant-concept).

What are the characteristics of a P2P Network?

Following are the characteristics of a P2P network.

Various characteristics make a P2P significantly different from Client-Server networks. Some of them are as follows:

Shared Resources

Suppose a user wants to share their media files with another user on the network, they can do so directly without any third party involved. P2P network was primarily designed to share various data such as videos, music, software’s, etc.

Double Role

A P2P network enables all the systems on the network (each system is called a node) to act as both a client as well as a server thus reducing the network overhead.

Stability

They are more stable compared to traditional network setups since there is no single point of failure.

Autonomy

Nodes in a peer-to-peer network are autonomous in the sense they can manage their content as well as resources without the need of a central repository. P2P networks are also known to rearrange their topologies when systems on the network disconnect or connect.

Why use a P2P Network?

The creation of peer to peer network has lead to the creation of applications in which no central authority is needed. It is just one benefit of using a peer to peer network, there are many more advantages of using Peer to Peer network, and some of them are.

  • The first thing that comes to mind while setting up a network is its cost, and the price for setting a peer to peer network is lower as compared to the client-server network.
  • The setup and maintenance of a peer to peer network is comparatively easy then a client-server model since there is no need for a dedicated server.
  • The Peer to peer networks is robust than the client-server networks. The network does not stop working when a device goes down in a peer to peer network whereas in a client-server system if a server goes down, the whole network goes down.

So, how does it work?

A P2P network works on top of the physical network topology usually by using some sort of virtual overlay. Data is transferred using the TCP/IP topology, but the nodes on the network directly communicate with each other using the application layer.

These overlays are used for indexing and discovering new peers, thus making it completely different from the physical network topology.

Depending on how the networks are interlinked and how the resources are managed, there are three types of P2P networks

Unstructured Networks

These kinds of networks generally do not have a structure or overlay in general. They are thus formed by random connections between peers making it easier to maintain and build.

The very nature of these networks making them resistible to network “churns,” i.e., when a large number of peers connect or disconnect simultaneously.

However, in case a peer requests for a particular chunk of data, the whole network has to be flooded with the query regarding that piece of data since all peers are equally prioritized.

This flooding of requests causes high CPU and memory usage since every peer has to process the query.

Even after this query flooding, there is no guarantee that the request will be processed if the user is requesting for a particular piece of data which only a few peers possess.

Some of the popular applications which operate on unstructured networks are Gnutella and KaZaa.

Structured Networks

Structured P2P networks overcome the shortcomings of unstructured networks by arranging the peers in a topology. This overcomes the problem of query flooding by efficiently searching the requested piece of data even if it’s rare.

This is achieved by creating a general awareness of neighboring nodes on the network satisfy some specific criteria.

The most common example being  DHT (Distributed Hash Table) which helps peers search a particular resource using a hash table.

DHT is responsible for maintaining a (key, value) pair using which any peer on the network can search for another peer having the requested resource.

Well-known implementations of Structured P2P networks include BitTorrent’s distributed tracker system and for discovering resources in grid computing.

Hybrid P2P Networks

This topology makes use of both the client-server as well as the P2P model.

As of now, these networks offer the best performance amongst all since searching is effective using the centralized approach whereas data distribution is painless using the distributed P2P model.

A central server is used for peer awareness, and discovery and data are transferred using the decentralized P2P network which reduces network load.

Spotify, a well-known music streaming service, used this model as a way to reduce operating costs.

What do you need to be aware of?

If there are advantages to certain things, then there are disadvantages as well. Nothing is perfect, and the same is true with peer to peer network as well. The problems with the P2P network are.

  • There is almost no possibility of backup when considering P2P networks since all of the data is distributed among the nodes of a network, and even if one has to create a backup, he will have to back up all the computers.
  • They are less secure than traditional networks. Suppose if a machine on the network gets attacked or infected, the malicious code can then be easily distributed across the entire network.
  • P2P networks are often criticized since they offer relatively less privacy protection mechanisms. Sensitive data stored on the machines can be accessed by anyone on the network unless special care is taken.
  • The most controversial use of P2P has been the distribution of illegal digital content which leads to millions of dollars of losses to various industries.

The music and entertainment industry is heavily hit by content piracy and records billions of dollars in losses every year due to illegal downloads.

  • The content on the network is usually unfiltered and unchecked, and if proper precautions are not taken, one might end up downloading viruses or trojans embedded in the distributed content.
  • The storage management is complicated in peer to peer network since it is spread across all the nodes whereas in client and server network the data is stored in a central server which makes the storage management more straightforward.

Why use it at all?

P2P Networks are viable and cheap alternatives to the traditional Client-Server Setup since it requires no dedicated servers.

More peers translate to higher bandwidth per user as opposed to a centralized network approach.

Since every user acts both as a client and a server, the need for a network manager is eliminated further reducing operating costs.

Also, no technical knowledge is required to set up a network since everything can be quickly done using softwares.

Even if multiple systems disconnect, the resource availability is not severely impacted, and the network can still function without any major hiccups.

Is anybody using P2P?

There are a large number of people who have adopted P2P over the past few years.

It was primarily used to share file and resources amongst users but has evolved exponentially to a point where many major organizations and products are relying on this technology to create new products and services.

It is used in numerous technologies and  institutions such as:

  • Cryptocurrencies such as Bitcoin and Ethereum are basically based on P2P.
  • The U.S Department of Defense stated back in 2003 that they make use of P2P networks.
  • Educational institutes like the MIT and Pennsylvania University are also developing a special program called Lionshare which will help them share files globally.
  • I2P (Invisible Internet Project), used to browse internet anonymously like Tor, makes use of an overlay which is based on the P2P network.
  • Microsoft uses P2P networks to distribute their updates to end users helping them deliver updates faster and without any downtime.

Conclusion

P2P networks offer a faster and robust network by eliminating the need of a server. This has lead to the reduction in hosting cost as well as the cost of managing and maintaining a network.

There has been a sharp rise in the increase and adoption of Peer-to-Peer Networks in the last decade or so.

It has lead to rapid evolution of the technology with many performance and security related issues being addressed.

Still, issues regarding privacy and security still pertain. Some improvements have been made by implementing digital signatures, using public key cryptography and various other protection mechanisms.

Piracy and illegal content sharing remain the most significant concerns when it comes to using P2P networks, but they can also be curbed using strict license checking and digital identification mechanisms.

Although no technology or protocol is perfect, P2P has great potential in the nearby future as things get more connected with the introduction of internet-enabled smart devices.

We can only conclude that the use of P2P will only increase as more people connect with each other and the world around us.

Peer to peer network, also known as P2P, is a distributed architecture that subdivides the workloads among a vast pool of nodes. It can be seen as a network between two or more computers without any intermediate device like a hub or server. The computers in this setup can share resources among themselves, and they are called nodes or peers. Utorrent is an example of peer to peer network.