A brief introduction to Pastry - PowerPoint PPT Presentation

About This Presentation
Title:

A brief introduction to Pastry

Description:

A brief introduction to Pastry Based on: A. Rowstron and P. Druschel, Pastry: Scalable, decentralized object location and routing for large-scale peer-to-peer systems ... – PowerPoint PPT presentation

Number of Views:87
Avg rating:3.0/5.0
Slides: 10
Provided by: Fabia162
Category:

less

Transcript and Presenter's Notes

Title: A brief introduction to Pastry


1
A brief introduction to Pastry
  • Based on
  • A. Rowstron and P. Druschel, Pastry Scalable,
    decentralized object location and routing for
    large-scale peer-to-peer systems, Middleware,
    Nov. 2001.
  • Presenter Fabián E. Bustamante

2
Distributed Systems Architectures
  • System architecture Component placement and
    their interactions
  • Client/Server
  • Server implementing a specific service
  • Client requests the service
  • Peer-to-Peer
  • All peers are equal
  • Symmetric interaction between processes
  • Focusing on data-sharing systems

3
Data Sharing P2P
  • Data sharing P2P apps rely on overlay network
    protocols for object storage/retrieval message
    routing
  • Classes of overlay protocols
  • Unstructured
  • Few constraints on overlay construction data
    placement
  • Could support arbitrary complex queries, highly
    resilient to churn
  • Restricted to inefficient, near-blind search
    strategies
  • Structured (DHT Distributed Hash Tables)
  • Constraining overlay structure data placement
  • Efficient object discovery
  • Potential problems handling churn, exploiting
    node heterogeneity supporting complex queries

4
Pastry DHT
  • Pastry
  • Scalable, decentralized object location and
    routing for large-scale P2P systems
  • Nodes assigned a unique 128-bit numeric node
    identifier (nodeId) (circular id space)
  • NodeID can be expressed in based 2b, b 4
  • Given a msg its 128-bit key, Pastry routes the
    msg to the node with numerically closest nodeId
    (in less than )
  • At each step, forward to node sharing with a key
    a 1 larger prefix or is numerically closer

5
Pastry Node State
  • Each Pastry node maintains
  • Routing table
  • Log N rows with 2b - 1 entries
  • Entries at row n share n digit with current node
  • Choice of b involves a trade-off between size of
    populated portions of the routing table maximum
    number of hos to route between two nodes (e.g. b
    4 106, avg. 75 entries and 5 hops)
  • Neighborhood set
  • nodeIds and IP addresses of M nodes closest
    (proximity metric) to the local node (M 2
    2b)
  • Leaf set
  • Set of L/2 numerically closest larger/smaller
    nodeIds relative to the present nodes nodeId
    (L 2b)

6
Routing in Pastry
  • Routing a message with key D arriving at a node
    with nodeId A
  • If (D is within range of leafset)
  • Forward to Li such that D - Li is minimal
  • Else // use routing table
  • Let l be the length of prefix shared bet/ A and D
  • If ! null
  • Forward to
  • Else
  • Forward to T in L U R U M such that the length of
    prefix between T and D is gt l and T - D lt A -
    D

7
Pastry API
  • Pastry exports (downcalls)
  • nodeId pastryInit(Credentials, Applications)
  • To join the local node (application is a handle
    to a set of procedures to invoke when certain
    events happen)
  • route(msg, key)
  • Applications must export (upcalls)
  • deliver(msg, key)
  • Call by Pastry when msg arrived for node
  • forward(msg, key, nextId)
  • Call by Pastry just before forwarding the msg to
    node with nodeId nextId
  • newLeafs(leafSet)
  • Call by Pastry whenever theres a change in local
    node leafset

8
Dynamics Node Arrival
  • Node X knows of nearby node A
  • X asks A to route a join msg with key X, A routes
    it to node Z
  • In response to join msg, A, Z and all in between
    send Z their state tables
  • X initializes its own state tables
  • As neighborhood set is Xs
  • Zs leafset is basis for Xs leafset (closest
    nodeId)
  • Xs R0 (X0) A0, X1 B1, where B is the first
    node in the route from A to Z
  • X informs everyone who should know of its arrival

9
Example Applications
  • PAST A persistent storage service
  • fileId a function of files name owner
  • Replicas of a file are stored on the k Pastry
    nodes with nodeId numerically closest to fileId
  • Scribe A publish/subscribe system
  • Subscribers are kept in node with nodeId
    numerically closest to topicId)
  • Others
  • SplitStream
  • Squirrel
Write a Comment
User Comments (0)
About PowerShow.com