Skip to main content

Peer to Peer systems

This Segment we will explore the Peer to Peer systems.
Napster featured a hybrid architecture in which the directory was stored on a server but peers directly transferred files between them.
Applications :
Number of peer-to-peer file sharing systems were developed to avoid legal challenges faced by Napster. The Majority of those second-generation file sharing systems were based on unstructured overlays. These systems dont any mechanisms for protecting the rights of content owners. Skype uses a superpeer model, and the superpeers support NAT traversal for connecting peers behind NATs.
Characteristics found in most P2P systems:
- RESOURCE SHARING
- NETWORKED
- DECENTRALIZATION
- SYMMETRY
- AUTONOMY
- SCALABLE
- STABILITY
Within a maximum churn rate, the P2P system should be stable, i.e, it should maintain its connected graph and be able to route deterministically within a practical hop-count bounds. Exact number of nodes or peers that leaves / joins p2p network through a given time.
Business Models :
Advertising mechanism used in web search ( Impressions , cost-per-click, placements). The search results are produced by the search engine, and in parallel the search keywords and other criteria are used to select ads which will be composed with the search results, resulting in an impression for each displayed ad. Each time an impression occurs , a counter is updated in the advertisement analytics database. If the user clicks on ad , the embedded url leads to advertiser's web page. A click counter must be updated in the advertisement analytics database. Two ways to obtain this are to indirectly forward the ad url via a specific search engine web server or to embed the a script in the advertiser's web page which invokes the search engine's url when loaded.
P2P Overlays
Unstructured Overlays
An unstructured overlay is "an overlay in which a node relies only on its adjacent nodes for delivery of messages to other nodes in the overlay. Example message propagation strategies are flooding and random walk.
Structured Overlays
A structured overlays is an overlay is which nodes cooperatively maintain routing information about how to reach all nodes in al overlay. Compared to unstructured overlays, structured overlays provide a limit on the number of messages needed to find any object in the overlay. Each Peer has a local routing table which is used by the forwarding algorithm. The Peers routing table is initialized when the peer joins the overlay, using a specified bootstrap procedure. Peers periodically exchange routing table changes as part of overlay maintainance. Majority of structured overlays use key-based routing. A distributed hash table (DHT) is a structured overlay that use key-based routing for put and get index operations and in which each peer is assigned a portion of DHT index.
Hierarchical and Federated Overlays
Heirarchical Overlay
It is an overlay architecture that uses multiple overlays arranged in a nested fashion and the nested overlays arranged in anested fashion, and the nested overlays are interconnected in a tree. A message to a peer in a different overlay is forwarded to the nearest comon parent overlay in the hierarchy.
Federated Overlay
It is an overlay that is formed from a collection of independent overlays each implemented by seperate administrative domain, and which may use different routing algorithms and addressing mechanisms in each domain. Each domain manages the authentication , authorization and other management tasts for its overlay.
Individual overlays operate as usual according to the specific overlay algorithm. Pairs of overlays connecte through gateway peers. Gateway peers can discover the other peers for other overlays by different means such as a lookup in an interconnecting overlay or by DNS.
Service overlays
To accelerate the deployment of new services and avoid the network infrastructure , many network services have been implemented as application layer protocols using end systems attached to the network. This includes multicasting , VoID and content delivery networks (CDNs). When an overlay is used as the basis for such application layer services , it is reffered to as a service overlay.
Semantic Overlays
It is an overlay network in which routing topology is organized acc to the semantic associations and relationship of information being stored in the overlay.

Churn and Overlay Maintenance
Overlay network is a computer network built on top of a existing network usually the internet. Peers may join or leave the overlay at any time. A candidate peer needs to discover an existing peer by which to join the overlay. The process discovering and contacting an existing peer is called peer bootstrap. such as contacting bootstrap server or making local broadcast anouncements. If a peer is disconnected without a notifications , neighbour use a hearbeat mechanism to detect the departure and trigger the corresponding routing and object state updates. Churn is the arrival and departure of peers to and from the overlay, which changes the peer population of the overlay.
Mobility in P2P overlay Mobile devices have four properties that affect their interaction with the overlay in ways different from conventional desktop computers :
- Roaming
- Energy Limitation
- Node hetrogeneity
- Multi homed interfaces

Network Raoming causes address changes , re-binding the overlay address to the IP address is effectively a leave-join sequence, leading the mobility-induced churn. Approaches to mitigating mobility-induced churn include use of Mobile IP at native layer , treating mobile nodes as stealth nodes and designating a non-mobile node as a virtual home agents for a mobile node.
Energy Limitations of nodes increase the likelihood of a node going into a stand-by stand state. In today's overlay's this is likely to cause the node disconnect from the overlay.
Multi Homed nodes are nodes that can connect to two or more different network interface at the same time. This could be used to provide the redundant paths for peers to send and receive messages , which might reduce the impact of mobility induced churn.
Overlay's for MANETs and AdHoc networks
A mobile ad hoc network is a set of nodes which act as both routers and hosts in an ad hoc wireless network. The nodes route messages to other nodes without using a network infrastructure but the problem is that MANETs are restricted by limited power and can only transmit messages to nearby nodes.
Due to similarity between the P2P and MANETs at both the application and network layer , there has been significant interest in adpating the P2P overlays to work efficiently with MANETs routing protocols.
P2P Content Access and Delivery
To improve content accessing scalabilty , (CDN) Content Delivery Network was invented and widely deployed in the last ten years. The evolution of CDN where a single sited content server is replaced by a set of distributed content servers placed strategically to provide not only better distribution of files but also better streaming of real-time media has many advantages.
Multicast is an effective content delivery method with reduced network bandwidth requirement.
Just like centeralized conetent delivery systems, content can be delivered via downloading or streaming to end users in P2P networks.
At delivery , a media stream is segemented into data blocks that are delivered via flooding or via a topology defined specific route in P2P overlay network.
Content Search
Searching is a key step in data access. It is certainly the case in P2P content access as well. P2P networks take advantage of the distributed resources at peer nodes. Contents are scattered duplicated in the P2P network in a distributed fashion. Hence, content retrieval in a P2P network needs to contemplate the specific network model as well as characteristics of the content being accessed.
Most structures P2P networks support static key and ID based object lookups while unstructured P2P networks can handle certain complex type of queries such as range queries.
Many people associate DHT with P2P search this is because DHT based object lookup is a widely adopted search scheme in structured P2P networks.
A query that retrieves all objects between upper and lower bound i.e. an exclusive range called range query.
P2P Streaming and Multicasting
Streaming refers to the delivery method where content is being consumed while it is being transprted.
In a P2P network , content can be streamed via tree based or a mesh based overlay.
When there are multiple clients (receivers) simultaneously requesting / recieveing the same media stream in a streaming application , multicast can be implemented. Multicast is a special type of streaming where protocols are defined to delivery a packet to a group of destinations at same time using efficient strategies.
A P2P overlay multicast system should implementent :
- Session Identification
- Session initiation/creation
- Session subscription/graceful departure
- Session message dissemination/data forwarding
- Session fault tolerance/tree reformation at peer failure
- Session termination
- Session admission control
- Content access control and security
Caching and Replication
In P2P networks, data objects may be duplcated and saved temporarily or permanently on multiple peers. Caching and Replication play key roles in reducing network bandwidth usage and origin server load and bandwidht requirement, reducing client side latency, and improving load balance , data availability, system reliability, and data access latency in P2P network.