Slides For Chapter 10: Peer-to-Peer Systems: Distributed Systems: Concepts and Design
Slides For Chapter 10: Peer-to-Peer Systems: Distributed Systems: Concepts and Design
Peer-to-Peer Systems
IP Applicationlevelroutingover lay
Scale IPv4islimitedto232addressable nodes.The Peertopeersystemscanaddress moreobjects.
IPv6namespaceismuchmore generous TheGUIDnamespaceisverylarge andflat
(2128),butaddressesinbothversionsare (>2128),allowingittobemuchmore fully
hierarchicallystructureda ndmuchofthespace occupied.
ispreallocatedaccordi ngtoadministrative
requirements.
Loadbalanc ing Loadsonroutersaredetermin edbynetwork Objectlocationscanbera ndomizedandhence
topologyandassociatedtrafficpatterns. trafficpatternsaredivorcedfromthenetwork
topology.
Networkdynamics IProutingtablesareupdatedasy nchronouslyonRoutingtablescanbeu pdatedsynchronouslyor
(addition/deletionof abesteffortsbasiswithtimeconstantson the asynchronouslywithfractionsofasecond
objects/nodes) orderof1hour. delays.
Faulttolerance RedundancyisdesignedintotheIPnetworkby Routesandobjectrefer encescanbereplicated
itsmanagers,ensuringtoleran ceofasingle nfold,ensuringtoleran ceofnfailuresofnodes
routerornetworkco nnectivityfailure.nfold orconnections.
replicationiscostly.
Targetidentificatio n EachIPaddressmapstoexactlyonetarget Messagescanberout edtothenearestreplicaof
node. atargetobject.
Securityand anonymity Addressingisonlysecu rewhenallnodesare Securitycanbeachiev edeveninenvironments
trusted.Anonymityfortheownersof addresses withlimitedtrust.Alimiteddegreeof
isnotachievable. anonymitycanbeprovided.
InstructorsGuideforCoulouris,Dollimore,KindbergandBlair,DistributedSystems:ConceptsandDesignEdn.5
PearsonEducation2012
Figure 10.2: Napster: peer-to-peer file sharing with a centralized,
replicated index
peers
InstructorsGuideforCoulouris,Dollimore,KindbergandBlair,DistributedSystems:ConceptsandDesignEdn.5
PearsonEducation2012
Figure 10.3: Distribution of information in a routing overlay
A
D
Object:
Bs routing knowledge Cs routing knowledge
Node:
InstructorsGuideforCoulouris,Dollimore,KindbergandBlair,DistributedSystems:ConceptsandDesignEdn.5
PearsonEducation2012
Figure 10.4: Basic programming interface for a distributed hash table
(DHT) as implemented by the PAST API over Pastry
put(GUID,data)
Thedataisstoredinreplicasatallnodesresponsiblefortheobject
identifiedbyGUID.
remove(GUID)
DeletesallreferencestoGUIDandtheassociateddata.
value=get(GUID)
ThedataassociatedwithGUIDisretrievedfromoneofthenodes
responsibleit.
InstructorsGuideforCoulouris,Dollimore,KindbergandBlair,DistributedSystems:ConceptsandDesignEdn.5
PearsonEducation2012
Figure 10.5: Basic programming interface for distributed object location
and routing (DOLR) as implemented by Tapestry
publish(GUID )
GUIDcanbecomputedfromtheobject(orsomepartofit,e.g.its
name).Thisfunctionmakesthenodeperformingapublish
operationthehostfortheobjectcorrespondingtoGUID.
unpublish(GUID)
MakestheobjectcorrespondingtoGUIDinaccessible.
sendToObj(msg,GUID,[n])
Followingtheobjectorientedparadigm,aninvocationmessageis
senttoanobjectinordertoaccessit.Thismightbearequestto
openaTCPconnectionfordatatransferortoreturnamessage
containingallorpartoftheobjectsstate.Thefinaloptional
parameter[n],ifpresent,requeststhedeliveryofthesame
messagetonreplicasoftheobject.
InstructorsGuideforCoulouris,Dollimore,KindbergandBlair,DistributedSystems:ConceptsandDesignEdn.5
PearsonEducation2012
Figure 10.6: Circular routing alone is correct but inefficient
Based on Rowstron and Druschel [2001]
D13DA3
65A1FC
InstructorsGuideforCoulouris,Dollimore,KindbergandBlair,DistributedSystems:ConceptsandDesignEdn.5
PearsonEducation2012
Figure 10.7: First four rows of a Pastry routing table
The routing table is located at a node whose GUID begins 65A1. Digits are in hexadecimal. The ns represent [GUID, IP address] pairs specifying the next
hop to be taken by messages addressed to GUIDs that match each given prefix. Grey- shaded entries indicate that the prefix matches the current GUID up
to the given value of p: the next row down or the leaf set should be examined to find a route. Although there are a maximum of 128 rows in the table, only
log16 N rows will be populated on average in a network with N active nodes.
InstructorsGuideforCoulouris,Dollimore,KindbergandBlair,DistributedSystems:ConceptsandDesignEdn.5
PearsonEducation2012
Figure 10.8: Pastry routing example Based on Rowstron and Druschel [2001]
D471F1
D467C4
D46A1C D462BA
D4213F
D13DA3
65A1FC
InstructorsGuideforCoulouris,Dollimore,KindbergandBlair,DistributedSystems:ConceptsandDesignEdn.5
PearsonEducation2012
Figure 10.9: Pastrys routing algorithm
Tohandleamessage MaddressedtoanodeD(whereR[p,i]istheelementatcolumn i,
rowpoftheroutingtable):
1. If(L l<D<Ll){//thedestinationiswithintheleafsetoristhecurrentnode.
2. ForwardMtotheelementL ioftheleafsetwithGUIDclosesttoDorthecurrent
nodeA.
3. }else{//usetheroutingtabletodespatch MtoanodewithacloserGUID
4. findp,thelengthofthelongestcommonprefixof DandA.andi,the( p+1)th
hexadecimaldigitofD .
5. If(R[p,i]null)forwardMtoR[p,i]//routeMtoanodewithalongercommon
prefix.
6. else{//thereisnoentryintheroutingtable
7. ForwardMtoanynodeinLorRwithacommonprefixoflengthi,buta
GUIDthatisnumericallycloser.
}
}
InstructorsGuideforCoulouris,Dollimore,KindbergandBlair,DistributedSystems:ConceptsandDesignEdn.5
PearsonEducation2012
Figure 10.10: Tapestry routing From [Zhao et al. 2004]
43FE 437A
publish path
4228
4361
Location mapping 4378
Phils 4664
for 4378
Books
4B4F 4A6D
Routes actually
taken by send(4378) E791 4378
57EC AA93 Phils
Books
Replicas of the file Phils Books (G=4378) are hosted at nodes 4228 and AA93. Node 4377 is the root node
for object 4378. The Tapestry routings shown are some of the entries in routing tables. The publish paths show
routes followed by the publish messages laying down cached location mappings for object 4378. The location
mappings are subsequently used to route messages sent to 4378.
InstructorsGuideforCoulouris,Dollimore,KindbergandBlair,DistributedSystems:ConceptsandDesignEdn.5
PearsonEducation2012
Figure 10.11: Structured versus unstructured peer-to-peer systems
InstructorsGuideforCoulouris,Dollimore,KindbergandBlair,DistributedSystems:ConceptsandDesignEdn.5
PearsonEducation2012
Figure 10.12: Key elements in the Gnutella protocol
InstructorsGuideforCoulouris,Dollimore,KindbergandBlair,DistributedSystems:ConceptsandDesignEdn.5
PearsonEducation2012 1
3
Figure 10.13: Storage organization of OceanStore objects
AGUID
VGUID of current
certificate
version
version i+1
VGUID of
root block
data blocks d1 d2 d3 d4 d5
Version i+1 has been updated in blocks d1,
d2 and d3. The certificate and the root
VGUID of version i-1
blocks include some metadata not shown.
All unlabelled arrows are BGUIDs.
InstructorsGuideforCoulouris,Dollimore,KindbergandBlair,DistributedSystems:ConceptsandDesignEdn.5
PearsonEducation2012
Figure 10.14: Types of identifier used in OceanStore
InstructorsGuideforCoulouris,Dollimore,KindbergandBlair,DistributedSystems:ConceptsandDesignEdn.5
PearsonEducation2012
Figure 10.15: Performance evaluation of the Pond prototype emulating NFS
InstructorsGuideforCoulouris,Dollimore,KindbergandBlair,DistributedSystems:ConceptsandDesignEdn.5
PearsonEducation2012
Figure 10.16: Ivy system architecture
Ivy node
DHash server
Application Application
DHash server
DHash server
Modifled
NFS Client
module DHash server
Kernel
InstructorsGuideforCoulouris,Dollimore,KindbergandBlair,DistributedSystems:ConceptsandDesignEdn.5
PearsonEducation2012