How is Peer-to-Peer programming different from a client and server protocol?

Posted on 2011-04-27
Medium Priority
Last Modified: 2012-05-11
Explain in layman's term the concept of peer-to-peer protocol , How is it different from ordinary client and server protocol?

Where can I find a simple peer to peer program example that illustrate the peer concept?
I have google and searched for weeks but I still do not understand the concept.

I would also like a peer to peer file sharing example if thats available?
Question by:Jgreer2011
  • 2
  • 2
LVL 16

Expert Comment

by:Bryan Butler
ID: 35477836
Peer to peer is where both sides act as clients and servers, whereas client/server stay client/server.  A simple one may be hard to find, but there are examples.  This one even give a sample for both ways.


And here's some more info:

As far as file-sharing examples, a simple one may be harder to find but there are open source ones:


Author Comment

ID: 35479893
Will review sites now

Author Comment

ID: 35479960
Are peer to peer protocols implemented in C on Linux Networks or mostly done through using Java on Windows OS? I am asking because I have not found examples using C and that can work with simple command prompt windows.

Expert Comment

ID: 35481221
> How is it different from ordinary client and server protocol?
It is no different from client/server programming.
It also will use the same socket API's to connect.
But, it makes use of the concept of distributed networking.
Here is an explanation from HowStuffWorks: http://computer.howstuffworks.com/bittorrent1.htm

Since it makes use of distributed networking, the architecture itself is complex.
So, you cannot find a simple example code which can explain this.
LVL 16

Accepted Solution

Bryan Butler earned 2000 total points
ID: 35483550
There are some in C on Linix networks and there are java ones on windows, but it would be hard to say if more are done one way or another.  It would be hard to find any "samples" per say, much less that use C, as this is a very complex app as ssnkumar pointed out.  This may help:


Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Have you thought about creating an iPhone application (app), but didn't even know where to get started? Here's how: ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ Important pre-programming comments: I’ve never tri…
Configuring network clients can be a chore, especially if there are a large number of them or a lot of itinerant users.  DHCP dynamically manages this process, much to the relief of users and administrators alike!
The goal of this video is to provide viewers with basic examples to understand how to create, access, and change arrays in the C programming language.
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…

839 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question