Docsity

Understanding Peer-to-Peer (P2P) Systems: History, Advantages, Challenges, and Examples, Study notes of Software Engineering

Partial preview of the text

Download Understanding Peer-to-Peer (P2P) Systems: History, Advantages, Challenges, and Examples and more Study notes Software Engineering in PDF only on Docsity!

Distributed Software

Development

Peer-to-Peer

Chris Brooks Department of Computer Science University of San Francisco Department of Computer Science โ€” University of San Francisco โ€“ p. 1/

Peer-to-Peer

  • Peer-to-peer is often touted as a hot new technology - Really, itโ€™s as old as the Internet (or earlier) - Fundamental idea: all nodes in a network should be capableof the same functionality. - Contrast this with client-server. - In practice, many systems are a hybrid of p2p andclient-server. Department of Computer Science โ€” University of San Francisco โ€“ p. 2/

Examples

  • File sharing apps (Morpheus, Kazaa, Limewire, etc) -

IRC/ICQ

  • SETI@Home/distributed.net - Web caching - VoIP -

SMTP

  • etc Department of Computer Science โ€” University of San Francisco โ€“ p. 4/

Historical examples

USENET

  • Peers within a domain would collect usenet posts andforward them via UUCP, then NNTP. - No central server or repository. -

DNS

  • A hierarchical p2p system Department of Computer Science โ€” University of San Francisco โ€“ p. 5/

Potential advantages of peer-to-peer

  • Reduce server bottlenecks - Move content closer to users - Allow users to publish as well as consume information - Note that publishing and authoring can be differentthings. - Scalability - More able to deal with adaptive, dynamic networks. Department of Computer Science โ€” University of San Francisco โ€“ p. 7/

Challenges of peer-to-peer

  • Finding peers (addressing) - How does a peer join the network? - How do peers identify each other? - Is the network constructed statically, or dynamically? - Does a peer always connect to the same set of peers? Department of Computer Science โ€” University of San Francisco โ€“ p. 8/

Challenges of Peer-to-Peer

  • Other challenges: - Interoperability and standards^ โ€ข Currently, every P2P network has its own protocol -you canโ€™t use a BitTorrent client to search onGnutella. - Dealing with dynamic networks - Security^ โ€ข This includes the distribution of malicious files,protection from snooping, and user authentication. Department of Computer Science โ€” University of San Francisco โ€“ p. 10/

First-generation applications

  • So-called first-generation applications use a centralizedname server. - All user addresses and file indexes are kept there. - This can be used to build an application-leveladdress-resolution protocol. - Napster is the canonical example of this. - Most IM programs also work this way. - Central server is used to search. - Files are transferred between peers. Department of Computer Science โ€” University of San Francisco โ€“ p. 11/

Second-generation models

  • Second-generation models remove the central server. - All file information is distributed. - Advantage: - Potentially more scalable - Legal issues avoided. - Disadvantages: - Search is more complex - Discovery of peers more complicated. Department of Computer Science โ€” University of San Francisco โ€“ p. 13/

Example: Gnutella

  • Gnutella is an example of an open P2P system. - Many clients use the same protocol - LimeWire, BearShare, Gnucleus, etc - Gnutella uses no centralized server - all information is storedat the peers. Department of Computer Science โ€” University of San Francisco โ€“ p. 14/

Example: Gnutella

  • When a peer wants to perform a search, it sends a query toall known nodes. - This request is then forwarded on to nodes one levelaway, who forard it to all nodes they know about, andso on. - This is known as query flooding. - If a hit is found, the node containing the file contactsthe searcher and download begins. Department of Computer Science โ€” University of San Francisco โ€“ p. 16/

Example: Gnutella

  • Problems with Gnutella: - Searching is unreliable - the network is often partitioned. - Search based only on keywords - this produces namingissues.^ โ€ข If I want โ€œLost S1, Ep 3โ€, what do I search for? - Wastes bandwidth forwarding searches to all nodes. - Does not take advantage of network structure^ โ€ข Some peers may have better bandwidth, moreinformation, or a more central network structure. Department of Computer Science โ€” University of San Francisco โ€“ p. 17/

Hierarchical P2P

  • This allows peers with greater resources to do more. - Searches donโ€™t need to be propagated more than isnecessary. - Kazaa is a closed network, so most of its inner workingshave been figured out through reverse engineering. Department of Computer Science โ€” University of San Francisco โ€“ p. 19/

Issues with file distribution

  • File integrity - how do you guarantee youโ€™re getting the fileyou think youโ€™re getting? - md5 or SHA hash of file contents - How can files be shared anonymously? - Virtual addresses and randomized routing can hideidentity. - How to distribute large files? - Download chunks simultaneously from many peers atonce. Department of Computer Science โ€” University of San Francisco โ€“ p. 20/