Beruflich Dokumente
Kultur Dokumente
Peer-to-Peer Systems
Distributed Systems:
Concepts and Design
Edition 5, Addison-Wesley 2012
Figure 10.1: Distinctions between IP and overlay routing for peer-topeer applications
IP
Applicationlevelroutingover lay
IPv4islimitedto232addressable nodes.The
IPv6namespaceismuchmore generous
(2128),butaddressesinbothversionsare
hierarchicallystructureda ndmuchofthespace
ispreallocatedaccordi ngtoadministrative
requirements.
Loadsonroutersaredetermin edbynetwork
topologyandassociatedtrafficpatterns.
Peertopeersystemscanaddress moreobjects.
TheGUIDnamespaceisverylarge andflat
(>2128),allowingittobemuchmore fully
occupied.
Objectlocationscanbera ndomizedandhence
trafficpatternsaredivorcedfromthenetwork
topology.
IProutingtablesareupdatedasy nchronouslyonRoutingtablescanbeu pdatedsynchronouslyor
abesteffortsbasiswithtimeconstantson the asynchronouslywithfractionsofasecond
orderof1hour.
delays.
RedundancyisdesignedintotheIPnetworkby Routesandobjectrefer encescanbereplicated
itsmanagers,ensuringtoleran ceofasingle
nfold,ensuringtoleran ceofnfailuresofnodes
routerornetworkco nnectivityfailure.nfold orconnections.
replicationiscostly.
EachIPaddressmapstoexactlyonetarget
Messagescanberout edtothenearestreplicaof
node.
atargetobject.
Addressingisonlysecu rewhenallnodesare Securitycanbeachiev edeveninenvironments
trusted.Anonymityfortheownersof addresses withlimitedtrust.Alimiteddegreeof
isnotachievable.
anonymitycanbeprovided.
InstructorsGuideforCoulouris,Dollimore,KindbergandBlair,DistributedSystems:ConceptsandDesignEdn.5
PearsonEducation2012
peers
Napster server
Index
1. File location
request
2. List of peers
offering the file
5. Index update
Napster server
Index
3. File request
4. File delivered
InstructorsGuideforCoulouris,Dollimore,KindbergandBlair,DistributedSystems:ConceptsandDesignEdn.5
PearsonEducation2012
A
D
B
Object:
Node:
Bs routing knowledge
Cs routing knowledge
InstructorsGuideforCoulouris,Dollimore,KindbergandBlair,DistributedSystems:ConceptsandDesignEdn.5
PearsonEducation2012
put(GUID,data)
Thedataisstoredinreplicasatallnodesresponsiblefortheobject
identifiedbyGUID.
remove(GUID)
DeletesallreferencestoGUIDandtheassociateddata.
value=get(GUID)
ThedataassociatedwithGUIDisretrievedfromoneofthenodes
responsibleit.
InstructorsGuideforCoulouris,Dollimore,KindbergandBlair,DistributedSystems:ConceptsandDesignEdn.5
PearsonEducation2012
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
0 FFFFF....F (2128-1)
D471F1
D467C4
D46A1C
D13DA3
65A1FC
InstructorsGuideforCoulouris,Dollimore,KindbergandBlair,DistributedSystems:ConceptsandDesignEdn.5
PearsonEducation2012
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
0 FFFFF....F (2128-1)
D471F1
D46A1C
D467C4
D462BA
D4213F
D13DA3
65A1FC
InstructorsGuideforCoulouris,Dollimore,KindbergandBlair,DistributedSystems:ConceptsandDesignEdn.5
PearsonEducation2012
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
Location mapping
for 4378
437A
43FE
4228
4378
Phils
Books
4361
4664
4A6D
4B4F
Routes actually
taken by send(4378)
E791
57EC
AA93
4378
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
InstructorsGuideforCoulouris,Dollimore,KindbergandBlair,DistributedSystems:ConceptsandDesignEdn.5
PearsonEducation2012
InstructorsGuideforCoulouris,Dollimore,KindbergandBlair,DistributedSystems:ConceptsandDesignEdn.5
PearsonEducation2012
1
3
VGUID of current
certificate
version
VGUID of
version i
d1
d2
d3
d1
d2
d3
version i+1
root block
version i
indirection blocks
data blocks
InstructorsGuideforCoulouris,Dollimore,KindbergandBlair,DistributedSystems:ConceptsandDesignEdn.5
PearsonEducation2012
d4
d5
Name
Meaning
Description
BGUID
blockGUID
Securehashofadatablock
VGUID
versionGUID
BGUIDoftherootblockofaversion
AGUID
activeGUID
Uniquelyidentifiesalltheversionsofanobject
InstructorsGuideforCoulouris,Dollimore,KindbergandBlair,DistributedSystems:ConceptsandDesignEdn.5
PearsonEducation2012
LAN
WAN
Phase
LinuxNFS Pond
LinuxNFS Pond
Predominant
operationsin
benchmark
0.0
1.9
0.9
2.8
Readandwrite
0.3
11.0
9.4
16.8
Readandwrite
1.1
1.8
8.3
1.8
Read
0.5
1.5
6.9
1.5
Read
2.6
21.0
21.5
32.0
Readandwrite
Total
4.5
37.2
47.0
54.9
InstructorsGuideforCoulouris,Dollimore,KindbergandBlair,DistributedSystems:ConceptsandDesignEdn.5
PearsonEducation2012
Ivy node
DHash server
Application
Application
DHash server
Ivy server
DHash server
DHash server
Modifled
NFS Client
module
DHash server
Kernel
InstructorsGuideforCoulouris,Dollimore,KindbergandBlair,DistributedSystems:ConceptsandDesignEdn.5
PearsonEducation2012