Client-Server and Peer-to-Peer Network Model

Client-server and Peer-to-Peer terms are often used in computer networks. Both are the network models that we use in our day-to-day lives. The Client-Server model focuses on information sharing, whereas the Peer-to-Peer network model focuses on connectivity to remote computers. The detailed explanation of both models is the following:-

Client-Server Network Model

In the client-server network model, the device that requests information is called a client, and the device that responds to the request is called a server. The Client-server processes work in the application layer. The client device starts the connection by requesting data from the server. The server can either accept or reject the connection. If the connection is accepted, the server establishes and maintains a connection with the client over a specific protocol.

The application layer protocols explain the data exchange format between clients and servers. The data exchange between the server and client may also require user authentication and the identification of a data file to be transferred.

The email server is one of the best examples of the client-server model, which sends, receives and stores email. The client on a remote location issues a request to the email server for any mail to read. The server then replied by sending the requested email to the client. The data stream from the client to the server is called upload, and the data stream from the server to the client is called download. The figure below illustrates the email client-server Model.

Other examples of servers are web servers, FTP servers, TFTP servers and Online multiplayer gaming servers. Every one of these servers provides resources to the client. Most servers have a one-to-many relationship with clients, meaning a single server can provide resources to multiple clients simultaneously.

Peer-to-Peer Network Model

Like the Client-Server Model, the peer-to-peer network model has no dedicated server; the data is directly accessed from a peer device without a server. The P2P network model has the parts of P2P networks and P2P applications. Both have the same features, but they are a little different in practice.

In this model, two or more hosts are connected using a network and can share resources such as printers and files without having a dedicated server. Each connected end device is known as a peer. The peer can work both as a server and a client. One host might suppose the server role for one transaction simultaneously as serving as a client for another. In the P2P networking model, the client and server roles are set on a per-request basis.

Peer-to-Peer(P2P) Applications

Due to P2P application devices in this model acting both as clients and servers within the same communication, every client is a server and every server a client. The P2P applications need each end device to provide a user interface and run background P2P services.

The hybrid system uses many P2P applications and has decentralized resource sharing. The index database is stored in the centralized directory server. The index is the address of the resource location. Each peer gets access to the index server to get the location of a resource on another peer.

Common Peer-to-Peer (P2P) Applications

Every computer in the network running the P2P application can act as a client and server for other computers running the P2P application. Common P2P networks are the following:

  1. BitTorrent
  2. Utorrent
  3. eDonkey
  4. G2
  5. Bitcoin
  6. Soulseek
  7. eMule
  8. KCeasy
  9. Ares Galaxy
  10. Gnutella

The Gnutella protocol is also used in some P2P applications, where each user shares entire files with all other users. Many Gnutella client applications are available, as well as gtk-Gnutella, Wireshark, Shareaza, and Bearshare.

Many P2P applications permit users to share pieces of many files simultaneously. Clients of this application use a small file called a torrent file to locate other users who have pieces that they need so that they can connect directly to them. This torrent also contains information about tracker computers that track which users’ computers have what files. The torrent clients simultaneously inquire for pieces from multiple users, recognized as a swarm. This is a BitTorrent technology. Many BitTorrent clients exist: BitTorrent, uTorrent, Frostwire, and BitTorrent.

Sharing any type of file between users with the help of this P2P software, more files are copyrighted. Usage and distribution of these files without permission from the copyright holder is against the law. Copyright violation is an offence and results in criminal charges and civil lawsuits.