Client-Server and Peer-to-Peer Networking

Client-Server and Peer-to-Peer Networking

In the client-server model of networking when two computers want to exchange information they do so through a central intermediary called a server. If one computer wants to send a file to another, the sending machine (a client) transmits the file to a centralised server where it is stored. The receiving computer (another client) then downloads the file from the central server.

In the peer-to-peer model of networking the sending computer would send the file directly to the receiver and would not use a central server.

An advantage of the client-server model is that the sending computer and the receiving computer do not need to be switched on at the same time. The central server is usually made available 24 hours a day. The sending computer can upload the file and then switch off their machine. The receiving computer can download the file whenever they wish regardless of the status of the sending computer. It would be very inconvenient if you could only download a web page or stream a video when the authors computer was switched on.

Another advantage is that the central server may have more capabilities than either of the sending or receiving client machines. If the file was particularly popular the sending machine may not have the resources to be able to deal with all of the receiving machines trying to download it. However a central server may often have a substantial capability and a large amount of resources that are able to deal with many simultaneous clients.

A disadvantage of the client-server model is that the central server needs to be paid for and maintained. The server may be very expensive. Sometimes businesses offer access to servers at no charge but this is entirely at the discretion of the relevant company and such services may be withdrawn or restricted at any time. It is much cheaper to simply send the file directly from the sending machine to the receiving machine. If the sender and receiver already have access to a broadband connection then a direct peer-to-peer file exchange without a central server is effectively free.

Clever peer-to-peer methods exist to try and mitigate the problems of lack of a central server. A file that is expected to be popular may be distributed to several volunteer machines. Each of the individual machines on which the file is stored may be unreliable and may be switched off at any time. Each individual machine may also lack the resources to serve all of the customers that want to download the file. However, the collection of machines to which the file has been distributed can act in concert as a single reliable server.

A machine that wishes to download a file obtains a list of all of the other machines to which the file has been distributed. It then queries which of the other machines currently has the capability to send the file. It then begins downloading the file from a machine that responds. If that machine is switched off part way through the file download then it contacts another machine on the list and continues downloading the file from there.

Peer-to-peer solutions can now be quite robust and perform well, but even so the client-server model remains the most popular method of information delivery.