CS641 Advanced Computer Networks Lecture 38 Bhaskaran Raman - - PowerPoint PPT Presentation

cs641 advanced computer networks lecture 38
SMART_READER_LITE
LIVE PREVIEW

CS641 Advanced Computer Networks Lecture 38 Bhaskaran Raman - - PowerPoint PPT Presentation

CS641 Advanced Computer Networks Lecture 38 Bhaskaran Raman Department of CSE, IIT Bombay http://www.cse.iitb.ac.in/~br/ http://www.cse.iitb.ac.in/synerg/doku.php?id=public:courses:cs641-autumn10:start Outline for Today Chord: Distributed


slide-1
SLIDE 1

CS641 Advanced Computer Networks Lecture 38

Bhaskaran Raman Department of CSE, IIT Bombay

http://www.cse.iitb.ac.in/~br/ http://www.cse.iitb.ac.in/synerg/doku.php?id=public:courses:cs641-autumn10:start

slide-2
SLIDE 2

Outline for Today

  • Chord: Distributed Hash Table
  • Note next designated reading:

– Due Tue 09 Nov 2010 – [KRH06] Sachin Katti, Hariharan Rahul, Wenjun

Hu, Dina Katabi, Muriel Medard, Jon Crowcroft, "XORs in The Air: Practical Wireless Network Coding", ACM SIGCOMM, Sep 2006.

– Focus on the first 5 sections (6.5 pages)

slide-3
SLIDE 3

Peer-to-Peer Networks

  • Peers form a network among themselves

– Overlay on top of IP – Provide routing: usually towards named objects

  • Classification

– Centralized directory (e.g. Napster) – Decentralized directory

  • Unstructured (e.g. Gnutella, FastTrack, Morpheus)
  • Structured: topic for today
slide-4
SLIDE 4

Structured Peer-to-Peer Networks

  • Close coupling between network

topology/addressing and data location

  • Several distributed data structures proposed:

– Chord – CAN (Content Addressable Network) – Tapestry

slide-5
SLIDE 5

Peer-to-Peer Network Features

  • Redundant storage
  • Selection of nearby servers
  • Searching of data
  • Efficient location of data item
slide-6
SLIDE 6

Non-Trivial Chord Features

  • Load balancing
  • Decentralization
  • Scalability
  • Availability
  • Flexible naming
slide-7
SLIDE 7

Chord Functionality

  • Chord maps given key to a node

– That node stores and serves data – Key space is flat – Can support dynamic node join/leave

  • Application is responsible for other

functionalities:

– User friendly naming of data: hash to flat space – Authentication: use cryptographic hash – Replication: store data under two different keys

slide-8
SLIDE 8

Example Applications

  • Distributed indexing: Gnutella or Napster like

keyword search

  • Cooperative mirroring
  • Time-shared storage
  • Large-scale combinatorial search
slide-9
SLIDE 9

The Chord Interface

  • Two main interfaces with application above:

– lookup(key) – Call back when the set of keys the node is

responsible for changes

slide-10
SLIDE 10

The Chord Lookup Protocol

  • Logical identifier space, circular with m-bits
  • Nodes and keys are hashed onto this space

using SHA-1

– Nodes' IP addresses are hashed – Consistent hashing: load balancing

  • Key k is assigned to successor node in

identifier space

– Reassignment happens when nodes join/leave

slide-11
SLIDE 11

Scalable Key Location

  • Default lookup method:

– Maintain and follow successor pointers – Takes O(N) time for lookup

  • Optimization:

– Maintain finger table with at most m entries – The i'th entry will have the pointer to the first node s

which is away from n by at least 2^(i-1)

  • s = successor(n + 2^(i-1))
slide-12
SLIDE 12

How the Finger Table Works

  • Each node stores only a small number of

pointers

  • But an arbitrary node does not necessarily

have pointer to successor(k)

  • Node n searches its finger table for node j

which most immediately precedes k

  • In each step, we move closer to k

– We at least halve the distance to k each time – O(logN) lookup time

slide-13
SLIDE 13

Handling Node Join

  • Invariants to maintain

– Each node's successor is correctly maintained – For every k, successor(k) is responsible for k

  • Maintain predecessor pointer for simplification
  • Main steps when n joins:

– Learn of some other node n' offline – Initialize own finger table and predecessor – Update fingers of existing nodes – Transferring keys

  • O(logN * logN) messages
slide-14
SLIDE 14

Some Remarks

  • Handling simultaneous join, or node failure is a

little bit more involved

– Need to store r nearest successors – Need to replicate data associated with keys

  • Protocol can be implemented iteratively or

recursively

  • Path length expansion is an important concern
slide-15
SLIDE 15

Upcoming Topics

  • Kazaa overlay measurement study
  • Skype traffic analysis
  • Designated reading: XOR, network coding
  • Bloom filter, fast hash tables