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

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

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

Towards a Common API for Structured Peer-to-Peer Overlays

Towards a Common API for Structured Peer-to-Peer Overlays Λ

Peer-to-peer computing research a fad?

Chapter 10: Peer-to-Peer Systems

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

Overview. Peer-to-Peer Systems and Security IN2194. Chapter 1 Peer-to-Peer Systems 1.3 Structured Networks. Motivation. Routing on the Internet

Slides for Chapter 10: Peer-to-Peer Systems

Distributed Knowledge Organization and Peer-to-Peer Networks

Distributed Hash Tables: Chord

CIS 700/005 Networking Meets Databases

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

DISTRIBUTED COMPUTER SYSTEMS ARCHITECTURES

Peer-to-Peer Internet Applications: A Review

Content Overlays. Nick Feamster CS 7260 March 12, 2007

Distributed Information Processing

416 Distributed Systems. Mar 3, Peer-to-Peer Part 2

Telecommunication Services Engineering Lab. Roch H. Glitho

DHT Overview. P2P: Advanced Topics Filesystems over DHTs and P2P research. How to build applications over DHTS. What we would like to have..

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

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

Peer-to-Peer Systems and Security IN2194. Chapter 1 Peer-to-Peer Systems 1.3 Structured Networks

Peer-to-Peer Systems and Security IN2194. Chapter 1 Peer-to-Peer Systems 1.3 Structured Networks

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

Distributed Hash Table

Searching for Shared Resources: DHT in General

Cycloid: A constant-degree and lookup-efficient P2P overlay network

Architectures for Distributed Systems

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

P2P: Distributed Hash Tables

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

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

Scalability In Peer-to-Peer Systems. Presented by Stavros Nikolaou

Peer-to-Peer Systems and Distributed Hash Tables

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

Peer- Peer to -peer Systems

Overlay Networks for Multimedia Contents Distribution

Searching for Shared Resources: DHT in General

Peer-To-Peer Techniques

Distributed Hash Tables

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

Cycloid: A Constant-Degree and Lookup-Efficient P2P Overlay Network

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

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

Motivation for peer-to-peer

Introduction to P2P Computing

Peer-to-Peer (P2P) Systems

Unit 8 Peer-to-Peer Networking

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

INF5071 Performance in distributed systems: Distribution Part III

Distributed Hash Tables

08 Distributed Hash Tables

Introduction to Peer-to-Peer Systems

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

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

Exploiting Route Redundancy via Structured Peer to Peer Overlays

Cycloid: A Constant-Degree and Lookup-Efficient P2P Overlay Network

A Survey of Peer-to-Peer Content Distribution Technologies

GNUnet Distributed Data Storage

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

Peer-to-peer systems and overlay networks

P2PNS: A Secure Distributed Name Service for P2PSIP

Decentralized Object Location In Dynamic Peer-to-Peer Distributed Systems

CS 347 Parallel and Distributed Data Processing

CS 268: DHTs. Page 1. How Did it Start? Model. Main Challenge. Napster. Other Challenges

CompSci 356: Computer Network Architectures Lecture 21: Overlay Networks Chap 9.4. Xiaowei Yang

Kademlia: A P2P Informa2on System Based on the XOR Metric

Distributed Systems Peer-to-Peer Systems

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

Structured Peer-to-Peer Networks

CS 43: Computer Networks BitTorrent & Content Distribution. Kevin Webb Swarthmore College September 28, 2017

! Naive n-way unicast does not scale. ! IP multicast to the rescue. ! Extends IP architecture for efficient multi-point delivery. !

Tapestry: A Resilient Global-scale Overlay for Service Deployment

Badri Nath Rutgers University

Peer to Peer Networks

L3S Research Center, University of Hannover

15-744: Computer Networking P2P/DHT

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

Lecture 8: Application Layer P2P Applications and DHTs

An Expresway over Chord in Peer-to-Peer Systems

Distributed Hash Tables

Peer to Peer Networks

CSCI-1680 P2P Rodrigo Fonseca

Telematics Chapter 9: Peer-to-Peer Networks

Distributed Systems. 16. Distributed Lookup. Paul Krzyzanowski. Rutgers University. Fall 2017

Data Replication under Latency Constraints Siu Kee Kate Ho

Secure Distributed Storage in Peer-to-peer networks

A Decentralized Content-based Aggregation Service for Pervasive Environments

PEER-TO-PEER (P2P) systems are now one of the most

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

EE 122: Peer-to-Peer (P2P) Networks. Ion Stoica November 27, 2002

DISTRIBUTED SYSTEMS Principles and Paradigms Second Edition ANDREW S. TANENBAUM MAARTEN VAN STEEN. Chapter 1. Introduction

CSE 486/586 Distributed Systems

L3S Research Center, University of Hannover

Peer-to-Peer: Part II

*Adapted from slides provided by Stefan Götz and Klaus Wehrle (University of Tübingen)

How to make sites responsive? 7/121

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

Page 1. How Did it Start?" Model" Main Challenge" CS162 Operating Systems and Systems Programming Lecture 24. Peer-to-Peer Networks"

Transcription:

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

Index Koorde: Degree optimal DHT Constructing overlay applications and services

Koorde: Degree Optimal DHT Parallel Architectures: Hypercubes, Butterflies, De Bruijn graphs, Koorde is a degree optimal DHT based on De Bruijn graphs Itisverydifficulttoimprovethis!!! O(1) degree & O(log) routing

De Bruijn graph Each node connects to node 2m mod 2 b and node 2m+1 mod 2 b (2 links!!!) Node x = 001 (1) 2m (x<<1): 2 2m + 1 (x<<1 +1): 3 000 001 010 101 100 011 110 111 b=3

Routing in the graph m.lookup(k,ks) if k=m return m else t=m topbit(ks) return t.lookup(k,ks<<1) 000 001 010 101 100 011 110 111 b=3

De Bruijn Overlay Difficult to maintain and construct Technique to construct koorde: DeBruijnring Eachnodehas 2 links: succesor link De Bruijn 2m link But: Where is the 2m +1?? Wehavetochangetheroutingprotocol

Koorde ring

Koorde routing m.lookup(k,ks,i) 1 if k (m, m.successor] return successor 2 else if i (m, m.successor] 3 return d.lookup(k,ks<<1, i topbit(ks)) 4 else 5 return m.successor.lookup(k,ks,i) 1) If my succesor is the responsible of the key return successor 2) If exists the De Bruijn 2m link from this node to imaginary node I take the 2m hop i = 3, m = 2 OK (2-6-3 in De Bruijn) i = 5 m = 2 NO! (5 =2*2 +1, Koorde only has 2m links!) 5) If I do not find a De Bruijn hop, I go to the successor node.

Improvement This aproach is inefficient O(3b) Example: 2 (010)->6 (110) De Bruijn Routing (2,5,3,7)(010-101-011-110) 2.Lookup(6,6,i=5) 2->3->4(i=5)->0(i=3)->1->2(i=3)->4->5->6!!!!!!!!! Improvement:select the i that is closer to the target and is in range (m,msucc) 2.lookup(6,6,i=3) 2->4->5->6

Koorde Base-K De Bruijn Base K km mod k b km+1 mod k b km+(k-1) mod k b 11 10 b=2 k=3 01 12 00 20 02 21 b=160 22

Constructing overlay applications and services GOALS: Decentralization Scalability Anonimity Self-organization (autonomic communications) Ad-hoc connectivity Shared resource aggregation Performance Security Fault Tolerance

Distributed Hash Tables A hash table links data with keys The key is hashed to find its associated bucket in the hash table Each bucket expects to have #elems/#buckets elements In a Distributed Hash Table (DHT), physical nodes are the hash buckets The key is hashed to find its responsible node Data and load are balanced among nodes lookup (key) data insert (key, data) key pos hash function Star Trek h(key)%n 2 lookup (key) data insert (key, data) key hash bucket Hash Table pos hash function Star Trek h(key)%n 2 node 00 11 22 33... N-1 0 1 2 N-1... xx yy zz

DHT applications File sharing [CFS, OceanStore, PAST, ] Web cache [Squirrel, Coral] Censor-resistant stores [Eternity, FreeNet, ] Application-layer multicast [Narada, ] Event notification [Scribe] Streaming (SplitStream) Naming systems [ChordDNS, INS, ] Query and indexing [Kademlia, ] Communication primitives [I3, ] Backup store [HiveNet] Web archive [Herodotus] Suggestions?

Structured Overlays Theyare: Scalable, self-organizing overlay networks Provide routing to location-independent names Examples: CAN, Chord, Pastry, Tapestry, Basic operation: Large sparse namespace N (integers: 0 2 128 or 0 2 160 ) Nodes in overlay network have nodeids N Given k N, a deterministic function maps k to its root node (a live node in the network) route(msg, k) delivers msg to root(k)

Towards a Common API Easily supportable by old and new protocols Enables application portability between protocols Enables common benchmarks Provides a framework for reusable components Achieves Interoperability between heterogeneous protocols

A Layered Approach: Common API Tier 2 CFS PAST I3 Scribe SplitStream Bayeux OceanStore Tier 1 DHT CAST DOLR Tier 0 Key-based Routing Layer (KBR)

Functional Layers DHT (Distributed Hash Table) put(key,data), value = get(key) Hashtable layered across network Handles replication; distributes replicas randomly Routes queries towards replicas by name DOLR (Decentralized Object Location and Routing) publish(objectid), route(msg, nodeid), routeobj(msg, objectid, n) Application controls replication and placement Cache location pointers to replicas; queries quickly intersect pointers and redirect to nearby replica(s)

API (Routing) Data types Key, nodeid = 160 bit integer Node = Address (IP + port #), nodeid Msg: application-specific msg of arbitrary size Invoking routing functionality Route(key, msg, [node]) route message to node currently responsible for key Non-blocking, best effort message may be lost or duplicated. node: transport address of the node last associated with key (proposed first hop, optional)

API nexthopset = local_lookup(key, num, safe) Returns a set of at most num nodes from the local routing table that are possible next hops towards the key. Safe: whether choice of nodes is randomly chosen nodehandle[ ] = neighborset(max_rank) Returns unordered set of nodes as neighbors of the current node. Neighbor of rank i is responsible for keys on this node should all neighbors of rank < i fail nodehandle[ ] = replicaset(key, num) Returns ordered set of up to num nodes on which replicas of the object with key key can be stored. Result is subset of neighborset plus local node boolean = range(node, rank, lkey, rkey) Returns whether current node would be responsible for the range specified by lkey and rkey, should the previous rank-1 nodes fail.

API (Upcalls) Deliver(key, msg) Delivers an incoming message to the application. One application per node. Forward(key, msg, nexthopnode) Synchronous upcall invoked at each node along route On return, will forward msg to nexthopnode App may modify key, msg, nexthopnode, or terminate by setting nexthopnode to NULL. Update(node, boolean joined) Upcall invoked to inform app of a change in the local node s neighborset, either a new node joining or an old node leaving.

Common API ideas Itisa paper, nota standard! Towards a Common API for Structured Peer-to- Peer Overlays. IPTPS 2003. Dabek, Zhao, Druschel, Stoica, kubiatowitcz Itisacademic!! Thereare notcomercial implementations of the Common API But: it helps to provide common concepts for developing p2p applications over structured overlays

Common API = KBR You still have to implement the DHT, replication protocols, fault tolerance, Other approach is to construct directly applications on top of the DHT (put, get) interface. Example: OpenDHT has public XMLRPC APIs.

Ideas for applications: Fault tolerant replicated DHT Robust Service Discovery Queryengine Propagation channel (CAST, BitTorrent) File Sharing tool

Open problems Range Queries over Structured Overlays GoogleBase or P2P DataBase? Resource handling: Incentives Vs tragedy of the commons Security Redundant routing Robust systems Trust Systems Autonomic Communications Self-healing autonomic systems Self-protecting autonomic systems Self-optimizing autonomic systems Self-configuring autonomic systems

Open problems Pervasive Computing Mobile Ad-Hoc Networks (MANET) GridComputing Large Databases Content Distribution Networks Event-Based Systems Decentralized Collaborative Systems