Skip to main content

Peer-To-Peer Networks

  • Chapter
  • First Online:
Practical Social Network Analysis with Python

Part of the book series: Computer Communications and Networks ((CCN))

  • 4010 Accesses

Abstract

Peer-To-Peer (P2P) networks are distributed systems that lack any hierarchical organization or centralized control. Peers form self-organizing networks that are overlayed on the Internet Protocol (IP) networks, offering a mix of various features such as robust wide-area routing architecture, efficient search of data items, selection of nearby peers, redundant storage, permanence, hierarchical naming, trust and authentication, anonymity, massive scalability and fault tolerance. These systems go beyond services offered by client-server systems by having symmetry in roles where a client may also be a server. It allows access to its resources by other systems and supports resource-sharing, which requires fault-tolerance, self-organization and massive scalability properties. Unlike Grid systems, P2P networks do not arise from the collaboration between established and connected groups of systems and without a more reliable set of resources to share. The core operation in a P2P network is the efficient location of data items. In this chapter, we will look at two widely-known P2P networks, Chord and Freenet.

Chord [3] is a distributed lookup protocol that addresses the problem of efficiently locating the node that stores a particular data item in a structured P2P application. Given a key, it maps the key onto a node. A key is associated with each data item and key/data item pair is stored at the node to which the key maps. Chord is designed to adapt efficiently as nodes join and leave the network dynamically. FreenetĀ [1] is an unstructured P2P network application that allows the publication, replication and retrieval of data while protecting the anonymity of both the authors and the readers. It operates as a network of identical nodes that collectively pool their storage space to store data files and cooperate to route requests to the most likely physical location of data. The files are referred to in a location-independent manner, and are dynamically replicated in locations near requestors and deleted from locations where there is no interest. It is infeasible to discover the true origin or destination of a file passing through the network, and difficult for a node operator to be held responsible for the actual physical contents of her node.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 84.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 109.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info
Hardcover Book
USD 159.99
Price excludes VAT (USA)
  • Durable hardcover edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

References

  1. Clarke, Ian, Oskar Sandberg, Brandon Wiley, and TheodoreĀ W. Hong. 2001. Freenet: A distributed anonymous information storage and retrieval system. In Designing privacy enhancing technologies, 46ā€“66. Berlin: Springer.

    Google ScholarĀ 

  2. Lua, Eng Keong, Jon Crowcroft, Marcelo Pias, Ravi Sharma, and Steven Lim. 2005. A survey and comparison of peer-to-peer overlay network schemes. IEEE Communications Surveys & Tutorials 7 (2): 72ā€“93.

    Google ScholarĀ 

  3. Stoica, Ion, Robert Morris, David Liben-Nowell, DavidĀ R. Karger, M.Ā Frans Kaashoek, Frank Dabek, and Hari Balakrishnan. 2003. Chord: A scalable peer-to-peer lookup protocol for internet applications. IEEE/ACM Transactions on Networking (TON) 11 (1): 17ā€“32.

    Google ScholarĀ 

  4. Zhang, Hui, Ashish Goel, and Ramesh Govindan. 2002. Using the small-world model to improve freenet performance. In INFOCOM 2002. Twenty-first annual joint conference of the IEEE computer and communications societies. Proceedings. IEEE, vol.Ā 3, 1228ā€“1237. IEEE.

    Google ScholarĀ 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Krishna Raj P. M. .

Problems

Problems

In this exercise, the task is to evaluate a decentralized search algorithm on a network where the edges are created according to a hierarchical tree structure. The leaves of the tree will form the nodes of the network and the edge probabilities between two nodes depends on their proximity in the underlying tree structure.

P2P networks can be organized in a tree hierarchy, where the root is the main software application and the second level contains the different countries. The third level represents the different states and the fourth level is the different cities. There could be several more levels depending on the size and structure of the P2P network. Nevertheless, the final level are the clients.

Consider a situation where client A wants a file that is located in client B. If A cannot access B directly, A may connect to a node C which is, for instance, in the same city and ask C to access the file instead. If A does not have access to any node in the same city as B, it may try to access a node in the same state. In general, A will attempt to connect to the node ā€œclosestā€ to B.

In this problem, there are two networks: one is the observed network, i.e, the edge between P2P clients and the other is the hierarchical tree structure that is used to generated the edges in the observed network.

For this exercise, we will use a complete, perfectly balanced b-ary tree T (each node has b children and \(b\ge 2\)), and a network whose nodes are the leaves of T. For any pair of network nodes v and w, h(v,Ā w) denotes the distance between the nodes and is defined as the height of the subtree L(v,Ā w) of T rooted at the lowest common ancestor of v and w. The distance captures the intuition that clients in the same city are more likely to be connected than, for example, in the same state.

To model this intuition, generate a random network on the leaf nodes where for a node v, the probability distribution of node v creating an edge to any other node w is given by Eq.Ā 6.1

$$\begin{aligned} p_{v}(w) = \frac{1}{Z}b^{-h(v,w)} \end{aligned}$$
(6.1)

where \(Z = \sum _{w \ne v}b^{-h(v,w)}\) is a normalizing constant.

Next, set some parameter k and ensure that every node v has exactly k outgoing edges, using the following procedure. For each node v, sample a random node w according to \(p_{v}\) and create edge (v,Ā w) in the network. Continue this until v has exactly k neighbours. Equivalently, after an edge is added from v to w, set \(p_{v}(w)\) to 0 and renormalize with a new Z to ensure that \(\sum _{w} p(w) = 1\). This results in a k-regular directed network.

Now experimentally investigate a more general case where the edge probability is proportional to \(b^{-\alpha h(v,w)}\). Here \(\alpha > 0\) is a parameter in our experiments.

Consider a network with the setting \(h(T) = 10\), \(b = 2\), \(k = 5\), and a given \(\alpha \), i.e, the network consists of all the leaves in a binary tree of height 10; the out degree of each node is 5. Given \(\alpha \), create edges according to the distribution described above.

46

Create random networks for \(\alpha = 0.1, 0.2, \ldots , 10\). For each of these networks, sample 1000 unique random (s,Ā t) pairs \((s \ne t)\). Then do a decentralized search starting from s as follows. Assuming that the current node is s, pick its neighbour u with smallest h(u,Ā t) (break ties arbitrarily). If \(u = t\), the search succeeds. If \(h(s, t) > h(u, t)\), set s to u and repeat. If \(h(s, t) \le h(u, t)\), the search fails.

For each \(\alpha \), pick 1000 pairs of nodes and compute the average path length for the searches that succeeded. Then draw a plot of the average path length as a function of \(\alpha \). Also, plot the search success probability as a function of \(\alpha \).

Rights and permissions

Reprints and permissions

Copyright information

Ā© 2018 Springer Nature Switzerland AG

About this chapter

Check for updates. Verify currency and authenticity via CrossMark

Cite this chapter

Raj P. M., K., Mohan, A., Srinivasa, K.G. (2018). Peer-To-Peer Networks . In: Practical Social Network Analysis with Python. Computer Communications and Networks. Springer, Cham. https://doi.org/10.1007/978-3-319-96746-2_6

Download citation

  • DOI: https://doi.org/10.1007/978-3-319-96746-2_6

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-319-96745-5

  • Online ISBN: 978-3-319-96746-2

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics