Lec21peer2peer.ppt

上传人:豆**** 文档编号:33411277 上传时间:2022-08-11 格式:PPT 页数:21 大小:239KB
返回 下载 相关 举报
Lec21peer2peer.ppt_第1页
第1页 / 共21页
Lec21peer2peer.ppt_第2页
第2页 / 共21页
点击查看更多>>
资源描述

《Lec21peer2peer.ppt》由会员分享,可在线阅读,更多相关《Lec21peer2peer.ppt(21页珍藏版)》请在taowenge.com淘文阁网|工程机械CAD图纸|机械工程制图|CAD装配图下载|SolidWorks_CaTia_CAD_UG_PROE_设计图分享下载上搜索。

1、Spring 2000Spring 2002Background Distribution Decentralized control Self-organization Symmetric communicationSpring 2000Spring 2002Examples Pioneers Napster, Gnutella, FreeNet Academic Prototypes Pastry, Chord, CAN,Spring 2000Spring 2002CS 4614Common Issues Organize, maintain overlay network node ar

2、rivals node failures Resource allocation/load balancing Resource location Locality (network proximity)Idea: generic p2p substrateSpring 2000Spring 2002CS 4615ArchitectureTCP/IPP2P SubstrateNetwork storage Event notificationInternetself-organizingoverlay networkP2p application layer?Spring 2000Spring

3、 2002CS 4616Pastry Self-organizing overlay network Consistent hashing Lookup/insert object in log16 N routing steps (expected) O(log N) per-node state Network locality heuristicsSpring 2000Spring 2002CS 4617Object DistributionConsistent hashing Karger et al. 97128 bit circular id spacenodeIds (unifo

4、rm random)objIds (uniform random)Invariant: node with numerically closest nodeId maintains objectobjidnodeids02128- 1Spring 2000Spring 2002CS 4618Object Insertion/Lookup XRoute(X)Msg with key X is routed to live node with nodeId closest to X Problem: complete routing table not feasibleO2128 - 1Sprin

5、g 2000Spring 2002CS 4619Routing Properties log16 N steps O(log N) stated46a1clocate(d46a1c)d462bad4213fd13da365a1fcd467c4d471f1Spring 2000Spring 2002Leaf SetsEach node maintains IP addresses of the nodes with the L numerically closest larger and smaller nodeIds, respectively. routing efficiency/robu

6、stness fault detection (keep-alive) application-specific local coordinationSpring 2000Spring 2002CS 46111Routing Procedureif (destination is within range of our leaf set) forward to numerically closest memberelselet l = length of shared prefix let d = value of l-th digit in Ds addressif (Rld exists)

7、 forward to Rldelse forward to a known node that (a) shares at least as long a prefix(b) is numerically closer than this nodeSpring 2000Spring 2002CS 46112RoutingIntegrity of overlay: guaranteed unless L/2 simultaneous failures of nodes with adjacent nodeIdsNumber of routing hops: No failures: log16

8、 N expected, 128/b + 1 max During failure recovery: O(N) worst case, average case much better Spring 2000Spring 2002CS 46113Node Addition d46a1cd462bad4213fd13da365a1fcd467c4d471f1addnode(d46a1c)Spring 2000Spring 2002CS 46114Node Departure (Failure)Leaf set members exchange keep-alive messages Leaf

9、set repair (eager): request set from farthest live node in set Routing table repair (lazy): get table from peers in the same row, then higher rowsSpring 2000Spring 2002CS 46115API route(M, X): route message M to node with nodeId numerically closest to X deliver(M): deliver message M to application f

10、orwarding(M, X): message M is being forwarded towards key X newLeaf(L): report change in leaf set L to application Spring 2000Spring 2002PAST: Cooperative, archival file storage and distribution Layered on top of Pastry Strong persistence High availability Scalability Reduced cost (no backup) Effici

11、ent use of pooled resourcesSpring 2000Spring 2002CS 46117PAST API Insert - store replica of a file at k diverse storage nodes Lookup - retrieve file from a nearby live storage node that holds a copy Reclaim - free storage associated with a fileFiles are immutableSpring 2000Spring 2002CS 46118PAST: F

12、ile storage fileIdInsert fileIdSpring 2000Spring 2002CS 46119PAST: File storage Storage Invariant: File “replicas” are stored on k nodes with nodeIdsclosest to fileId (k is bounded by the leaf set size)fileIdInsert fileIdk=4Spring 2000Spring 2002CS 46120PAST: File Retrieval fileIdfile located in log16 N steps (expected)usually locates replica nearest client CLookupk replicasC

展开阅读全文
相关资源
相关搜索

当前位置:首页 > 教育专区 > 教案示例

本站为文档C TO C交易模式,本站只提供存储空间、用户上传的文档直接被用户下载,本站只是中间服务平台,本站所有文档下载所得的收益归上传人(含作者)所有。本站仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。若文档所含内容侵犯了您的版权或隐私,请立即通知淘文阁网,我们立即给予删除!客服QQ:136780468 微信:18945177775 电话:18904686070

工信部备案号:黑ICP备15003705号© 2020-2023 www.taowenge.com 淘文阁