软件体系结构第7-2讲_第1页
软件体系结构第7-2讲_第2页
软件体系结构第7-2讲_第3页
软件体系结构第7-2讲_第4页
软件体系结构第7-2讲_第5页
已阅读5页,还剩61页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

1、1. Problems with traditional C-S architecture2. Introduction to P2P4. Hybrid P2P architectureProblem 1: 很难在海量信息中找到有价值的东西很难在海量信息中找到有价值的东西. First, no single search engine can locate and catalog the ever-increasing amount of information on the Web in a timely way Google claims that it searches about 1.

2、3x108 web pages Finding useful information in real time is increasingly difficult!1. Problems with traditional C-S architectureProblem 2: 互联网的应用不平衡互联网的应用不平衡. Second, although miles of new fiber have been installed, the new bandwidth gets little use if everyone goes to Yahoo and eBay for content Hot

3、spots just get hotter while cold spots remain cold Internet has not been utilized efficiently Resources have not been used efficiently1. Problems with traditional C-S architecture InternetPersonal Computers80% idle CPU timeComputers in our Lab99% idle CPU time!Laptop 90% idle CPU time1. Problems wit

4、h traditional C-S architectureProblem 3: 服务器的压力服务器的压力.Pressure: As the number of users increases, there is a higher demand for computing power, storage space, and bandwidth associated with the server-side 1. Problems with traditional C-S architecture Problem 4:可靠性是个问题可靠性是个问题Reliability (可靠性) The who

5、le network will depend on the highly loaded server to function properly If a server is down, then the client may suffer heavy loses1. Problems with traditional C-S architectureOne possible solution?2. Introduction to P2PTHE NAPSTER STORY Shawn Fanning was a student at North Eastern University in Bos

6、ton in 1998 He was sitting in his dorm room talking with friends, complaining about dead MP3 links. Shawn Fanning s American dream: To establish a company called Napster to access and use the resources on the distributed hard drives in our computers effectively.2. Introduction to P2PActions: Shawn Q

7、uits university to develop Napster idea. He codes his program working 16 hours a day. Shawn Finishes the program in summer 1999 at age 19. Huge success, putting Fanning on the cover of magazines and newspapers. 2. Introduction to P2P Napster Corp was founded in Sep 1999 by Shawn Fanning (19 years ol

8、d) and Sean Parker (20 years old) based in San Mateo, California with 15 million dollars Napster became one of the 50 most visited pages in the world. 2. Introduction to P2PP2PC/SDifference between P2P and client-server2. Introduction to P2PTraditional client-server network architectureClient respon

9、sibilities:1) sending commands to request a service 5) receiving responses to a request for a serviceServer responsibilities:2) receiving commands for requesting a service 3) processing service requests and executing the requested service4) sending response with results of the requested servicePeer

10、responsibilities (as a client): sending commands to other peers to request a service Peer responsibilities (as a server): receiving commands from other peers, requesting a service processing service requests and executing the requested service sending response with results of the requested service p

11、ropogating requests for service to other peersA pure P2P network architectureWhat is Peer-to-Peer (P2P)? Peer-to-Peer computing is described as the sharing of and services by direct exchange between systems. a) the exchange of information, b) processing cycles, c) cache storage, and d) disk storage

12、for files. a) It allows economical clients (desktop computers, etc) to take advantage of their collective power to benefit the entire enterprise (发挥发挥集体优势集体优势) )b) Clients in a P2P network are also servers c) The load on servers in the traditional sense has reduced ()Hybrid P2P architecture (杂交的杂交的P

13、2PP2P结构结构)One Example . The interaction between clients by referencing a Directory Server nClient A issues a request to the Directory server nThe Directory server then uses the lists it keep to find the peer that contains the content that Client A interests in and tells Client A nClient A can then d

14、irectly interact with that client, in this case Client D which services his request. 和那个和那个客户直接互动客户直接互动. hybrid P2P architecture (杂交的杂交的P2PP2P结构结构)A hybrid P2P architecture (杂交的杂交的P2PP2P结构结构)A hybrid P2P architecture (杂交的杂交的P2PP2P结构结构) : If a is not available or if is not available for a particular

15、buddy, the peer first falls back on cached knowledge about the locations of buddies by deriving from previous contact with a directory service, previous contact with those buddies, or information entered by the user. Cache: : 高速缓冲存储器高速缓冲存储器A hybrid P2P architecture (杂交的杂交的P2PP2P结构结构) Once peers are

16、located, they can provide information about their capabilities and the services they provide. ) ) A hybrid P2P architecture (杂交的杂交的P2PP2P结构结构) After it determines their locations, the peer then attempts to establish contact with all of the buddies that it has found. interface for contacts The user i

17、nterface provides information to the user about what other users are on-line. A hybrid P2P architecture (杂交的杂交的P2PP2P结构结构)a)Peers can act as clients and servers and have the same capability as its neighbors.b)It has no central servers. It has every node as a Peer and has no central router.c)There ar

18、e two routing structures, one is a 目目录录) ) and the other . 1. Send message to all peers: who has “200 Days on the Moon” 2. Got answer: I have 3. Build direct connection 123 什么是纯的什么是纯的P2PP2P模型?模型? Gnutella, a Pure P2P Model is a application and protocol: the end hosts join Gnutella by connecting to e

19、xisting end hosts already on the Gnutella. To facilitate file sharing, messages are sent between end hosts. Queries for files are broadcasted on the overlay network, and Replies are routed back to the host that originally generated the query through the overlay network. 1. Node A is first connected

20、to the network.2. It Pings to the other Nodes (B and C) to discover new nodes on the network.3. A pong message is sent as a reply to a ping and provides information on a network node, including address, port number, and number of files shared.4. A is used to search for files shared by other nodes on

21、 the network. It contains a query string and a minimum requested link speed.5. A query reply message contains a list of one or more files which match a given query, the size of each file, and the link speed of the responding node.6. A push message is used to upload file to clients behind a firewall

22、who can not download files themselves.For the connection, a node has to know the of the other node that is already online.a) once it is connected, it makes an announcement that it is online. b) Each of the other nodes reply to the message of information like the number of files it contains and the o

23、ther details. For the file sharing to happen, the node acts as a HTTP Web Server. If the search has to download, it connects to the node in the same way as a browser would connect to a web server. How long will a specific request live“?. TTL: time to live. It determines on the network. The number is

24、 actually how many layers each request will pass through, where a layer is when one servant has sent the request to all of the servants connected to it. Gnutella Gnutella is a , since there are no Gnutella servers in the traditional sense, like web servers or mail servers. Gnutella Gnutellas protoco

25、l is such that the and at the same time. A node is a when it is looking for some data and is a if it is servicing a request of another node. a) If one computer goes down the network is unaffected, .b) Gnutella permits of any type. c) Gnutella is anonymous-there is no need to provide a name or e-mail

26、 address to use Gnutella, since. d) Gnutellacan share their family photos, masters thesis, computer program, and home movies - anything they want! e) Gnutella is Pure P2P and is completely decentralized.Developing OrganizationGnutella has become much popular recently so there are not a single organi

27、zation that is very popular, rather there are many who are upcoming. LimeWire, BearShare, Morpheus Etc. P2P is a type of network in which each workstation has equivalent capabilities and responsibilities. Using the HTTP protocol, peers link together in networks to share information and services.A pu

28、re P2P network architecture Each peer provides a handles communication with the network, manages information about the location, status, and privileges. provides the foundation for extension modules The architecture of a Peer The architecture of a Peer implements the layered architectural Pattern. T

29、he functions are layered one on top of the other. 1. web server 2. Servlet engine3. The request manager 4. The event service 5. Buddy manager6. Access controlchartWeb agent(html)ExtensionmodulesCorecomponentsWeb ServerfoundationIncoming events fromHTTPIncoming HTTP servlet requestsOutgoing events se

30、nt via HTTPthe architecture of an individual peer. The system is based on top of a Web server and servlet engine that trigger functionality based on incoming HTTP requests. The network infrastructure may vary by platform and provides the binding to the Web services available on that platform. It pro

31、vides simple parsing of the HTTP requests, receives the HTTP request from and, depending on the content, invokes services within the peer to handle the request. . Loaded modules may register for requests based on the URL. When the request manager passes a request to a module, it can provide the resp

32、onse (if any) to be returned, or pass the request along to another module for additional processing. Event Service ( Receive that are passed over HTTP. The events carry the bulk of communication between peers. Event service (receive the events (invoke the services that have registered interest in th

33、ose events (allow components to send events to other peers本机可以通过事件服务发送事件给其他的本机可以通过事件服务发送事件给其他的peer. Within each event is information about its creation: the address of the creator, a local timestamp, and a globally unique identifier string. is a means of identifying individual users and (controlling

34、 the access relationships between peers: who may access resources and about whom the user would like information (控制控制关系关系) 利用到来事件信息决定那些用户是否受欢迎利用到来事件信息决定那些用户是否受欢迎Information in the incoming event or HTTP request serves to identify users as being welcome or notIt also defined levels of access, thus t

35、he user may permit or deny access to services. Dynamically loaded extension that provide new functionality for specific applications the peers core functionality. Allow custom configuration of peers, in most cases even while the peer is running. (May be mapped to handle incoming HTTP requests, regis

36、ter for events, send events to other peers, etc. (Can communicate in a controlled fashion with other modules within the same peer (P2P P2P 用管道用管道- -过滤器结构交流过滤器结构交流The Peer-to-Peer system uses Pipes and Filters to effectively transfer data from one system to another. The processing steps act as filter

37、s, which manages the passing of data between two nodes. When a peer requests for a file, a filter component effectively filters the which do not match the search criteria and produces a result in the form of a list to the query. ( Then when the user chooses to download, it uses a pipe to transfer th

38、e data from the host (用管道下载用管道下载)The system requirements of P2P systems change quickly, it should therefore be easy to modify or upgrade the system with minimum effort (). A lot of features get added to the P2P systems that call for extendibility of the system. Modifications can also be made to have the applicati

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

最新文档

评论

0/150

提交评论