What is Peer-to-Peer (P2P) File Sharing and How Does it Work?

A P2P network, as understandable from its name, helps transfer files between two ordinary computers (peers); like mine and yours.

P2P as a network contains thousands of computers (peers) connected to each other in an ad-hoc manner. (For an ad-hoc network the number of peers, peers adding on to the network and peers leaving the network don’t have a noteworthy impact on the network.) This means that any user can join in the network or leave it on his own without disturbing the network’s functionality.

The term ‘Peer-2-Peer file transfer’ doesn’t quiet makes a sense to everybody. For instance, one might think of a simpler name like file transfer network (assuming it obvious to have a sender if there is something to be received). Yes, there always has to be a sender if there is a recipient, but traditionally networks don’t have a peer transferring file to another Peer.

To understand the P2P file transfer, and how is it different from former methods, let us first get an insight of how these traditional file transfers were carried out .

How are P2Ps Different From Traditional File Transfer Methods?

The FTP:

The most prevalent file transfer protocol is the File Transfer Protocol (FTP). File transfer using the FTP, in common language is referred as Client-Server file transfer. As the name suggests, the file is downloaded from a single source (the file server) by the destination/PC (a client).

The prime problem in this FTP scheme is the server failure that occurs whenever a file is popular and reasonably larger. When many clients (more than what a server can serve) attempt to download a particular file, the server capacity overshoots resulting in the service being halted for everyone; not the ones beyond the capacity line.

The P2P:

Since a P2P network does not involves a server, the control tasks have to be taken over by a software; installed on every user’s PC to connect to the network. (Most popular P2P softwares are Kazaa, Limewire and Gnutella).

The software serves several purposes. It provides the user interface, connects to other online computers running the same platform software and maintains the network, and locates the files a user wants.

The network is established by a peer finding some other peers to connect to. Each peer then exchanges the addresses of all connected-peers with all other peers connected to it.

In this way, a network is established and user can now search for files by using the hop and ask method.

Now . . . How do u find a file on such networks ?

The P2P softwares follow Publish-Subscribe (Pub-Sub) network architecture. In plain words, a Pub-Sub architecture works as a topic-based sharing system.  Unlike FTP, Pub-Sub file hosts (ordinary computers) label each file with a tag (this is called Publishing the file and the file-name is its default tag) instead of directly transferring it to the recipient. Once a user asks for a specific file by calling its tag (this act is called Subscribing), the sender then allows the transfer.

Four different colored tags in the fig above designate the distribution of four different files on different computers across the P2P network. When a user of a certain computer asks for a file he does not has, the computer queries all the other peers connected to it and searches the network by hopping the connected peers.

All those replying positively make the query-maker legitimate to start the file download.

If a file is available to download from multiple sources, the file will be downloaded from multiple pieces simultaneously. This can make the download faster (however, maximum download speed will be defined by your connection’s top speed even if there are unlimited number of sources available . . . logical).

Multiple-source download does not means that you’ll be downloading multiple copies of files. You are actually downloading one file in several pieces from multiple users, which are assembled when the download completes.

The downloaded file present now available on the user’s hard disk now serves as a source for other peers seeking it . . . and the cycle goes on !

  • Kaza and new version of Kazalit plus Emule are best p2p softwares i used there are many in dozons avaialble one net you can dowload for free as they come with free and paid versions
    in free there is an Built in Add dispaly and it keep teasing you but in purchased copy there is no such nonsence

    i used two said above , i used these about couple of years ago now there must be lot of upgrading in these applications but these were best
    if you use them for IT or education purpose then Good!
    Plus lot of films songs software lot lot of things you can download for free

    There is also dark side of these P2P programes but its in your own hands as you can go for porn movies for download etc…

    Any way P2P Is great but always there are threats of Virs and one should use Firewall along with Antivirs to avoid Virs and other problems etc.. with Antivirs & firewall (for example Zone Alarm is great ) threats can be minimized not fully secured.

  • @ Shafiq,

    You are right Kazaa and new version of Kazaalite is used to be good, but now it’s not. I have used Kazaa back in 1999 and it was the first file sharing network which I have used. Now, with Kazaa or Kazaa Lite or any Kazaa related websites all of them are not secure enough and you could catch a virus whether you are using any internet security or Anti virus program on your PC. No matter you have the best security installed on your PC, it won’t catch or detect any virus coming through Kazaa or P2P file sharing network.

    So, I would recommend to those people who are using P2P network make sure you won’t catch any virus.

    Best of luck

    Network Admin

  • I normally prefer the torrents, its also P2P but more controlled environment. Also for torrents one have lots of feedback available on each file, so if there is a virus or low quality or fake file, only few people will suffer and with feedback of first few people other soul would be saved. :-)

    Regarding P2p, about two times I had installed such softwares but didn’t used much, once back in around 2000 with dial-up, the reason to discontinue was very much poor download speeds even less than a KB which is much less than dailup standard, then again it very file to file , don’t remember which P2p SW was it.

    Again when used it was with broadband, but un-installed it due to the virus/security risks.

    I think we find every thing on torrents which one may expect to find via a p2p file sharing SWs.

  • I’m really loving this idea/design of your blog What is Peer-to-Peer (P2P) File Sharing and How Does it Work? , Do you actually run into any browser compatibility problems… A small number of my blog visitors sometimes complained about our site not operating appropriately inside Internet Explorer although great in Opera. Have you got any kind of recommendations to aid fix the problem? OMG how about Tunisia eye-popping announcement… Thanks ! Rob Rasner YouTube

  • I was actually considering doing something like this on my blog do you have any references?

  • close