Peer-to-Peer file sharing, commonly referred to as P2P file sharing, is a type of file sharing system which enables users to share any content over a network (can be the Internet). It does so by connecting two computers directly to each other without the need of a server as opposed to the traditional Client-Server architecture like FTP.

These networks implement data search and transfer protocols above the IP (Internet Protocol)

Some of the popular P2P networks are eDonkey, Gnutella and the infamous BitTorrent.

Before diving deep into P2P file sharing, lets quickly understand what P2P network itself is.

What is peer to peer network?

Peer to peer network is a distributed architecture which divides the workloads among a huge pool of nodes. You can interpret it as a network involving 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.

How do I connect to a P2P network?

To join a P2P network, users need to install P2P software such as BitTorrent. Some P2P software connects to a single network while others can seamlessly work over multiple networks.

Choosing a P2P software depends entirely on the user’s requirements since most of them differ in features and functions.

Some of them focus on user anonymity (such as MUTE) while others help increase the transfer speed (consider VUZE).

Why use P2P file sharing?

P2P is famous all over the world since it offers significant speed and cost advantage over traditional network setups.

Some of the most famous companies which use P2P file sharing include Skype, Bethesda, and Microsoft. Microsoft uses it for the Windows 10 Update distribution system.

Over the years, this technology has drastically improved and now makes use of the distributed system approach which uses the node and edge structure.

How does P2P file sharing work?

A P2P network is entirely different when compared to the Client-Server architecture which requires a central repository called the Server.

The Server acts as a central point to initiate and process user requests. On the other hand, P2P networks do not need a Server and instead enables users to communicate with each other directly.

The main difference between P2P file sharing and Client-Server networks is resource and demands sharing where the system act as both clients and servers for other users.

A user connected to the network is called a Peer. If a peer requests to download a particular file, there might exist several other peers on the network which may or may not have the whole file.

The problem lies in getting the IP address of the peers who are willing to share the resource. This is dependent on what type of architecture the network is based on.

Different architectures of a P2P file sharing system

There are three different architectures which P2P file sharing networks work on

Query Flooding

This method uses the distributed system approach to help find a particular resource on the network.

Now, if a peer asks for a particular file, a requested is initiated to all its neighboring nodes to check if they have the file.

Suppose no neighbor can complete the request, it is then passed onto other neighbors connected to the original peer’s node.

This continues until the file is found or the entire network searched. This process is known as query flooding since it floods the entire network with a query.

How does query flooding work?

When the query is hit with a result, the process of query flooding stops and the address of the peer containing the file is sent back along with its size and name.

If the query flooding gets multiple replies, the peer selects the nearest one.

One drawback of this method is that the query has to be made over the entire network which results in additional traffic overhead and might slow down the network.

Gnutella is the first P2P network which used the decentralized architecture.

Example

Gnutella is an example of Query flooding where users share various media files using the above architecture.

Centralized Directory

As the name suggests, Centralized Directory architecture is similar to the client-server architecture. It maintains a central server to keep track of all the active users on the network providing a directory service.

All the peers report their IP Address to this server which helps other users get data from those who are connected and have the requested resource.

The server sends a query after a fixed interval of time to check the status of the users.

Example

Napster, which was founded in 2001 and used for sharing music files amongst users is an excellent example of this type of architecture.

How does centralized directory Work?

It works the same as the client-server architecture but is different in the sense that it only returns the IP address of the requested resource instead of the actual file acting as a central point for all the users on the network to get the address of other users.

The most famous example which used this architecture was Napster.

The bottleneck is the server itself.

If it crashes, the whole P2P network is brought to a halt, and no file exchange or communication can take place since the server was responsible for maintaining and storing all the IP Address of the nodes on the network making it the single point of failure.

Exploiting Heterogeneity

The latest P2P architecture is known as the Exploiting Heterogeneity architecture and addresses the problems encountered by the previous architectures. It improvises by prioritizing the peers themselves.

How does “Exploiting Heterogeneity” Work?

A peer with higher bandwidth and connectivity is selected and is termed as a supernode/group leader. The rest of the peers are to report to this supernode.

It maintains the list of all the connected peers and is responsible for query handling.

The less active peers have to inform about their current statuses such as their IP address, connectivity and the files available.

Here, the supernode along with its child peers interconnect themselves to form a subset of the P2P file sharing system.

This results in reduced network traffic and almost no to little traffic congestion on the network.

Example

KaZaA is one example where this architecture is implemented. It infuses both Napster and Gnutella in a single network.

The supernodes along with their respective peers act like Napster whereas these supernodes communicate amongst themselves to work like Gnutella.

How is BitTorrent different?

BitTorrent, however, takes a different approach when it comes to file sharing.

Instead of a centralized server which acts as a directory for the network, it uses multiple trackers so even if a tracker (which in itself is a directory) fails, others can help continue the file transfer.

The only disadvantage in this type of system is that the download speed is limited by the trackers which are in charge of monitoring all the users.

So, instead of downloading the whole file from a single source, BitTorrent works by downloading small chunks of a file from many seeders (called peers in P2P) in parallel.

It is a give and take system where all users act both as server and client at the same time.

What are different advantages of using P2P file sharing?

Peer-to-Peer file sharing system offers a huge advantage over the traditional Client-Server by providing serverless file sharing system thus reducing the overall operational cost and the hassles of maintaining a server.

The most significant advantage of using P2P is that with increasing number of users who are sharing the files (called seeds), the overall transfer speed increases when compared to the client-server architecture where more users translate to lower bandwidth per user.

There has been a sharp increase in the percentage of artists who turn to these P2P file sharing networks in recent years.

Labels, bands or individual artists who do not have the required capital to advertise their content look up to these networks for distribution and advertisements.

What are different downsides of using P2P file sharing?

P2P file sharing networks have caused billions of dollars of loss to the music industry which is severely hit by infringement of copyrights and sharing of illegal content.

It is estimated that almost 600 million dollars are lost every year due to illegal downloading of music.

Same is the story with the film and entertainment industry which translate to exponential losses in revenue generation worldwide.

Sometimes users also share their files or information on the network unknowingly or by downloading malicious content which might contain keyloggers or spyware.

Over to you on P2P file sharing

Unfortunately, in recent times, P2P file sharing has been associated with torrents which are infamous for sharing copyrighted and illegal content.

One must always keep in mind and check what he/she might be downloading. Users might even get into legal trouble since illegal ownership of copyrighted material is punishable in certain parts of the world with stringent laws introduced every year.

On the technological front, P2P offers an excellent alternative where huge files have to be shared without incurring the cost of a dedicated server making it cheaper for people to share information amongst themselves and on the internet.

uTorrent and BitTorrent are two applications used on a daily basis by millions of people worldwide which offer connectivity to a P2P file sharing network allowing them to share both illegal as well as legal content.

Peer-to-Peer (P2P) file sharing is a type of file sharing system which enables sharing content through a distributed architecture of computers. Unlike other architectures, it does not need a central server and instead enables users to communicate with each other directly.