CHORD - PowerPoint PPT Presentation

About This Presentation
Title:

CHORD

Description:

... of the new node n. Update the fingers and predecessors of existing nodes ... Solution: Try to find predecessor(n- 2i-1) for all 1 =i =m; and check whether n ... – PowerPoint PPT presentation

Number of Views:247
Avg rating:3.0/5.0
Slides: 32
Provided by: aravinds
Learn more at: http://www.cs.ucf.edu
Category:

less

Transcript and Presenter's Notes

Title: CHORD


1
CHORD peer to peer lookup protocol
Shankar Karthik Vaithianathan Aravind Sivaraman
University of Central Florida
2
Outline
  • History
  • General definition of a DHT system
  • Chord
  • Applications
  • Implementation
  • Demo/Open questions

3
History client-server model
query
data transferring
4
History peer-to-peer model (Napster)
5
History peer-to-peer model (Gnutella)
query
data transferring
6
History peer-to-peer model (DHT systems)
query
data transferring
7
Distributed Hash Table
What is normal hashing ? Putting items into say n
buckets, often solved by a static solution(e.g
H(key)mod N) Problems N changes ? We must move
every thing (simple solution) or could we move
just (items) / (buckets) on an average (optimal
solution) what if we do not know the number of
buckets ?
8
Distributed Hash Table
Consistent Hashing
  • Let A B be Hashing. They send an object k to
    two
  • different buckets, say y and z, respectively.
    Then either
  • A cannot see bucket z or B cannot see bucket y.
  • Each bucket is a assigned a number in (0,1), and
  • each item gets a value (0,1). You could then be
    in
  • according to least distance or always round
    down(or
  • up) and wrap at the edges.

9
Distributed Hash Table
Consistent Hashing ctd
If a new bucket is added, we therefore need to
move the Contents of bucket immediately before
it. If we let each bucket have m elements and (M
log n) then each bucket gets a fair share of
load and on an average we move only the average
contents of the bucket around. If we let each
bucket have m elements and (M log n) then each
bucket gets a fair share of load and on an
average we move only the average contents of the
bucket around.
10
Distributed Hash Table
  • a new class of peer-to-peer routing
    infrastructures.
  • support a hash table-like functionality on
    Internet-like scale
  • Consider the buckets to be computers on the
    internet and that given a key, they should find
    the value(IP address)
  • The challenges with such a system are
  • Load balancing
  • Scalability
  • dynamic nature
  • no critical point
  • deterministic.

11
Basic DHT components
  • an overlay space and its partition approach
  • a routing protocol
  • local routing table
  • next-hop decision
  • a base hash function
  • variants proximity-aware, locality-preserving,
    etc.

12
Consistent hashing
data
server
13
Chord Stoica et al. Sigcomm2001
  • Overlay space
  • - one-dimensional unidirectional key space 0
    2m-1.
  • Given two m-bit identifiers x and y, d(x,
    y)(y-x2m) 2m
  • - Each node is assigned a random m-bit
    identifier.
  • - Each node is responsible for all keys equal to
    or before its identifier until its predecessor
    nodes identifier in the key space.

14
Chord routing protocol
  • Routing table (finger table)
  • - (at most) m entries. The ith entry of node n
    contains the pointer to the first node that
    succeeds n by at least 2(i-1) on the key space, 1
    ? i ? m.
  • Next-hop decision
  • For the given target key k, find the closest
    finger before (to) k and forward the request to
    it.
  • Ending condition The request terminates when k
    lies between the ID range of current node and its
    successor node.
  • - The routing path length is O(log n) for a
    n-nodes network with high probability (w.h.p.).

15
Chord an example (m8)
Network node
A Chord network with 8 nodes and 8-bit key space
16
Chord routing table setup
Network node
Pointer
0
255
A Chord network with 8 nodes and 8-bit key space
17
Chord a lookup for key 120
18
How to look up a key quickly ?
  • We need finger table

19
How to look up a key quickly ?(cont.)
  • finger table for node 1

20
How to look up a key quickly ?(cont.)
Predecessor(1) ? successor(1)
Value of key 1 ?
21
Node joins
  • Two challenges
  • Each nodes finger table is correctly filled
  • Each key k is stored at node successor(k)
  • Three operations
  • Initialize the predecessor and fingers of the new
    node n
  • Update the fingers and predecessors of existing
    nodes
  • Copy to n all keys for which node n has became
    their successor

22
Initialize the predecessor and fingers of node n
  • Idea Ask an existing node for information needed

Join in
23
Update the fingers and predecessors of existing
nodes
  • Observation when node n joins the network, n
    will become the ith finger of a node p when the
    following two conditions meet
  • P proceeds n by at least 2i-1
  • The ith finger of node p succeeds n
  • Solution Try to find predecessor(n- 2i-1) for
    all 1ltiltm and check whether n is their ith
    finger, and whether n is their predecessors ith
    finger.

24
Update the fingers and predecessors of existing
nodes (cont.)
Predecessor(6-21-1) 3, update
Join in
?6
?6
?6
?6
25
Copy to n all keys for which node n has became
their successor
  • Idea Node n can become the successor only for
    keys stored by the node immediately following n

Join in
26
Extended Chord protocol
  • Concurrent joins
  • Failures and replication
  • Beyond are project scope. Ref. Stoica et, all
    sigcomm 2001

27
  • Example applications
  • Co-operative Mirroring
  • Time-shared storage
  • Distributed indexes
  • Large-Scale combinatorial search

28
Implementation Our current implementation is
simulation of the Chord protocol in O(log n)
steps in java. The framework can be shown as
below
29
Methods Implemented
30
Conclusion Questions ? Reference Chord A
Scalable Peer to peer Lookup Service for
Internet Applications Ion Stoica , Robert Morris,
David Karger, M. Frans Kaashoek, Hari
Balakrishnan MIT Laboratory for Computer
Science chord_at_lcs.mit.edu http//pdos.lcs.mit.edu/
chord/
31
THANK YOU
Write a Comment
User Comments (0)
About PowerShow.com