Skip to main content

Client-Server and P2P Networking

Client Server Architecture
In this Architecture, many clients request and receives from the servers. All the content and services are stored and provided by a server.

Such centralization of the client-server architecture raises a series of issues which are caused by the limitation of resources at server side, such as network bandwidth, CPU capabilities, Input/Output(IO) speed and storage space.
Grid Architecture
Grid computing is rapidly emerging from the scientific and academic area to the industrial and commercial world. Current Grid computing systems are promminent implementations of client-server architecture for distributed computing.

Main focus of Grid architecture is on interoperability among resource providers and users in order to establish the sharing relationship which needs common protocols at each layer of architecture.
Peer to Peer Architecture
P2P networks are decentralised distributed systems and enable computers to share and integrate their computing resources, data and services. P2P architecture doesnot rely on a centralised server to provide services.

Each peer node acts as both client and server , requesting resources from as well as routing queries and serving resources for other peer nodes. A P2P network is a logical overlay network over a physical for other peer node. A P2P network is a logical overlay network over a physical infrastructure.
Evolution of Peer-to-Peer Networks
There are many interesting types of P2P applications, including file sharing, instant messaging, VoIP, Streaming media, High Performance Computingn, Search engine.
Existing P2P file sharing networks can be divided into three categories :
- Centeralised P2P networks
- Decentralised P2P networks
- Hybrid P2P networks

Centeralised Peer-To-Peer Networks
First Generation of P2P Systems(e.g. Napster) started with the concept of centeralisation. The server in centeralised P2P networks only keep the meta-information about shared content (e.g. addresses or ID of peer nodes where the shared content is available) rather than storing content on its own.
- Napster
Napster was the first widely-used P2P music sharing service. To participate in the Napster network, new users need to register to the Napster server and publish a list of files they are willing to share. To search for a shared file in the network, users can request and retrieve a list of providers hosting the files which match the query. File transfer takes place without the Naspter server Participating.
- BitTorrent
BitTorrent is designed to distribute large amounts of data without incurring the corresponding consumption in server and bandwidth resources. In order to share a file or a group of files , user need to create a small .torrent file that contains the address of tracker machine that launches the files distribution.
The .torrent file is published on well known websites , so that other users can find and download the .torrent file of interest using web search engines.
The .torrent file is opened by the BitTorrent client software. The client software connects to the tracker machines recieve a list of peer nodes that are participating in transferring the file. In order to distribute a files efficiently, a file is broken into smaller fragments ( typically 256 KB each) for transmission.

Decentralised Peer-To-Peer Networks
To address the problem of centralised P2P networks(each scalability , single-point-of-failure and legal issues) , decentralised peer-to-peer networks become widely used, which do not rely on any central server.
- Gnutella
It is a decentralised file-sharing P2P network, which is built on an open protocol developed to enable the peer node discovery , distributed search , and file transfer. Each gnutella user needs a gnutella client software to join the gnutella network. The client software on intial use can bootstrap and find a number of possible working peer nodes in the network and try to connect to them. if some attempts succeed , these working nodes will then become a new node's neighbours and give new node their own lists of working nodes. The new node continues to connect to these working peer nodes , until it reaches a certain quota. Gnutella network also supports content lookup and query routing. Gnutella nodes take over routing functionalities intially performed by the napster server. In this network , each peer ndoe uses a BFS (Breadth First Search) mechanism to search the network by broadcasting the query with a Time-To-Live to all connected peer nodes. TTL represents the number of times a message can be forwarded before it is discarde.

Hybrid Peer-To-Peer Networks
To avoid problem of centralised and decentralised P2P networks , hybrid P2P networks are emerging recently to provide trade-off solutions with hierarchical architecture.
- Kazaa
Kazaa reorganises peer nodes into a two level hierarchy with super nodes and leaves.supernodes are capable and reliable peer nodes that take more responsiblity for provinding services in the network. A supernode is a temporary index server for other peer nodes. The peer nodes with high computing power and fast network connection automatically become supernodes.
Similar to Bootstrapping , Newly joined will attempt to contact an active supernode from a list of supernodes offered by kazaa client software. The newly joined node will send the list of files it shares to the connected supernodes and further retrieve more active supernodes from the connected supernodes for future connection attempts.
In kazaa , each leave node begins a lookup by sending a lookup request to its connected supernode. The supernode not only checks the local index for file request but also communicates to other supernodes for a list of addresses of peer nodes sharing the files.