Chapter 5 Naming (I) Speaker : Jyun-Yao Huang 1 Application and Practice of Distributed Systems.

Slides:



Advertisements
Similar presentations
Ion Stoica, Robert Morris, David Karger, M. Frans Kaashoek, Hari Balakrishnan MIT and Berkeley presented by Daniel Figueiredo Chord: A Scalable Peer-to-peer.
Advertisements

Peer to Peer and Distributed Hash Tables
CHORD – peer to peer lookup protocol Shankar Karthik Vaithianathan & Aravind Sivaraman University of Central Florida.
Chord A Scalable Peer-to-peer Lookup Service for Internet Applications Ion Stoica, Robert MorrisDavid, Liben-Nowell, David R. Karger, M. Frans Kaashoek,
Chord A Scalable Peer-to-peer Lookup Service for Internet Applications Prepared by Ali Yildiz (with minor modifications by Dennis Shasha)
Technische Universität Yimei Liao Chemnitz Kurt Tutschku Vertretung - Professur Rechner- netze und verteilte Systeme Chord - A Distributed Hash Table Yimei.
Technische Universität Chemnitz Kurt Tutschku Vertretung - Professur Rechner- netze und verteilte Systeme Chord - A Distributed Hash Table Yimei Liao.
Chord: A Scalable Peer-to- Peer Lookup Service for Internet Applications Ion StoicaRobert Morris David Liben-NowellDavid R. Karger M. Frans KaashoekFrank.
The Chord P2P Network Some slides have been borowed from the original presentation by the authors.
CHORD: A Peer-to-Peer Lookup Service CHORD: A Peer-to-Peer Lookup Service Ion StoicaRobert Morris David R. Karger M. Frans Kaashoek Hari Balakrishnan Presented.
Chord: A Scalable Peer-to-peer Lookup Protocol for Internet Applications Speaker: Cathrin Weiß 11/23/2004 Proseminar Peer-to-Peer Information Systems.
Ion Stoica, Robert Morris, David Liben-Nowell, David R. Karger, M
Chord: A scalable peer-to- peer lookup service for Internet applications Ion Stoica, Robert Morris, David Karger, M. Frans Kaashock, Hari Balakrishnan.
1 1 Chord: A scalable Peer-to-peer Lookup Service for Internet Applications Dariotaki Roula
Chord A Scalable Peer-to-peer Lookup Service for Internet Applications
Robert Morris, M. Frans Kaashoek, David Karger, Hari Balakrishnan, Ion Stoica, David Liben-Nowell, Frank Dabek Chord: A scalable peer-to-peer look-up.
Robert Morris, M. Frans Kaashoek, David Karger, Hari Balakrishnan, Ion Stoica, David Liben-Nowell, Frank Dabek Chord: A scalable peer-to-peer look-up protocol.
Chord: A Scalable Peer-to-peer Lookup Service for Internet Applications Ion StoicaRobert Morris David Liben-NowellDavid R. Karger M. Frans KaashoekFrank.
Peer to Peer File Sharing Huseyin Ozgur TAN. What is Peer-to-Peer?  Every node is designed to(but may not by user choice) provide some service that helps.
1 Chord: A Scalable Peer-to-peer Lookup Service for Internet Applications Robert Morris Ion Stoica, David Karger, M. Frans Kaashoek, Hari Balakrishnan.
Topics in Reliable Distributed Systems Lecture 2, Fall Dr. Idit Keidar.
Chord: A Scalable Peer-to-Peer Lookup Protocol for Internet Applications Stoica et al. Presented by Tam Chantem March 30, 2007.
Chord: A Scalable Peer-to-peer Lookup Service for Internet Applications Ion Stoica, Robert Morris, David Karger, M. Frans Kaashoek and Hari alakrishnan.
Secure Overlay Services Adam Hathcock Information Assurance Lab Auburn University.
Topics in Reliable Distributed Systems Fall Dr. Idit Keidar.
DISTRIBUTED SYSTEMS Principles and Paradigms Second Edition ANDREW S
Chord: A Scalable Peer-to-peer Lookup Protocol for Internet Applications 吳俊興 國立高雄大學 資訊工程學系 Spring 2006 EEF582 – Internet Applications and Services 網路應用與服務.
Wide-area cooperative storage with CFS
File Sharing : Hash/Lookup Yossi Shasho (HW in last slide) Based on Chord: A Scalable Peer-to-peer Lookup Service for Internet ApplicationsChord: A Scalable.
Naming Chapter 5. n Most of the lecture notes are based on slides by Prof. Jalal Y. Kawash at Univ. of Calgary n Some slides are from Brennen Reynolds.
Chord A Scalable Peer-to-peer Lookup Service for Internet Applications Lecture 3 1.
Effizientes Routing in P2P Netzwerken Chord: A Scalable Peer-to- peer Lookup Protocol for Internet Applications Dennis Schade.
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved Chapter 5 Naming.
ICS362 Distributed Systems Dr Ken Cosh Week 5. Review Communication – Fundamentals – Remote Procedure Calls (RPC) – Message Oriented Communication – Stream.
Chord & CFS Presenter: Gang ZhouNov. 11th, University of Virginia.
5.1 Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved DISTRIBUTED.
Naming Chapter 4.
1 Reading Report 5 Yin Chen 2 Mar 2004 Reference: Chord: A Scalable Peer-To-Peer Lookup Service for Internet Applications, Ion Stoica, Robert Morris, david.
Chord: A Scalable Peer-to-peer Lookup Protocol for Internet Applications Xiaozhou Li COS 461: Computer Networks (precept 04/06/12) Princeton University.
Naming CSCI 4780/6780. Names & Naming System Names have unique importance –Resource sharing –Identifying entities –Location reference Name can be resolved.
Presentation 1 By: Hitesh Chheda 2/2/2010. Ion Stoica, Robert Morris, David Karger, M. Frans Kaashoek, Hari Balakrishnan MIT Laboratory for Computer Science.
Chord: A Scalable Peer-to-peer Lookup Service for Internet Applications.
Chord: A Scalable Peer-to-peer Lookup Service for Internet Applications Ion Stoica, Robert Morris, David Karger, M. Frans Kaashoek, Hari Balakrishnan Presented.
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved DISTRIBUTED SYSTEMS.
SIGCOMM 2001 Lecture slides by Dr. Yingwu Zhu Chord: A Scalable Peer-to-peer Lookup Service for Internet Applications.
Lecture 2 Distributed Hash Table
Peer to Peer A Survey and comparison of peer-to-peer overlay network schemes And so on… Chulhyun Park
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved DISTRIBUTED SYSTEMS.
Chord Fay Chang, Jeffrey Dean, Sanjay Ghemawat, Wilson C. Hsieh, Deborah A. Wallach, Mike Burrows, Tushar Chandra, Andrew Fikes, Robert E. Gruber Google,
1. Outline  Introduction  Different Mechanisms Broadcasting Multicasting Forward Pointers Home-based approach Distributed Hash Tables Hierarchical approaches.
Idit Keidar, Principles of Reliable Distributed Systems, Technion EE, Spring Principles of Reliable Distributed Systems Lecture 2: Distributed Hash.
LOOKING UP DATA IN P2P SYSTEMS Hari Balakrishnan M. Frans Kaashoek David Karger Robert Morris Ion Stoica MIT LCS.
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved DISTRIBUTED SYSTEMS.
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved DISTRIBUTED SYSTEMS.
INTERNET TECHNOLOGIES Week 10 Peer to Peer Paradigm 1.
CS694 - DHT1 Distributed Hash Table Systems Hui Zhang University of Southern California.
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved DISTRIBUTED SYSTEMS.
CS 425 / ECE 428 Distributed Systems Fall 2015 Indranil Gupta (Indy) Peer-to-peer Systems All slides © IG.
Chord: A Scalable Peer-to-Peer Lookup Service for Internet Applications * CS587x Lecture Department of Computer Science Iowa State University *I. Stoica,
Chapter 29 Peer-to-Peer Paradigm Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
1 Distributed Hash tables. 2 Overview r Objective  A distributed lookup service  Data items are distributed among n parties  Anyone in the network.
CS Spring 2010 CS 414 – Multimedia Systems Design Lecture 24 – Introduction to Peer-to-Peer (P2P) Systems Klara Nahrstedt (presented by Long Vu)
The Chord P2P Network Some slides taken from the original presentation by the authors.
A Scalable Peer-to-peer Lookup Service for Internet Applications
Distributed Systems CS
5.2 FLAT NAMING.
Prof. Leonardo Mostarda University of Camerino
Distributed Systems CS
MIT LCS Proceedings of the 2001 ACM SIGCOMM Conference
A Scalable Peer-to-peer Lookup Service for Internet Applications
Presentation transcript:

Chapter 5 Naming (I) Speaker : Jyun-Yao Huang 1 Application and Practice of Distributed Systems

Introduction In a DS, the implementation of a naming system is itself often distributed – How this distribution is done plays a key role in the efficiency and scalability of the naming system. Three main areas of study in this chapter The organization and implementation of human-friendly naming systems, e.g, WWW system Naming as it relates to mobile entities Describe entities by means of various characteristics (not name) Need to resolve a description by attributes to an entity Application and Practice of Distributed Systems 2

Outline Names, Identifiers, and Addresses Flat Naming Structured Naming Attribute-Based Naming 3 Application and Practice of Distributed Systems

Names, Identifiers, and Addresses Name: a string of bits or characters that is used to refer to an entity Entity – just about any resource Address – the name of an entity’s “access-point”. Why not use address as an entity’s name An entity may change its access point The original access point may be reassigned to a different entity An entity can have more than one access points A web service may distributed across several servers Application and Practice of Distributed Systems 4

Names, Identifiers, and Addresses (cont.) Thus, a name is location independent and much easier to use If it is independent from its addresses Furthermore, some types of names is humanfriendly names Tailored to be used by humans and represented as character string Application and Practice of Distributed Systems 5

Names, Identifiers, and Addresses (cont.) Identifiers: a name that has the following properties An identifier refers to at most one entity Each entity is referred to by at most one identifier An identifier always refers to the same entity It is never reused By identifier, it becomes much easier to unambiguously refer to an entity Application and Practice of Distributed Systems 6

Name Resolution Name resolution Resolve names and identifiers to addresses! In DS, name resolution is closely related to message routing A naming system maintains a name-to-address binding A table of (name, address) pairs In distributed systems, this binding is distributed A centralized table is not going to work Thus, name resolution may need to repeated route message to each server that maintains the table Ex: DNS Application and Practice of Distributed Systems 7

Outline Names, Identifiers, and Addresses Flat Naming Structured Naming Attribute-Based Naming 8 Application and Practice of Distributed Systems

Flat Naming Flat names, or unstructured names Identifiers are random bit strings Does not contain any information on how to locate the access point of an entity How to locate an entity when given only its identifier? Simple Solutions Home-Based Approaches Distributed Hash Tables Hierarchical Approaches Application and Practice of Distributed Systems 9

Solution to Location Service Simple solutions: both solutions below are applicable only to local area networks Broadcasting and multicasting Forwarding Pointers Home-Based Approaches Distributed Hash Tables Hierarchical Approaches Application and Practice of Distributed Systems 10

Simple Solutions 1: Broadcasting and Multicasting Broadcast “where are you?” packets to each machine Each machine checks if it has the entity ARP (Address Resolution Protocol) uses this method IP address broadcasting return data-link addr Improvement: multicasting to a group of machines Application and Practice of Distributed Systems 11

Simple Solutions 2: Forwarding Pointers When an entity moves from A to B, it leaves in A a reference to B Example: SSP chains A forwarding pointer consists (client stub, server stub) Server stub: A local reference to the actual object, or A local reference to a remote client stub for that object When an object moves from A to B Leaves a client stub in A Install a server stub that refers to it in B Application and Practice of Distributed Systems 12

Forwarding Pointers Application and Practice of Distributed Systems 13

Disadvantages of Forwarding Pointers A chain can become very long The “lookup” eventually becomes prohibitively expensive. Improvement: short cut forward chains Send response with the object’s current location directly to the initiating client stub or along the reverse path If along the reverse path, all nodes in the path would also be “short cut” if possible Big vulnerability: broken links. Break a link and a forwarded entity is lost. Application and Practice of Distributed Systems 14

Solution to Location Service Simple solutions: both solutions below are applicable only to local area networks Broadcasting and multicasting Forwarding Pointers Home-Based Approaches Distributed Hash Tables Hierarchical Approaches Application and Practice of Distributed Systems 15

Home-Based Approaches Home-based approach A home location keeps track of the current location of an Entity This home can be contacted in order to determine the mobile entities current location Example: Mobile IP Each mobile host uses a fixed IP address All comm to that IP address is directly to its home agent Mobile host use a care-of address when it moves to another network The care-of address is registered to the home age Application and Practice of Distributed Systems 16

Home-Based Approaches (Cont.) Drawbacks Increased latency, especially when host and home are far apart The use of fixed home location If move permanently, the home should also move along Application and Practice of Distributed Systems 17

Home-Based Approaches Application and Practice of Distributed Systems 18

Solution to Location Service Simple solutions: both solutions below are applicable only to local area networks Broadcasting and multicasting Forwarding Pointers Home-Based Approaches Distributed Hash Tables Hierarchical Approaches Application and Practice of Distributed Systems 19

Distributed Hash Table-Chord Chord: a peer-to-peer lookup system Given a key (data item), it maps the key onto a node (peer). Application and Practice of Distributed Systems 20

General Mechanism Use hash function to assign each node and key an m- bit identifier Identifiers are ordered on an identifier circle Key k is assigned to the first node whose identifier is the smallest identifier id >= k This node is the successor node of key k, denoted by succ(k) Application and Practice of Distributed Systems 21

Hashing - Successor Nodes Application and Practice of Distributed Systems 22

Node Join and Departure When a node n joins the network Certain keys previously assigned to n’s successor now become assigned to n. When node n leaves the network All of its assigned keys are reassigned to n’s successor. Application and Practice of Distributed Systems 23

Consistent Hashing – Node Join Application and Practice of Distributed Systems 24

Consistent Hashing – Node Dep. Application and Practice of Distributed Systems 25

Key Lookup: Simple Scheme Using Linear Search Algorithm If each node knows only its successor node All node can be visited in linear order. Thus, queries for a given identifier could be passed around the circle Until they encounter the node that contains the key. Application and Practice of Distributed Systems 26

A Simple Lookup Scheme The path taken by a query from node 8 for key 54: Application and Practice of Distributed Systems 27

Key Lookup: Scalable Scheme To accelerate lookups, Chord maintains additional routing information, called finger table Each node n’ maintains a routing table with up to m entries (m: number of bits in identifiers), called finger table. The i th entry in the table at node n contains the identity of the first node s that succeeds n by at least 2 i-1 on the identifier circle. s = successor(n+2 i-1 ). s is called the i th finger of node n, denoted by n.finger(i) Application and Practice of Distributed Systems 28

Scalable Scheme – Finger Tables Application and Practice of Distributed Systems 29

Scalable Scheme – Example Query The path a query for key 54 starting at node 8: Application and Practice of Distributed Systems 30

The Chord algorithm – Scalable node localization Important characteristics of this scheme: Each node stores information about only a small number of nodes (m) Each nodes knows more about nodes closely following it than about nodes farer away The number of nodes that must be contacted to find a successor in an N-node network is O(logN). Application and Practice of Distributed Systems 31

Node Joins and Stabilizations The most important thing is the successor pointer If the successor pointer is ensured to be up to date, Then it is sufficient to guarantee correctness of lookups Then finger table can always be verified. Each node runs a “stabilization” protocol periodically in the background To update successor pointer and finger table Application and Practice of Distributed Systems 32

The Chord algorithm – Node joins and stabilization Application and Practice of Distributed Systems 33

The Chord algorithm – Node joins and stabilization Application and Practice of Distributed Systems 34

The Chord algorithm – Node joins and stabilization Application and Practice of Distributed Systems 35

The Chord algorithm – Node joins and stabilization Stabilization protocol: Join(): when node n first starts, it calls join() Stabilize(): n asks its successor for its predecessor p and decides whether p should be n‘s successor instead This is the case if p recently joined the system. Notify(): notifies n‘s successor of its existence, so it can change its predecessor to n Fix_fingers(): updates finger tables Application and Practice of Distributed Systems 36

The Chord algorithm – Node joins and stabilization When node n first starts, it calls n.join(n’), n’ is any known Chord node. Ask n’ to find the immediate successor of n. join() does not make the rest of the network aware of n Application and Practice of Distributed Systems 37 // join a Chord ring containing node n’. n.join(n’) predecessor = nil; successor = n’.find_successor(n);

Node Joins and Stabilization: Example 1 Application and Practice of Distributed Systems 38

Node Joins and Stabilization: Example 1 Application and Practice of Distributed Systems 39

Node Joins and Stabilization: Example 1 Application and Practice of Distributed Systems 40

Node Joins and Stabilization: Example 1 Application and Practice of Distributed Systems 41

Node Joins and Stabilization: Example 2 Application and Practice of Distributed Systems 42

Node Joins – fix_fingers() Each node periodically calls fix_fingers() To make sure that finger table entries are correct. Node n simply needs to find the successor for k = n+2 i-1 for each entry Application and Practice of Distributed Systems 43 // called periodically. refreshes finger table entries. n.fix_fingers() next = next + 1 ; if (next > m) next = 1 ; finger[next] = find_successor(n + 2next-1);

Node Failures Each node maintains a successor-list of its r nearest successors on the ring Successor lists are stabilized as follows: node n builds its list with its successor s by copying s’s successor list, removing its last entry, and prepending s to it. If node n notices that its successor has failed It replaces it with the first live entry in its successor list It rebuilds its successor list with its new successor. Application and Practice of Distributed Systems 44

Successor Lists for Node Failures Application and Practice of Distributed Systems 45

Exploiting Network Proximity In chord, requests may be routed erratically across the Internet E.g., node 18 in U.S., node 20 in Europe, node 38 in Asia Solutions: make a DHT-based system aware of the underlying network Topology-based assignment of node identifiers Proximity routing Proximity neighbor selection Application and Practice of Distributed Systems 46

Topology-based Assignment of Node Identifiers Assign identifiers such that two nearby nodes will have identifiers that are close to each other Disadvantages Complexity Map a logical ring to the Internet is far from trivial Expose correlated failures When the network becomes unreachable=> a gap in uniform distribution identifiers Application and Practice of Distributed Systems 47

Proximity Routing Each node maintains a list of alternatives to forward a request Each node maintain r successors Besides, each finger table entry can even have r nodes, within the range [n+2 i-1, n+2 i -1] When forward a lookup request Pick one of the r successors that is closest to itself Application and Practice of Distributed Systems 48

Proximity Neighbor Selection Optimize routing tables such that the nearest node is selected as neighbor When there are more nodes to choose from But, cannot apply to chord Instead, in chord, if each finger table entry has r nodes Identify the closest r neighbors Application and Practice of Distributed Systems 49