Introduction to Peer to Peer (P2P) Network
Peer to peer or simply p2p is a decentralized network communications model where the peers are computer systems connected with each other. Interesting thing is that with peer to peer communication is done without a central system (Server), in other words, every peer in the network is a server and a client. Pros of using peer to peer (p2p) are protecting user privacy, lower server costs, etc. Torrents are an example of an anonymous p2p protocol where files are hosted for others to download them.
-
Advantages
- No need for expensive server, and for network manager.
- Less network traffic than centralized client/server network.
- Extremly scalable, adding new peers is very easy.
- Difficult to take down, if you shot down couple of the peers, the other continue to work.
-
Disadvantages
- The data is not organized into specific shared area, sometimes it might be hard to locate the files.
- There is litle to no security.
How peer-to-peer (p2p) network works
In a standard centralized network when a user downloads a file, the user opens a web browser, visit the URL where the file is located and downloads the file. In this case, the website acts as a server and the user computer as a client that receives the data. This is the one-way data transfer where downloaded files are transferred from point A, the server to point B, the user.
A network based on the client-server model (Source: Wikipedia)
When the same file is downloaded through a peer-to-peer network, the process is handled differently. Here the user has to pre-install peer-to-peer software, which creates a virtual network of peer-to-peer users when the user downloads the file is received in bits that are transferred from other peers in the network that already has the file. At the same time as the data is received, it is also sent to the other peers in the network that ask for it. This situation is different because it is a two-way data transfer.
A peer-to-peer (P2P) network (Source: Wikipedia)
Architecture of peer-to-peer network
Every peer in peer-to-peer network architecture has the same responsibilities, every peer is a server and a client. We can classify a peer-to-peer network in three types unstructured, structured and hybrid networks where they are between the two.
The unstructured peer-to-peer networks doesn't have a particular structure on the overlay network design. They are formed by nodes randomly from connection to each other. Because there is no structure, unstructured peer-to-peer networks are easy to build but are not very efficient.
Overlay network diagram for an unstructured P2P network (Source: Wikipedia)
In structured peer-to-peer networks the overlay is organized, and every node can efficiently search the network for the desired data.
Overlay network diagram for a structured P2P network (Source: Wikipedia)
Conclusion
Peer-to-peer is a technology born and based on a very simple principle, and that is decentralization. There are a lot of people for it and against it because of distributing copyrighted content unlawfully. However peer-to-peer as a concept has inspired many new philosophies in many areas of human interaction.
Tweet