Slides for Chapter 10: Peer-to-Peer Systems

Similar documents
Slides for Chapter 10: Peer-to-Peer Systems. From Coulouris, Dollimore, Kindberg and Blair Distributed Systems: Concepts and Design

Chapter 10: Peer-to-Peer Systems

Distributed Systems Peer-to-Peer Systems

Motivation for peer-to-peer

Chapter 10 Peer-to-Peer Systems

Distributed Information Processing

Lecture 13: P2P Distributed Systems

CS555: Distributed Systems [Fall 2017] Dept. Of Computer Science, Colorado State University

(C) Chukiat Worasucheep 1

Chapter 10 Peer-to-Peer Systems

Peer- Peer to -peer Systems

Distributed Systems. peer-to-peer Johan Montelius ID2201. Distributed Systems ID2201

CS6601 DISTRIBUTED SYSTEM / 2 MARK

Middleware and Distributed Systems. Peer-to-Peer Systems. Peter Tröger

Overlay networks. Today. l Overlays networks l P2P evolution l Pastry as a routing overlay example

12/5/16. Peer to Peer Systems. Peer-to-peer - definitions. Client-Server vs. Peer-to-peer. P2P use case file sharing. Topics

Architectures for Distributed Systems

Telecommunication Services Engineering Lab. Roch H. Glitho

Peer-to-peer computing research a fad?

Peer-to-peer systems

08 Distributed Hash Tables

A Survey of Peer-to-Peer Content Distribution Technologies

Telematics Chapter 9: Peer-to-Peer Networks

Distributed Hash Tables: Chord

Peer-to-Peer Internet Applications: A Review

INF5071 Performance in distributed systems: Distribution Part III

Overlay networks. To do. Overlay networks. P2P evolution DHTs in general, Chord and Kademlia. Turtles all the way down. q q q

Peer-to-Peer Systems. Chapter General Characteristics

Overlay and P2P Networks. Structured Networks and DHTs. Prof. Sasu Tarkoma

P2P Network Structured Networks (IV) Distributed Hash Tables. Pedro García López Universitat Rovira I Virgili

INF5070 media storage and distribution systems. to-peer Systems 10/

Introduction to Peer-to-Peer Systems

Peer-to-peer systems and overlay networks

Peer-to-Peer Systems. Network Science: Introduction. P2P History: P2P History: 1999 today

Department of Computer Science Institute for System Architecture, Chair for Computer Networks. File Sharing

Content Overlays. Nick Feamster CS 7260 March 12, 2007

Modern Technology of Internet

Peer to Peer Networks

DISTRIBUTED COMPUTER SYSTEMS ARCHITECTURES

Peer-to-Peer Systems and Distributed Hash Tables

Chapter 6 PEER-TO-PEER COMPUTING

Secure Distributed Storage in Peer-to-peer networks

Making Gnutella-like P2P Systems Scalable

Peer-to-Peer Networks Pastry & Tapestry 4th Week

Peer to Peer Networks

Today. Why might P2P be a win? What is a Peer-to-Peer (P2P) system? Peer-to-Peer Systems and Distributed Hash Tables

Distributed Hash Tables

Peer-to-Peer (P2P) Systems

Web caches (proxy server) Applications (part 3) Applications (part 3) Caching example (1) More about Web caching

Peer-to-Peer Networks

Scalable overlay Networks

Distributed Knowledge Organization and Peer-to-Peer Networks

Unit 8 Peer-to-Peer Networking

Module SDS: Scalable Distributed Systems. Gabriel Antoniu, KERDATA & Davide Frey, ASAP INRIA

Kademlia: A P2P Informa2on System Based on the XOR Metric

P2P Network Structured Networks: Distributed Hash Tables. Pedro García López Universitat Rovira I Virgili

CS 640 Introduction to Computer Networks. Today s lecture. What is P2P? Lecture30. Peer to peer applications

The Design and Implementation of a Next Generation Name Service for the Internet (CoDoNS) Presented By: Kamalakar Kambhatla

Introduction on Peer to Peer systems

Distributed Hash Table

A Survey on Peer-to-Peer File Systems

Scalable overlay Networks

Distributed Systems. Characteristics of Distributed Systems. Lecture Notes 1 Basic Concepts. Operating Systems. Anand Tripathi

Distributed Systems. Characteristics of Distributed Systems. Characteristics of Distributed Systems. Goals in Distributed System Designs

March 10, Distributed Hash-based Lookup. for Peer-to-Peer Systems. Sandeep Shelke Shrirang Shirodkar MTech I CSE

Definition of a DS A collection of independent computers that appear to its user as a single coherent system.

Overlay networks. T o do. Overlay networks. P2P evolution DHTs in general, Chord and Kademlia. q q q. Turtles all the way down

Towards Benchmarking of P2P Technologies from a SCADA Systems Protection Perspective

CS4700/CS5700 Fundamentals of Computer Networks

Distributed Hash Tables

internet technologies and standards

Introduction to P2P Computing

Early Measurements of a Cluster-based Architecture for P2P Systems

Distributed Hash Tables

A Common API for Structured Peer-to- Peer Overlays. Frank Dabek, Ben Y. Zhao, Peter Druschel, Ion Stoica

Lecture 6: Overlay Networks. CS 598: Advanced Internetworking Matthew Caesar February 15, 2011

CPSC 426/526. P2P Lookup Service. Ennan Zhai. Computer Science Department Yale University

Searching for Shared Resources: DHT in General

CSE 124 Finding objects in distributed systems: Distributed hash tables and consistent hashing. March 8, 2016 Prof. George Porter

EECS 122: Introduction to Computer Networks Overlay Networks and P2P Networks. Overlay Networks: Motivations

Distributed Meta-data Servers: Architecture and Design. Sarah Sharafkandi David H.C. Du DISC

Distributed hash table - Wikipedia, the free encyclopedia

Challenges in the Wide-area. Tapestry: Decentralized Routing and Location. Key: Location and Routing. Driving Applications

Distributed Systems. 17. Distributed Lookup. Paul Krzyzanowski. Rutgers University. Fall 2016

Subway : Peer-To-Peer Clustering of Clients for Web Proxy

Data Replication under Latency Constraints Siu Kee Kate Ho

CS514: Intermediate Course in Computer Systems

P2P Network Structured Networks: Distributed Hash Tables. Pedro García López Universitat Rovira I Virgili

: Scalable Lookup

Challenges in the Wide-area. Tapestry: Decentralized Routing and Location. Global Computation Model. Cluster-based Applications

Performance and dependability of structured peer-to-peer overlays

Searching for Shared Resources: DHT in General

Peer-To-Peer Techniques

Internet Technology. 06. Exam 1 Review Paul Krzyzanowski. Rutgers University. Spring 2016

Overlay Networks: Motivations. EECS 122: Introduction to Computer Networks Overlay Networks and P2P Networks. Motivations (cont d) Goals.

Internet Technology 3/2/2016

Should we build Gnutella on a structured overlay? We believe

GNUnet Distributed Data Storage

Overlay and P2P Networks. Structured Networks and DHTs. Prof. Sasu Tarkoma

6. Peer-to-peer (P2P) networks I.

Transcription:

Slides for Chapter 10: Peer-to-Peer Systems From Coulouris, Dollimore, Kindberg and Blair Distributed Systems: Concepts and Design Edition 5, Addison-Wesley 2012

Overview of Chapter Introduction Napster and its legacy Peer-to-peer middleware Routing overlays Overlay case studies: Pastry, Tapestry Application case studies: Squirrel, OceanStore, Ivy 2

Introduction Goal: Provide fully decentralized and self-organizing, dynamically balancing the storage and processing loads as nodes join and leave Characteristics of peer-to-peer systems: Each user contributes resources (files, computing cycles, etc.) Each node has similar functional capability No centrally administered systems Provide anonymity to providers and users of resources Require algorithms for data placement, and for workload balances so that nodes do not suffer undue overhead 3

Introduction (cont.) Three generations of peer-to-peer systems: Napster (music exchange) Freenet, Gnutella, Kazaa, BitTorrent (file sharing) Pastry, Tapestry, CAN, Chord, Kademlia (peer-to-peer middleware Resources identified by GUIDs (Globally Unique Identifiers) using secure hashing Suitable for storing immutable objects (music, video) Overlay (application-level) routing used instead of IP routing 4

Figure 10.1: Distinctions between IP and overlay routing for peer-topeer applications IP Application-level routing overlay Scale Load balancing Network dynamics ( addition/deletion of objects/nodes) Fault tolerance Target identification Security and anonymity IPv4 is limited to 232 addressable nodes. The IPv6 name space is much more generous (2128), but addresses in both versions are hierarchically structured and much of the space is pre-allocated according to administrative requirements. Loads on routers are determined by network topology and associated traffic patterns. IP routingtables are updated asynchronously on a best-efforts basis with time constants on the order of 1 hour. delays. Redundancy is designed into the IP network by its managers, ensuring tolerance of a single router or network connectivityfailure. n-fold replication is costly. Each IP address maps to exactly one target node. Addressing is only secu re when all nodes are trusted. Anonymity for the owners of addresses is not achievable. Peer-to-peer systems can address more objects. The GUID name space is very large and flat (>2128), allowing it to be much more fully occupied. Object locations can be randomized and hence traffic patterns are divorced from the network topology. Routing tables can be updated synchronously or asynchronously with fractions of a second Routes and object references can be replicated n-fold, ensuring tolerance of n failures of nodes or connections. Messages can be routed to the nearest replica of a target object. Security can be achieved even in environments with limited trust. A limited degree of anonymity can be provided.

Introduction (cont.) Can also be used for distributed computation (e.g. SETI) 6

Napster and its legacy Goal: Distributed file sharing system Users supply files for sharing (stored on their own computers) Launched in 1999, had several million users Closed for music copyright infringement violations System architecture: Centralized indexing system for locating files Users share file by linking to indexing service Load distribution mechanism to locate closest file copy to a requester Assumes files are static (do not change) Does not worry about consistency of replicas (of same song) 7

Figure 10.2: Napster: peer-to-peer file sharing with a centralized, replicated index peers Napster server Index 1. File location requ est 2. List of peers offering the file 3. File request Napster server Index 5. Index update 4. File delivered

Peer-to-peer middleware Functional requirements: Simplify the construction of services that are implemented across many hosts Enable client to locate any resource Add and remove resources dynamically Add and remove hosts (computers) Non-functional requirements: Global scalability Load balancing Optimizing local interactions among neighboring peers Highly dynamic host availability Security, anonymity, deniability, resistance to censorship 9

Routing overlays Requirements: Distributed algorithm responsible for locating nodes and objects Routing algorithm in the application layer, different than network layer (IP) routing Objects replicated and placed on nodes and can be relocated without client involvement Routing can locate nearest copy of desired object GUID an example of a pure name that does not reveal object location Main tasks of routing overlay: Routes request to access object via its GUID to a replica Adding a new object requires computing a new GUID and announces it Deleting an object makes all copies unavailable Adding and removing new nodes 10

Routing overlays GUID: Computed from part of object state (e.g. its name) using hashing Each GUID must be unique Sometimes called DHT (Distributed Hash Tables) Distributed object location and routing (DOLR) layer: Maintains mapping between GUIDs and nodes where object is stored DOLR approach separated locating object from other routing functions DOLR may or may not be used 11

Figure 10.3: Distribution of information in a routing overlay AÕs routing knowledge DÕs routing knowledge C A D B Obj ect: Node: BÕs routing knowledge CÕs routing knowledge

Figure 10.4: Basic programming interface for a distributed hash table (DHT) as implemented by the PAST API over Pastry put(guid, data) The data is stored in replicas at all nodes responsible for the object identified by GUID. remove(guid) Deletes all references to GUID and the associated data. value = get(guid) The data associated with GUID is retrieved from one of the nodes responsible it.

Figure 10.5: Basic programming interface for distributed object location and routing (DOLR) as implemented by Tapestry publish(guid ) GUID can be computed from the object (or some part of it, e.g. its name). This function makes the node performing a publish operation the host for the object corresponding to GUID. unpublish(guid) Makes the object corresponding to GUID inaccessible. sendtoobj(msg, GUID, [n]) Following the object-oriented paradigm, an invocation message is sent to an object in order to access it. This might be a request to open a TCP connection for data transfer or to return a message containing all or part of the object s state. The final optional parameter [n], if present, requests the delivery of the same message to n replicas of the object.

Pastry Routing overlay with 128-bit GUIDs GUID computed by a secure hash function such as SHA-1 (see Chapter 11) using public key of node Typically hash function is applied to the object name (or another known part of the object state) 0 <= GUID <= 2 128-1 Routing performance: Order of log N steps when N nodes participate in system Routing overlay built over UDP Network distance between nodes based on hop counts and round trip latency used to set up routing tables at each node 15

Pastry Routing algorithm stage 1: Each node keeps a leaf set contains nodes closest to current node GUID space can be visualized as a circle If node A receives a routing request for node D, it finds closest node in its leaf set to D to forward the message Routing algorithm stage 2: Each node keeps a tree-structured routing table Entries include (GUID, IP address) of a set of nodes 16

Figure 10.6: Circular routing alone is correct but inefficient Based on Rowstron and Druschel [2001] 0 FFFFF...F (2 128-1) D4 71F1 D4 67C4 D4 6A1C The dots depict live nodes. The space is considered as circular: node 0 is adjacent to node (2128-1). The diagram illustrates the routing of a message from node 65A1FC to D46A1C using leaf set information alone, assuming leaf sets of size 8 (l = 4). This is a degenerate type of routing that would scale very poorly; it is not used in practice. D1 3DA3 65 A1FC

Figure 10.7: First four rows of a Pastry routing table The routing table is located at a node whose GUID begins 65A1. Digits are in hexadecimal. The n s represent [GUID, IP address] pairs specifying the next hop to be taken by messages addressed to GUIDs that match each given prefix. Grey- shaded entries indicate that the prefix matches the current GUID up to the given value of p: the next row down or the leaf set should be examined to find a route. Although there are a maximum of 128 rows in the table, only log16 N rows will be populated on average in a network with N active nodes.

Figure 10.8: Pastry routing example Based on Rowstron and Druschel [2001] 0 FFFFF...F (2 128-1) Routing a message f rom node 65A1FC to D46A1C. With the aid of a well-populated routing table the message can be delivered in ~ log 16 (N ) hops. D4 71F1 D4 6A1C D4 67C4 D4 62BA D4 213F D1 3DA3 65 A1FC

Figure 10.9: Pastry s routing algorithm To handle a message M addressed to a node D (where R[p,i] is the element at column i, row p of the routing table): 1. If (L -l < D < L l ) { // the destination is within the leaf set or is the current node. 2. Forward M to the element L i of the leaf set with GUID closest to D or the current node A. 3. } else { // use the routing table to despatch M to a node with a closer GUID 4. find p, the length of the longest common prefix of D and A. and i, the (p+1) th hexadecimal digit of D. 5. If (R[p,i] null) forward M to R[p,i] // route M to a node with a longer common prefix. 6. else { // there is no entry in the routing table 7. Forward M to any node in L or R with a common prefix of length i, but a GUID that is numerically closer. } }

Tapestry Uses DOLR to hide the distributed hash table from applications Use 160-bit identifiers 0 <= GUID <= 2160 1 Identifiers refer both to objects (GUID) and to nodes (NodeId) Structured versus unstructured peer-to-peer: Pastry, tapestry known as structured peer-to-peer because they maintain hash table In highly dynamic systems, overhead of maintaining hash tables Unstructured peer-to-peer tries to reduce overhead of central control Joining node establishes connections with local neighbors

Figure 10.10: Tapestry routing From [Zhao et al. 2004] Ta pestry routi ngs for 4377 4377 (Root for 4378) publish path 4228 43FE 437A Location mapping for 4378 Routes actually taken by send(4378) 4378 PhilÕs Books E791 4664 4B4F 4361 57EC 4A6D AA93 4378 PhilÕs Books Replicas of the f ile PhilÕs Books (G=4378) are hosted at nodes 4228 and AA93. Node 4377 is the root node f or object 4378. The Tapestry routings shown are some of the entries in routing tables. The publish paths show routes followed by the publish messages lay ing down cached location m appings for object 4378. The location mappings are subsequently used to route messages sent to 4378.

Figure 10.11: Structured versus unstructured peer-to-peer systems

Gnutella Successful file sharing system Divides node types into regular peers (leaves) and ultrapeers Ultrapeers form the heart of the network Leaves connect to ultrapeers, which do the routing Ultrapeers heavily connected to each other to reduce number of hops 24

Figure 10.12: Key elements in the Gnutella protocol 25

OceanStore Peer-to-peer store for mutable files Applications may include distributed file system, email hosting, etc. Both mutable and immutable objects can be replicated Prototype called Pond 26

BGUID (copy on write) Figure 10.13: Storage organization of OceanStore objects AGUID certificate VGUID of current version version i+1 VGUID of version i d1 d2 d3 root block version i indirection blocks Version i+1 has been updated in blocks d1, d2 and d3. The certificate and the root blocks include some metadata not shown. All unlabelled arrows are BGUIDs. data blocks VGUID of version i-1 d1 d2 d3 d4 d5

Figure 10.14: Types of identifier used in OceanStore Name Meaning Description BGUID block GUID Secure hash of a data block VGUID version GUID BGUID of the root block of a version AGUID active GUID Uniquely identifies all the versions of an object

Figure 10.15: Performance evaluation of the Pond prototype emulating NFS LAN WAN Predominant operations in Phase Linux NFS Pond Linux NFS Pond benchmark 1 0.0 1.9 0.9 2.8 Read and write 2 0.3 11.0 9.4 16.8 Read and write 3 1.1 1.8 8.3 1.8 Read 4 0.5 1.5 6.9 1.5 Read 5 2.6 21.0 21.5 32.0 Read and write Total 4.5 37.2 47.0 54.9

Ivy Emulates SUN NFS file system Supports multiple readers and writers over an overlay routing layer Distributed hash-addressed data store Stores logs of file updates and can reconstruct current state of file from log Log records stored in Dhash distributed hash addressed storage service 30

Figure 10.16: Ivy system architecture Ivy node Application Application DHa sh server DHa sh server Ivy server DHa sh server DHa sh server Modifled NFS Client module Kernel DHa sh server