SlideShare a Scribd company logo
1 of 28
TAPESTRY- Peer to Peer Overlay
Network
CS8603-Distributed Systems
V.Sutha Jebakumari AP/CSE,
KCET
07.04.2020
P2P system
 Peer-to Peer(P2P) is a way of structuring
distributed applications such that the
individual nodes have symmetric roles. Rather
than being divided into clients and servers
each with quite distinct roles, in P2P
applications a node may act as both a client
and a server.
 Peers play similar roles.
 No distinction of responsibilities
P2P system
 Applications that exploit resources available at the edges of
the Internet - storage, cycles, content, human presence.
 To enable sharing of data and resources on a very large scale
by eliminating any requirement for separately-managed
servers and their associated infrastructure.
 To support useful distributed services and applications using
data and computing resources present on the Internet in
ever-increasing numbers.
 –standard services scalability limited when all the hosts
must be owned and managed by the single service provider,
 –administration and fault recovery costs tend to dominate.
P2P System-Goal
 design ensures that each user contributes
resources to the system
 all the nodes in a P2P system have the same
functional capabilities and responsibilities,
although they may differ in the resources that
they contribute.
 correctness of any operation does not depend
on the existence of any centrally-administered
systems.
 often designed to offer a limited degree of
anonymity to the providers and users of
resources.
P2P Systems - Features
– algorithms for data placement
across many hosts and subsequent
access to it.
– key issues of these algorithms:
workload balancing, ensuring
availability without adding undue
overheads.
Key issues for P2P systems efficiency
• 1st generation – centralized search–Napster
launched by the Napster music exchange
service.
• 2nd generation – decentralized, unstructured–
Freenet, Gnutella, Kazaa, BitTorrent
(file-sharing applications offering greater
scalability, anonymity and fault tolerance )
• 3rd generation – decentralized, structured–
P2P middleware: Pastry, Tapestry, CAN,
Chord, Kademlia
Three generations of P2P systems:
 Middleware platforms for distributed resources management:
- designed to place resources and to route messages to them on
behalf of clients,
–relieve clients of decisions about placing resources and of
holding resources address information,
–provide guarantee of delivery for requests in a bounded number
of network hops,
–resources identified by globally unique identifiers(GUIDs),
usually derived as a secure hash from resource’s state,
–secure hashes make resources ”self certifying”, clients receiving
a resource can check validity of the hash.
–inherently best suited to storage of immutable objects,
–usage for objects with dynamic state more challenging, usually
addressed by addition of trusted servers for session management
and identification.
P2P Middleware Introduction
Expected functional requirements:
 – enabling clients to locate and communicate with
any individual resource made available to a service,
 – ability to add new resources and to remove them
at will,
 – ability to add hosts to the service and to remove
them,
 – offering simple programming interface
independent of types of managed distributed
resources.
P2P Middleware Requirements
– global scalability,
– load balancing - random placement and usage of
replicas,
– optimization for local interactions between
neighbouring peers,
– accommodating to highly dynamic host availability,
– security of data in an environment with
heterogeneous trust,
– anonymity, deniability and resistance to censorship
Expected non-functional
requirements
 A distributed algorithm which takes responsibility
for locating nodes and objects
 in P2P networks.
General tasks of a routing overlay layer:
– having given GUID routing the request,
– having given GUID publishing the resource,
– service of removal request,
– responsibility allocation depending on changing
view of peers.
Routing overlay
 publish(GUID)
GUID can be computed from the object (or some part of it, e.g.
its name). This function makes the node performing a publish
operation the host for the object corresponding to GUID
 unpublish(GUID)
Makes the object corresponding to GUID inaccessible.
 sendToObj(msg, GUID, [n])
An invocation message is sent to an object in order to access it.
This might be a request to open a TCP connection for data
transfer or to return a message containing all or part of the
object’s state. The final optional parameter [n], if present,
requests the delivery of the same message to n replicas of the
object.
[Basic programming interface for distributed object location and
routing (DOLR) as implemented by Tapestry]
Routing Overlay – DOLR
TAPESTRY
• Tapestry is a decentralized distributed system.
• It is an overlay network that implements
simple key-based routing.
• Each node serves as both an object store and a
router that applications can contact to obtain
objects.
• Objects are “published” at nodes, and once an
object has been successfully published, it is
possible for any other node in the network to
find the location at which that object is
published.
Nodes and objects in the Tapestry
network are each assigned their
own globally unique identifier.
In Tapestry, an ID is a fixed-length
sequence of base-16 digits.
An example of an ID is 2af5.
Identifying Nodes and Objects
 In order to make it possible for any node in the network
to find the location of an object, a single node is
appointed as the “root” node for that object.
 The root node stores the references to the nodes that
actually store the object.
 Because Tapestry is decentralized, and no single node
has a global perspective on the network, the root node
for an object must be chosen in a globally consistent
and deterministic fashion.
 The simplest choice of root node is the one which
shares the same hash value as the object.
Root Nodes
 A “root” node for an object is chosen to be the one with a hash
value that shares the most prefix digits with the object’s hash
value.
 Specifically, two hash values share a prefix of length n if, from
left to right, n sequential digits starting from the leftmost digit
are the same.
 For example, in a network with nodes 1a9c, 28ac, 2d39, and
ae4f, the root node for an object with the hash 280c is 28ac and
the hashes share a prefix of length 2, because the other nodes
share a prefix of length 1 or 0.
 However, given this definition, the choice of root node (from
the same set of nodes as is in the previous example) would be
ill-defined for an object with the hash 2c4f because it shares a
prefix of length one with both 28ac and 2d39.
 Therefore, we need a more general way of choosing the root
node when a single match is unavailable.
Selecting Root Nodes
 Starting with the value v of the leftmost digit, we take the set of
nodes that have this value as the leftmost digit of their hashes as
well.
 If no such set of nodes exists, it is necessary to deterministically
choose another set.
 To do this, we can try to find a set of nodes that share the value v + 1
as their hash’s leftmost value.
 Until a non-empty set of nodes is found, the value of the digit we
are searching with increases (modulo the base of the hash-value).
 Once the set has been found the same logic can be applied for the
next digit in the hash, choosing from the set of nodes we identified
with the previous digit.
 When this algorithm has been applied for every digit, only one node
will be left and that node is the root.
Selecting Root Nodes(Contd..)
 Suppose a Tapestry network contains only the nodes 583f, 70d1, 70f5,
and 70fa.
 To find the root node for an object with a hash of 60f4:
 Take the object’s hash, and find the leftmost digit’s value, 6. None of
the network nodes share this leftmost value, so we check if any
network nodes have the leftmost value 6 + 1 = 7. 70d1, 70f5 and 70fa do,
so we take this set and go to the next digit.
 The object hash’s next digit, 0, is shared with all the network nodes in
the current set, so we go to the next digit.
 The third digit of the object’s hash, f, is shared with only 70f5 and 70fa
so we take this smaller set and go to the last digit.
 The object’s hash has a final digit of 4, which doesn’t match either 5 or
a, so we try with 4 + 1 = 5.
 This matches the network node with a hash of 70f5, so this node is the
object’s root node. If the object’s hash had been 60f6, its root node
would be the network node with the hash 70fa.
Example: A Tapestry Network’s
Objects and their Roots
The table below lists hypothetical object
hashes and their corresponding root nodes
within this network.
 To allow nodes to locate objects stored at other nodes, each node
maintains a routing table that stores references to a subset of the
nodes in the network.
 A routing table has several levels; one level for each digit of the
node’s ID. In a Tapestry mesh that uses 40-digit IDs, the routing table
would thus have 40 levels. The level represents the size of the shared
prefix with the local node; that is, a node on level n of the routing
table shares a prefix of length n with the local node.
 Each level of the table consists of several slots; one for each unique
digit. In a tapestry mesh that uses base-16 digits, each level of the
routing table would therefore have 16 slots.
 A node in the d’th slot of the n’th level has d as its n’th digit. (Keep in
mind that n is zero-indexed!)
 For example, in the table given, the entry at level 1 in slot 6 (362d)
shares a prefix of length 1 (because it’s on level 1) and is slot 6
(because the next digit is 6). If there had been an ID of 3782, then on
level 1 in slot 7 we would see this ID.
Routing Table
 In summary, a routing table entry is defined by two
numbers: its level and slot.
 So a node on level 0 has no shared prefix with the
local node. The slot is defined by the first digit after
the shared prefix, that is, id[n] where id is a list of the
digits of the node’s ID.
 An example routing table for a node with the hash
3f93 is shown below:
Routing Tables(Contd..)
 For robustness and redundancy, each
slot of the routing table actually stores
multiple references, typically three.
 The first one is the closest node, and the
others are backups in case the first one
fails to respond to requests.
 These are sorted by distance to the local
node.
Routing Tables(Contd..)
 The routing table at any given node does not store a reference to
every other node in the network.
 Therefore, in order to find the root node for a particular ID, several
nodes may be traversed until one is found that can definitively
identify itself as the root node.
 The search for a root node may begin anywhere.
 Using the same logic that is used to choose a root node globally
from the network, a node that matches some number of digits from
the object’s hash may be chosen from the routing table.
 In turn, the selected node’s routing table is inspected and the next
node in the route to the root is chosen.
 At each successive node in the route, the number of digits that
match the object’s hash value increases until the last digit has been
matched and the root node has been reached.
 This type of routing is called “prefix routing”, and the maximum
number of hops required to reach the destination node is equal to
the number of digits required to represent a hash value
Prefix Routing
 When an object is “published” by a node, that node
routes towards the root node for the key, then
registers itself on that node as a location of the key.
 Multiple nodes can publish the same object.
 A tapestry client wishing to lookup the object will
first route to the root node of the object.
 The root node then informs the client of which
Tapestry nodes are the ones that have published the
object.
 The client then directly contacts one or more of
those publishers to retrieve the actual object data.
Publishing and Retrieving Objects
 To accommodate an increased workload, it is possible
to add nodes to a Tapestry network.
 To perform this operation, the new node is assigned
its ID and then routes towards the root node for that
id.
 The root node initiates the transfer of all keys that
should now be stored on the new node.
 The new node then iteratively traverses backpointers,
starting from the root node, to populate its own
routing table.
Adding Tapestry Nodes
 A good implementation of Tapestry is extremely
fault tolerant, so a node could leave without
notifying any other nodes.
 However, a node can gracefully exit the Tapestry,
too. When a node gracefully exits, it notifies all of
the nodes in its backpointer table of the leave.
 As part of this notification, it consults its own
routing table to find a suitable replacement for the
routing tables of all the other nodes.
Graceful Exits
Tapestry Routing-Example
Thank You

More Related Content

What's hot

distributed shared memory
 distributed shared memory distributed shared memory
distributed shared memoryAshish Kumar
 
Computer Networks Unit 2 UNIT II DATA-LINK LAYER & MEDIA ACCESS
Computer Networks Unit 2 UNIT II DATA-LINK LAYER & MEDIA ACCESSComputer Networks Unit 2 UNIT II DATA-LINK LAYER & MEDIA ACCESS
Computer Networks Unit 2 UNIT II DATA-LINK LAYER & MEDIA ACCESSDr. SELVAGANESAN S
 
Google File System
Google File SystemGoogle File System
Google File Systemguest2cb4689
 
BASICS OF ROUTING IN NETWORKS
BASICS OF ROUTING IN NETWORKSBASICS OF ROUTING IN NETWORKS
BASICS OF ROUTING IN NETWORKSKABILESH RAMAR
 
Concurrency Control in Distributed Database.
Concurrency Control in Distributed Database.Concurrency Control in Distributed Database.
Concurrency Control in Distributed Database.Meghaj Mallick
 
Global state recording in Distributed Systems
Global state recording in Distributed SystemsGlobal state recording in Distributed Systems
Global state recording in Distributed SystemsArsnet
 
Transactions and Concurrency Control
Transactions and Concurrency ControlTransactions and Concurrency Control
Transactions and Concurrency ControlDilum Bandara
 
Token, Pattern and Lexeme
Token, Pattern and LexemeToken, Pattern and Lexeme
Token, Pattern and LexemeA. S. M. Shafi
 
Deadlock in Distributed Systems
Deadlock in Distributed SystemsDeadlock in Distributed Systems
Deadlock in Distributed SystemsPritom Saha Akash
 
Query processing and optimization (updated)
Query processing and optimization (updated)Query processing and optimization (updated)
Query processing and optimization (updated)Ravinder Kamboj
 
Issues in routing protocol
Issues in routing protocolIssues in routing protocol
Issues in routing protocolPradeep Kumar TS
 
QOS (Quality of Services) - Computer Networks
 QOS (Quality of Services) - Computer Networks QOS (Quality of Services) - Computer Networks
QOS (Quality of Services) - Computer NetworksIIIT Manipur
 
Query processing in Distributed Database System
Query processing in Distributed Database SystemQuery processing in Distributed Database System
Query processing in Distributed Database SystemMeghaj Mallick
 
File models and file accessing models
File models and file accessing modelsFile models and file accessing models
File models and file accessing modelsishmecse13
 

What's hot (20)

Routing protocols
Routing protocolsRouting protocols
Routing protocols
 
Transport layer protocol
Transport layer protocolTransport layer protocol
Transport layer protocol
 
distributed shared memory
 distributed shared memory distributed shared memory
distributed shared memory
 
Computer Networks: Quality of service
Computer Networks: Quality of serviceComputer Networks: Quality of service
Computer Networks: Quality of service
 
Computer Networks Unit 2 UNIT II DATA-LINK LAYER & MEDIA ACCESS
Computer Networks Unit 2 UNIT II DATA-LINK LAYER & MEDIA ACCESSComputer Networks Unit 2 UNIT II DATA-LINK LAYER & MEDIA ACCESS
Computer Networks Unit 2 UNIT II DATA-LINK LAYER & MEDIA ACCESS
 
Google File System
Google File SystemGoogle File System
Google File System
 
Link state routing protocol
Link state routing protocolLink state routing protocol
Link state routing protocol
 
BASICS OF ROUTING IN NETWORKS
BASICS OF ROUTING IN NETWORKSBASICS OF ROUTING IN NETWORKS
BASICS OF ROUTING IN NETWORKS
 
Concurrency Control in Distributed Database.
Concurrency Control in Distributed Database.Concurrency Control in Distributed Database.
Concurrency Control in Distributed Database.
 
Global state recording in Distributed Systems
Global state recording in Distributed SystemsGlobal state recording in Distributed Systems
Global state recording in Distributed Systems
 
Transactions and Concurrency Control
Transactions and Concurrency ControlTransactions and Concurrency Control
Transactions and Concurrency Control
 
Token, Pattern and Lexeme
Token, Pattern and LexemeToken, Pattern and Lexeme
Token, Pattern and Lexeme
 
Deadlock in Distributed Systems
Deadlock in Distributed SystemsDeadlock in Distributed Systems
Deadlock in Distributed Systems
 
Query processing and optimization (updated)
Query processing and optimization (updated)Query processing and optimization (updated)
Query processing and optimization (updated)
 
Quality of Service
Quality of ServiceQuality of Service
Quality of Service
 
Issues in routing protocol
Issues in routing protocolIssues in routing protocol
Issues in routing protocol
 
QOS (Quality of Services) - Computer Networks
 QOS (Quality of Services) - Computer Networks QOS (Quality of Services) - Computer Networks
QOS (Quality of Services) - Computer Networks
 
Query processing in Distributed Database System
Query processing in Distributed Database SystemQuery processing in Distributed Database System
Query processing in Distributed Database System
 
File models and file accessing models
File models and file accessing modelsFile models and file accessing models
File models and file accessing models
 
Mobile IP
Mobile IPMobile IP
Mobile IP
 

Similar to Tapestry

Routing Protocols of Distributed Hash Table Based Peer to Peer Networks
Routing Protocols of Distributed Hash Table Based Peer to Peer NetworksRouting Protocols of Distributed Hash Table Based Peer to Peer Networks
Routing Protocols of Distributed Hash Table Based Peer to Peer NetworksIOSR Journals
 
UNIT III DIS.pptx
UNIT III DIS.pptxUNIT III DIS.pptx
UNIT III DIS.pptxSamPrem3
 
Peer to peer Paradigms
Peer to peer ParadigmsPeer to peer Paradigms
Peer to peer Paradigmshassan ahmed
 
Unit 3 cs6601 Distributed Systems
Unit 3 cs6601 Distributed SystemsUnit 3 cs6601 Distributed Systems
Unit 3 cs6601 Distributed SystemsNandakumar P
 
Implementing a Distributed Hash Table with Scala and Akka
Implementing a Distributed Hash Table with Scala and AkkaImplementing a Distributed Hash Table with Scala and Akka
Implementing a Distributed Hash Table with Scala and AkkaTristan Penman
 
P2P Lookup Protocols
P2P Lookup ProtocolsP2P Lookup Protocols
P2P Lookup ProtocolsZubin Bhuyan
 
COMPARATIVE STUDY OF CAN, PASTRY, KADEMLIA AND CHORD DHTS
COMPARATIVE STUDY OF CAN, PASTRY, KADEMLIA  AND CHORD DHTS COMPARATIVE STUDY OF CAN, PASTRY, KADEMLIA  AND CHORD DHTS
COMPARATIVE STUDY OF CAN, PASTRY, KADEMLIA AND CHORD DHTS ijp2p
 
COMPARATIVE STUDY OF CAN, PASTRY, KADEMLIA AND CHORD DHTS
COMPARATIVE STUDY OF CAN, PASTRY, KADEMLIA AND CHORD DHTSCOMPARATIVE STUDY OF CAN, PASTRY, KADEMLIA AND CHORD DHTS
COMPARATIVE STUDY OF CAN, PASTRY, KADEMLIA AND CHORD DHTSijp2p
 
Java Abs Peer To Peer Design & Implementation Of A Tuple Space
Java Abs   Peer To Peer Design & Implementation Of A Tuple SpaceJava Abs   Peer To Peer Design & Implementation Of A Tuple Space
Java Abs Peer To Peer Design & Implementation Of A Tuple Spacencct
 
Java Abs Peer To Peer Design & Implementation Of A Tuple S
Java Abs   Peer To Peer Design & Implementation Of A Tuple SJava Abs   Peer To Peer Design & Implementation Of A Tuple S
Java Abs Peer To Peer Design & Implementation Of A Tuple Sncct
 
IRJET- Estimating Various DHT Protocols
IRJET- Estimating Various DHT ProtocolsIRJET- Estimating Various DHT Protocols
IRJET- Estimating Various DHT ProtocolsIRJET Journal
 
Detection of Duplicate Address in Mobile Adhoc Networks for On Demand Routing...
Detection of Duplicate Address in Mobile Adhoc Networks for On Demand Routing...Detection of Duplicate Address in Mobile Adhoc Networks for On Demand Routing...
Detection of Duplicate Address in Mobile Adhoc Networks for On Demand Routing...IJMER
 

Similar to Tapestry (20)

Routing Protocols of Distributed Hash Table Based Peer to Peer Networks
Routing Protocols of Distributed Hash Table Based Peer to Peer NetworksRouting Protocols of Distributed Hash Table Based Peer to Peer Networks
Routing Protocols of Distributed Hash Table Based Peer to Peer Networks
 
UNIT III DIS.pptx
UNIT III DIS.pptxUNIT III DIS.pptx
UNIT III DIS.pptx
 
Kademlia introduction
Kademlia introductionKademlia introduction
Kademlia introduction
 
Peer to peer Paradigms
Peer to peer ParadigmsPeer to peer Paradigms
Peer to peer Paradigms
 
UNIT V.pdf
UNIT V.pdfUNIT V.pdf
UNIT V.pdf
 
Unit 3 cs6601 Distributed Systems
Unit 3 cs6601 Distributed SystemsUnit 3 cs6601 Distributed Systems
Unit 3 cs6601 Distributed Systems
 
Implementing a Distributed Hash Table with Scala and Akka
Implementing a Distributed Hash Table with Scala and AkkaImplementing a Distributed Hash Table with Scala and Akka
Implementing a Distributed Hash Table with Scala and Akka
 
P2P Lookup Protocols
P2P Lookup ProtocolsP2P Lookup Protocols
P2P Lookup Protocols
 
COMPARATIVE STUDY OF CAN, PASTRY, KADEMLIA AND CHORD DHTS
COMPARATIVE STUDY OF CAN, PASTRY, KADEMLIA  AND CHORD DHTS COMPARATIVE STUDY OF CAN, PASTRY, KADEMLIA  AND CHORD DHTS
COMPARATIVE STUDY OF CAN, PASTRY, KADEMLIA AND CHORD DHTS
 
COMPARATIVE STUDY OF CAN, PASTRY, KADEMLIA AND CHORD DHTS
COMPARATIVE STUDY OF CAN, PASTRY, KADEMLIA AND CHORD DHTSCOMPARATIVE STUDY OF CAN, PASTRY, KADEMLIA AND CHORD DHTS
COMPARATIVE STUDY OF CAN, PASTRY, KADEMLIA AND CHORD DHTS
 
Java Abs Peer To Peer Design & Implementation Of A Tuple Space
Java Abs   Peer To Peer Design & Implementation Of A Tuple SpaceJava Abs   Peer To Peer Design & Implementation Of A Tuple Space
Java Abs Peer To Peer Design & Implementation Of A Tuple Space
 
Java Abs Peer To Peer Design & Implementation Of A Tuple S
Java Abs   Peer To Peer Design & Implementation Of A Tuple SJava Abs   Peer To Peer Design & Implementation Of A Tuple S
Java Abs Peer To Peer Design & Implementation Of A Tuple S
 
IRJET- Estimating Various DHT Protocols
IRJET- Estimating Various DHT ProtocolsIRJET- Estimating Various DHT Protocols
IRJET- Estimating Various DHT Protocols
 
Wsn
WsnWsn
Wsn
 
Mohanccna
MohanccnaMohanccna
Mohanccna
 
TCP/IP 3RD SEM.2012 AUG.ASSIGNMENT
TCP/IP 3RD SEM.2012 AUG.ASSIGNMENTTCP/IP 3RD SEM.2012 AUG.ASSIGNMENT
TCP/IP 3RD SEM.2012 AUG.ASSIGNMENT
 
Unit 3
Unit 3Unit 3
Unit 3
 
Introduction P2p
Introduction P2pIntroduction P2p
Introduction P2p
 
Detection of Duplicate Address in Mobile Adhoc Networks for On Demand Routing...
Detection of Duplicate Address in Mobile Adhoc Networks for On Demand Routing...Detection of Duplicate Address in Mobile Adhoc Networks for On Demand Routing...
Detection of Duplicate Address in Mobile Adhoc Networks for On Demand Routing...
 
Bc32356359
Bc32356359Bc32356359
Bc32356359
 

Recently uploaded

HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICSHARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICSRajkumarAkumalla
 
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxJoão Esperancinha
 
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130Suhani Kapoor
 
Introduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxIntroduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxupamatechverse
 
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...ranjana rawat
 
(TARA) Talegaon Dabhade Call Girls Just Call 7001035870 [ Cash on Delivery ] ...
(TARA) Talegaon Dabhade Call Girls Just Call 7001035870 [ Cash on Delivery ] ...(TARA) Talegaon Dabhade Call Girls Just Call 7001035870 [ Cash on Delivery ] ...
(TARA) Talegaon Dabhade Call Girls Just Call 7001035870 [ Cash on Delivery ] ...ranjana rawat
 
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Call Girls in Nagpur High Profile
 
Coefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxCoefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxAsutosh Ranjan
 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )Tsuyoshi Horigome
 
Introduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxIntroduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxupamatechverse
 
Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxpurnimasatapathy1234
 
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...Call Girls in Nagpur High Profile
 
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escortsranjana rawat
 
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝soniya singh
 
Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxIntroduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxupamatechverse
 

Recently uploaded (20)

HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICSHARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
 
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
 
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
 
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCRCall Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
 
Introduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxIntroduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptx
 
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINEDJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
 
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
 
(TARA) Talegaon Dabhade Call Girls Just Call 7001035870 [ Cash on Delivery ] ...
(TARA) Talegaon Dabhade Call Girls Just Call 7001035870 [ Cash on Delivery ] ...(TARA) Talegaon Dabhade Call Girls Just Call 7001035870 [ Cash on Delivery ] ...
(TARA) Talegaon Dabhade Call Girls Just Call 7001035870 [ Cash on Delivery ] ...
 
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
 
Coefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxCoefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptx
 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )
 
Introduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxIntroduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptx
 
Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptx
 
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
 
Roadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and RoutesRoadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and Routes
 
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
 
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
 
Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxIntroduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptx
 

Tapestry

  • 1. TAPESTRY- Peer to Peer Overlay Network CS8603-Distributed Systems V.Sutha Jebakumari AP/CSE, KCET 07.04.2020
  • 3.  Peer-to Peer(P2P) is a way of structuring distributed applications such that the individual nodes have symmetric roles. Rather than being divided into clients and servers each with quite distinct roles, in P2P applications a node may act as both a client and a server.  Peers play similar roles.  No distinction of responsibilities P2P system
  • 4.  Applications that exploit resources available at the edges of the Internet - storage, cycles, content, human presence.  To enable sharing of data and resources on a very large scale by eliminating any requirement for separately-managed servers and their associated infrastructure.  To support useful distributed services and applications using data and computing resources present on the Internet in ever-increasing numbers.  –standard services scalability limited when all the hosts must be owned and managed by the single service provider,  –administration and fault recovery costs tend to dominate. P2P System-Goal
  • 5.  design ensures that each user contributes resources to the system  all the nodes in a P2P system have the same functional capabilities and responsibilities, although they may differ in the resources that they contribute.  correctness of any operation does not depend on the existence of any centrally-administered systems.  often designed to offer a limited degree of anonymity to the providers and users of resources. P2P Systems - Features
  • 6. – algorithms for data placement across many hosts and subsequent access to it. – key issues of these algorithms: workload balancing, ensuring availability without adding undue overheads. Key issues for P2P systems efficiency
  • 7. • 1st generation – centralized search–Napster launched by the Napster music exchange service. • 2nd generation – decentralized, unstructured– Freenet, Gnutella, Kazaa, BitTorrent (file-sharing applications offering greater scalability, anonymity and fault tolerance ) • 3rd generation – decentralized, structured– P2P middleware: Pastry, Tapestry, CAN, Chord, Kademlia Three generations of P2P systems:
  • 8.  Middleware platforms for distributed resources management: - designed to place resources and to route messages to them on behalf of clients, –relieve clients of decisions about placing resources and of holding resources address information, –provide guarantee of delivery for requests in a bounded number of network hops, –resources identified by globally unique identifiers(GUIDs), usually derived as a secure hash from resource’s state, –secure hashes make resources ”self certifying”, clients receiving a resource can check validity of the hash. –inherently best suited to storage of immutable objects, –usage for objects with dynamic state more challenging, usually addressed by addition of trusted servers for session management and identification. P2P Middleware Introduction
  • 9. Expected functional requirements:  – enabling clients to locate and communicate with any individual resource made available to a service,  – ability to add new resources and to remove them at will,  – ability to add hosts to the service and to remove them,  – offering simple programming interface independent of types of managed distributed resources. P2P Middleware Requirements
  • 10. – global scalability, – load balancing - random placement and usage of replicas, – optimization for local interactions between neighbouring peers, – accommodating to highly dynamic host availability, – security of data in an environment with heterogeneous trust, – anonymity, deniability and resistance to censorship Expected non-functional requirements
  • 11.  A distributed algorithm which takes responsibility for locating nodes and objects  in P2P networks. General tasks of a routing overlay layer: – having given GUID routing the request, – having given GUID publishing the resource, – service of removal request, – responsibility allocation depending on changing view of peers. Routing overlay
  • 12.  publish(GUID) GUID can be computed from the object (or some part of it, e.g. its name). This function makes the node performing a publish operation the host for the object corresponding to GUID  unpublish(GUID) Makes the object corresponding to GUID inaccessible.  sendToObj(msg, GUID, [n]) An invocation message is sent to an object in order to access it. This might be a request to open a TCP connection for data transfer or to return a message containing all or part of the object’s state. The final optional parameter [n], if present, requests the delivery of the same message to n replicas of the object. [Basic programming interface for distributed object location and routing (DOLR) as implemented by Tapestry] Routing Overlay – DOLR
  • 13. TAPESTRY • Tapestry is a decentralized distributed system. • It is an overlay network that implements simple key-based routing. • Each node serves as both an object store and a router that applications can contact to obtain objects. • Objects are “published” at nodes, and once an object has been successfully published, it is possible for any other node in the network to find the location at which that object is published.
  • 14. Nodes and objects in the Tapestry network are each assigned their own globally unique identifier. In Tapestry, an ID is a fixed-length sequence of base-16 digits. An example of an ID is 2af5. Identifying Nodes and Objects
  • 15.  In order to make it possible for any node in the network to find the location of an object, a single node is appointed as the “root” node for that object.  The root node stores the references to the nodes that actually store the object.  Because Tapestry is decentralized, and no single node has a global perspective on the network, the root node for an object must be chosen in a globally consistent and deterministic fashion.  The simplest choice of root node is the one which shares the same hash value as the object. Root Nodes
  • 16.  A “root” node for an object is chosen to be the one with a hash value that shares the most prefix digits with the object’s hash value.  Specifically, two hash values share a prefix of length n if, from left to right, n sequential digits starting from the leftmost digit are the same.  For example, in a network with nodes 1a9c, 28ac, 2d39, and ae4f, the root node for an object with the hash 280c is 28ac and the hashes share a prefix of length 2, because the other nodes share a prefix of length 1 or 0.  However, given this definition, the choice of root node (from the same set of nodes as is in the previous example) would be ill-defined for an object with the hash 2c4f because it shares a prefix of length one with both 28ac and 2d39.  Therefore, we need a more general way of choosing the root node when a single match is unavailable. Selecting Root Nodes
  • 17.  Starting with the value v of the leftmost digit, we take the set of nodes that have this value as the leftmost digit of their hashes as well.  If no such set of nodes exists, it is necessary to deterministically choose another set.  To do this, we can try to find a set of nodes that share the value v + 1 as their hash’s leftmost value.  Until a non-empty set of nodes is found, the value of the digit we are searching with increases (modulo the base of the hash-value).  Once the set has been found the same logic can be applied for the next digit in the hash, choosing from the set of nodes we identified with the previous digit.  When this algorithm has been applied for every digit, only one node will be left and that node is the root. Selecting Root Nodes(Contd..)
  • 18.  Suppose a Tapestry network contains only the nodes 583f, 70d1, 70f5, and 70fa.  To find the root node for an object with a hash of 60f4:  Take the object’s hash, and find the leftmost digit’s value, 6. None of the network nodes share this leftmost value, so we check if any network nodes have the leftmost value 6 + 1 = 7. 70d1, 70f5 and 70fa do, so we take this set and go to the next digit.  The object hash’s next digit, 0, is shared with all the network nodes in the current set, so we go to the next digit.  The third digit of the object’s hash, f, is shared with only 70f5 and 70fa so we take this smaller set and go to the last digit.  The object’s hash has a final digit of 4, which doesn’t match either 5 or a, so we try with 4 + 1 = 5.  This matches the network node with a hash of 70f5, so this node is the object’s root node. If the object’s hash had been 60f6, its root node would be the network node with the hash 70fa. Example: A Tapestry Network’s Objects and their Roots
  • 19. The table below lists hypothetical object hashes and their corresponding root nodes within this network.
  • 20.  To allow nodes to locate objects stored at other nodes, each node maintains a routing table that stores references to a subset of the nodes in the network.  A routing table has several levels; one level for each digit of the node’s ID. In a Tapestry mesh that uses 40-digit IDs, the routing table would thus have 40 levels. The level represents the size of the shared prefix with the local node; that is, a node on level n of the routing table shares a prefix of length n with the local node.  Each level of the table consists of several slots; one for each unique digit. In a tapestry mesh that uses base-16 digits, each level of the routing table would therefore have 16 slots.  A node in the d’th slot of the n’th level has d as its n’th digit. (Keep in mind that n is zero-indexed!)  For example, in the table given, the entry at level 1 in slot 6 (362d) shares a prefix of length 1 (because it’s on level 1) and is slot 6 (because the next digit is 6). If there had been an ID of 3782, then on level 1 in slot 7 we would see this ID. Routing Table
  • 21.  In summary, a routing table entry is defined by two numbers: its level and slot.  So a node on level 0 has no shared prefix with the local node. The slot is defined by the first digit after the shared prefix, that is, id[n] where id is a list of the digits of the node’s ID.  An example routing table for a node with the hash 3f93 is shown below: Routing Tables(Contd..)
  • 22.  For robustness and redundancy, each slot of the routing table actually stores multiple references, typically three.  The first one is the closest node, and the others are backups in case the first one fails to respond to requests.  These are sorted by distance to the local node. Routing Tables(Contd..)
  • 23.  The routing table at any given node does not store a reference to every other node in the network.  Therefore, in order to find the root node for a particular ID, several nodes may be traversed until one is found that can definitively identify itself as the root node.  The search for a root node may begin anywhere.  Using the same logic that is used to choose a root node globally from the network, a node that matches some number of digits from the object’s hash may be chosen from the routing table.  In turn, the selected node’s routing table is inspected and the next node in the route to the root is chosen.  At each successive node in the route, the number of digits that match the object’s hash value increases until the last digit has been matched and the root node has been reached.  This type of routing is called “prefix routing”, and the maximum number of hops required to reach the destination node is equal to the number of digits required to represent a hash value Prefix Routing
  • 24.  When an object is “published” by a node, that node routes towards the root node for the key, then registers itself on that node as a location of the key.  Multiple nodes can publish the same object.  A tapestry client wishing to lookup the object will first route to the root node of the object.  The root node then informs the client of which Tapestry nodes are the ones that have published the object.  The client then directly contacts one or more of those publishers to retrieve the actual object data. Publishing and Retrieving Objects
  • 25.  To accommodate an increased workload, it is possible to add nodes to a Tapestry network.  To perform this operation, the new node is assigned its ID and then routes towards the root node for that id.  The root node initiates the transfer of all keys that should now be stored on the new node.  The new node then iteratively traverses backpointers, starting from the root node, to populate its own routing table. Adding Tapestry Nodes
  • 26.  A good implementation of Tapestry is extremely fault tolerant, so a node could leave without notifying any other nodes.  However, a node can gracefully exit the Tapestry, too. When a node gracefully exits, it notifies all of the nodes in its backpointer table of the leave.  As part of this notification, it consults its own routing table to find a suitable replacement for the routing tables of all the other nodes. Graceful Exits