140 likes | 280 Views
Pastry & PAST. -Amod Samnerkar. What is pastry ? . We will learn how to make nice Pastry today. What is pastry ?. It’s a scalable, distributed object location and routing substrate (underlying layer). Basic Idea behind routing. Each node is assigned a node id
E N D
Pastry & PAST -Amod Samnerkar
What is pastry ? • We will learn how to make nice Pastry today.
What is pastry ? • It’s a scalable, distributed object location and routing substrate (underlying layer)
Basic Idea behind routing • Each node is assigned a node id • Given a key, the node efficiently routes the message to the node whose nodeId is numerically closest to the key.
Sample nodeId table • Leaf Table: stores numerically closest nodeIds • Routing Table: • Total no of rows: total no of bits in a nodeId • Total entries in a row = base number • Neighborhood set: stores closest nodes according to proximity matric
Routing • 1. Check if the key falls within the leafset range • 2. Else forward the message to the node that shares a common prefix with the key at least one more digit • 3. Else forward the message to the node in the leafset that is numerically close to the key than present nodeId and shares the prefix of same length as that of current node.
Logarithmic running time • Log N where N is the number of Pastry nodes in the network. • In each routing step, a node normally forwards the message to a node whose nodeId shares with the key a prefix that is at least one digit (b bits) longer than the prefix the key shares with the present node’s id.
APIs • nodeId = Init( ) • route(msg, key) • deliver(msg, key)
Self organization • Node arrival: • Message is sent to the node whose nodeId is numerically closest to the new node. • Initialization of the state table occurs. • Nodes update their state tables. • Node Departure: • Neighboring nodes update their state tables : Leaf table, Routing table.
Applications based on Pastry • Pastry can be used as a building block in construction of variety of applications such as : global file sharing, file storage, group communication. • PAST • SCRIBE
What is PAST ? • Past is a network of storage nodes that cooperatively routes the file queries, store multiple replicas of files, cache additional copies of popular files.
PAST : basic idea • Replicas are stored at nodes whose nodeIds are numerically closest to the fileIds. • fileId : (hash of file’s name and owner). • To lookup a file use fileId as key.
Thank you • Hope you enjoyed the pastry.