Lecpeer2peer.ppt
《Lecpeer2peer.ppt》由会员分享,可在线阅读,更多相关《Lecpeer2peer.ppt(20页珍藏版)》请在冰豆网上搜索。
Spring2000Spring2002,CS461,1,Peer-to-PeerNetworks,OutlineSurveySelf-organizingoverlaynetworkFilesystemontopofP2PnetworkContributionsfromPeterDruschel,Spring2000Spring2002,Background,DistributionDecentralizedcontrolSelf-organizationSymmetriccommunication,Spring2000Spring2002,Examples,PioneersNapster,Gnutella,FreeNetAcademicPrototypesPastry,Chord,CAN,Spring2000Spring2002,CS461,4,CommonIssues,Organize,maintainoverlaynetworknodearrivalsnodefailuresResourceallocation/loadbalancingResourcelocationLocality(networkproximity)Idea:
genericp2psubstrate,Spring2000Spring2002,CS461,5,Architecture,TCP/IP,P2PSubstrate,Networkstorage,Eventnotification,Internet,self-organizingoverlaynetwork,P2papplicationlayer,?
Spring2000Spring2002,CS461,6,Pastry,Self-organizingoverlaynetworkConsistenthashingLookup/insertobjectinlog16Nroutingsteps(expected)O(logN)per-nodestateNetworklocalityheuristics,Spring2000Spring2002,CS461,7,ObjectDistribution,ConsistenthashingKargeretal.97128bitcircularidspacenodeIds(uniformrandom)objIds(uniformrandom)Invariant:
nodewithnumericallyclosestnodeIdmaintainsobject,Spring2000Spring2002,CS461,8,ObjectInsertion/Lookup,X,Route(X),MsgwithkeyXisroutedtolivenodewithnodeIdclosesttoXProblem:
completeroutingtablenotfeasible,O,2128-1,Spring2000Spring2002,CS461,9,Routing,Propertieslog16NstepsO(logN)state,Spring2000Spring2002,LeafSets,EachnodemaintainsIPaddressesofthenodeswiththeLnumericallyclosestlargerandsmallernodeIds,respectively.routingefficiency/robustnessfaultdetection(keep-alive)application-specificlocalcoordination,Spring2000Spring2002,CS461,11,RoutingProcedure,if(destinationiswithinrangeofourleafset)forwardtonumericallyclosestmemberelseletl=lengthofsharedprefixletd=valueofl-thdigitinDsaddressif(Rldexists)forwardtoRldelseforwardtoaknownnodethat(a)sharesatleastaslongaprefix(b)isnumericallycloserthanthisnode,Spring2000Spring2002,CS461,12,Routing,Integrityofoverlay:
guaranteedunlessL/2simultaneousfailuresofnodeswithadjacentnodeIdsNumberofroutinghops:
Nofailures:
log16Nexpected,128/b+1maxDuringfailurerecovery:
O(N)worstcase,averagecasemuchbetter,Spring2000Spring2002,CS461,13,NodeAddition,Spring2000Spring2002,CS461,14,NodeDeparture(Failure),Leafsetmembersexchangekeep-alivemessagesLeafsetrepair(eager):
requestsetfromfarthestlivenodeinsetRoutingtablerepair(lazy):
gettablefrompeersinthesamerow,thenhigherrows,Spring2000Spring2002,CS461,15,API,route(M,X):
routemessageMtonodewithnodeIdnumericallyclosesttoXdeliver(M):
delivermessageMtoapplicationforwarding(M,X):
messageMisbeingforwardedtowardskeyXnewLeaf(L):
reportchangeinleafsetLtoapplication,Spring2000Spring2002,PAST:
Cooperative,archivalfilestorageanddistribution,LayeredontopofPastryStrongpersistenceHighavailabilityScalabilityReducedcost(nobackup)Efficientuseofpooledresources,Spring2000Spring2002,CS461,17,PASTAPI,Insert-storereplicaofafileatkdiversestoragenodesLookup-retrievefilefromanearbylivestoragenodethatholdsacopyReclaim-freestorageassociatedwithafileFilesareimmutable,Spring2000Spring2002,CS461,18,PAST:
Filestorage,Spring2000Spring2002,CS461,19,PAST:
Filestorage,StorageInvariant:
File“replicas”arestoredonknodeswithnodeIdsclosesttofileId(kisboundedbytheleafsetsize),Spring2000Spring2002,CS461,20,PAST:
FileRetrieval,fileId,filelocatedinlog16Nsteps(expected)usuallylocatesreplicanearestclientC,Lookup,kreplicas,C,