2023年全國(guó)碩士研究生考試考研英語(yǔ)一試題真題(含答案詳解+作文范文)_第1頁(yè)
已閱讀1頁(yè),還剩19頁(yè)未讀, 繼續(xù)免費(fèi)閱讀

下載本文檔

版權(quán)說(shuō)明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)

文檔簡(jiǎn)介

1、<p>  Programming Overlay Networks with Overlay Sockets</p><p>  The emergence of application-layer overlay networks has inspired the development of new network services and applications. Research on ov

2、erlay net-workshas focused on the design of protocols to maintain and forward data in an overlay network, however, less attention has been given to the software development process of building application programs in suc

3、h an environment. Clearly,the complexity of overlay network protocols calls for suitable application programming interfaces (APIs) and abstract</p><p>  1 Introduction </p><p>  Application-laye

4、r overlay networks [5, 9, 13, 17] provide flexible platforms for develop-ing new network services [1, 10, 11, 14, 18–20] without requiring changes to the network-layer infrastructure. Members of an overlay network, which

5、 can be hosts, routers, servers, or applications, organize themselves to form a logical network topology, and commu-nicate only with their respective neighbors in the overlay topology. A member of an overlay network send

6、s and receives application data, and also fo</p><p>  We present a software module, called overlay socket, that intends to simplify the task of overlay network programming. The design of the overlay socket p

7、ursues the following set of objectives: First, the application programming interface (API) of the overlay socket does not require that an application programmer has knowledge of the overlay network topology. Second, the

8、overlay socket is designed to accommodate dif-ferent overlay network topologies. Switching to different overlay network topolog</p><p>  Fig. 1. The overlay network is a collection of overlay sockets. Root

9、(sender) Root (receiver) (a) Multicast (b) Unicast. </p><p>  Fig. 2. Data forwarding in overlay networks. </p><p>  The rest of the paper is organized as following. In Section 2 we introduce c

10、on-cepts, abstractions, and terminology needed for the discussion of the overlay socket. In Section 3 we present the design of the overlay socket, and discuss its components. In Section 4 we show how to write programs us

11、ing the overlay socket. We present brief conclusions in Section 5. </p><p>  2 Basic Concepts </p><p>  An overlay socket is an endpoint for communication in an overlay network, and an overlay n

12、etwork is seen as a collection of overlay sockets that self-organize using an overlay protocol (see Figure 1). An overlay socket offers to an application programmer a Berkeley socket-style API [3] for sending and receivi

13、ng data over an overlay network. Each overlay socket executes an overlay protocol that is responsible for maintaining the membership of the socket in the overlay network topology. Each overl</p><p><b>

14、  _ </b></p><p><b>  x </b></p><p><b>  _ </b></p><p><b>  y </b></p><p><b>  _ </b></p><p>  coordin

15、ates, where x and y are positive 32-bit positive integers. The physical address is a transport layer address where overlay sockets receive messages from the overlay network. On the Internet, the physical address is an IP

16、 address and a TCP or UDP port number. Application programs that use overlay sockets only work with logical addresses, and do not see physical addresses of overlay nodes. When an overlay socket is created, the socket is

17、configured with a set of configu-ration parameters, c</p><p>  3 The Components of an Overlay Socket </p><p>  An overlay socket consists of a collection of components that are configured when t

18、he overlay socketis created, using the supplied set of attributes. These components include the overlay protocol, which helps to build and maintain the overlay network topology, a component that processes application dat

19、a, and interfaces to a transport-layer network. The main components of an overlay socket, as illustrated in Figure 3, are as follows: </p><p>  The overlay node implements an overlay protocol that establishe

20、s and maintains the overlay network topology. The overlay node sends and receives overlay protocol messages, and maintains a set of timers. The overlay node is the only component of an overlay socket that is aware of the

21、 overlay topology. In the HyperCast 2.0. Overlay socket </p><p>  Forwarding Engine </p><p>  Application Programming Interface </p><p>  Statistics Interface </p><p> 

22、 Protocol Messages </p><p>  Application </p><p><b>  Receive </b></p><p><b>  Buffer </b></p><p>  Application </p><p><b>  

23、Transmit </b></p><p>  Buffer Overlay Node </p><p>  O verlay Node </p><p>  Interfac e </p><p>  Node Adapter </p><p>  Adapter Interface </p>

24、<p>  Socket Adapter </p><p>  A dapter Interface </p><p>  Application Messages </p><p>  Application Program </p><p>  Transport-layer Network </p><

25、p>  Application Messages </p><p>  Fig. 3. Components of an overlay socket. </p><p>  software, there are overlay nodes that build a logical hypercube [15] and a logical Delaunay triangu-<

26、/p><p>  lartion [16]. </p><p>  The forwarding engine performs the functions of an application-layer router, that sends, receives, and forwards formatted application-layer messages in the overlay

27、network. The forwarding engine communicates with the overlay node to query next hop routing information for application messages. The forwarding decision is made using logical addresses of the overlay nodes. Each overlay

28、 socket has two network adapters that each provides an interface to transport-layer protocols, such as TCP or UDP. T</p><p>  The application receive buffer and application transmit buffer can temporarily st

29、ore messages that, respectively, have been received by the socket but not been deliv-ered to theapplication, or that have been released by the application program, but not been transmitted by the socket. The application

30、transmit buffer can play a role when messages cannot be transmitted due to rate control or congestion control con-straints. The application transmit buffer is not implemented in the HyperCast 2.0 sof</p><p>

31、  4 Overlay Network Programming </p><p>  An application developer does not need to be familiar with the details of the components of an overlay socket as described in the previous section. The developer is

32、exposed only to the API of the overlay socket and to a file with configuration parameters. The configuration file is a text file which stores all attributes needed to configure an overlay socket. The configuration file i

33、s modified whenever a change is needed to the transport protocol, the overlay protocol, or some other parameters of</p><p>  4.1 Overlay Socket API </p><p>  Since the overlay topology and the f

34、orwarding of application-layer data is transparent to the application program, the API for overlay network programming can be made simple. Applications need to be able to create a new overlay network, join and leave an e

35、xisting overlay network, send data to and receive data from other members in the overlay. </p><p>  The API of the overlay socket is message-based, and intentionally stays close to the familiar Berkeley sock

36、et API [3]. Since space considerations do not permit a description of the full API, we sketch the API with the help of a simplified example. Figure 4 shows the fragment of a Java program that uses an overlay socket. An a

37、pplication program configures and creates an overlay socket with the help of an overlay manager (o m). The overlay manager reads configuration parameters for the overlay soc</p><p>  // Generate the configur

38、ation object </p><p>  OverlayManager om = new </p><p>  OverlayManager("hypercast.prop"); </p><p>  String MyOverlay = om.getDefaultProperty("OverlayID"); </

39、p><p>  OverlaySocketConfig config = new om.getOverlaySocketConfig(MyOverlay); </p><p>  // create an overlay socket </p><p>  OL Socket socket = config.createOverlaySocket(callback);

40、</p><p>  // Join an overlay </p><p>  socket.joinGroup(); </p><p>  // Create a message </p><p>  OL Message msg = socket.createMessage(byte[] data, int length); </

41、p><p>  // Send the message to all members in overlay network </p><p>  socket.sendToAll(msg); </p><p>  // Receive a message from the socket </p><p>  OL Message msg = so

42、cket.receive(); </p><p>  Fig. 4. Program with overlay sockets. </p><p>  # OVERLAY Server: </p><p>  OverlayServer = </p><p>  # OVERLAY ID: </p><p>  Ov

43、erlayID = 1234 </p><p>  KeyAttributes= Socket,Node,SocketAdapter </p><p>  # SOCKET: </p><p>  Socket = HCast2-0 </p><p>  HCAST2-0.TTL = 255 </p><p>  HC

44、AST2-0.ReceiveBufferSize = 200 </p><p>  # SOCKET ADAPTER: </p><p>  SocketAdapter = TCP </p><p>  SocketAdapter.TCP.MaximumPacketLength = 16384 </p><p><b>  # NO

45、DE: </b></p><p>  Node = DT2-0 </p><p>  DT2-0.SleepTime = 400 </p><p>  # NODE ADAPTER: </p><p>  NodeAdapter = NodeAdptUDPServer </p><p>  NodeAdap

46、ter.UDP.MaximumPacketLength = 8192 </p><p>  NodeAdapter.UDPServer.UdpServer0 = </p><p>  128.143.71.50:8081 </p><p>  Fig. 5. Configuration file (simplified) given overlay ID. The

47、 configuration object also loads all configuration information from the configuration file, and then creates the overlay socket(config.create</p><p>  OverlaySocke t). </p><p>  Once the overlay

48、 socket is created, the socket joins the overlay network (socket.join-Grou p). When a socket wants to multicast a message, it instantiates a new message (socket.createMessage) and trans</p><p>  -mits the me

49、ssage using the sendToAll method. Other transmission options are send-To-Parent, send-</p><p>  To-Children, sendToNeighbors, and sendToNode, which, respectively, send a message to the upstream neighbor with

50、 respect to a given root (see Figure 2), to the downstream neighbors, to all neighbors, or to a particular node with a given logical address. </p><p>  4.2 Overlay Network Properties Management </p>&

51、lt;p>  As seen, the properties of an overlay socket are configured by setting attributes in a configuration file. The overlay manager in an application process uses the attributes to create a new overlay socket. By mo

52、difying the attributes in the configuration file, an application programmer can configure the overlay protocol or transport protocol that is used by the overlay socket. Changes to the file must be done before the socket

53、is created. Figure 5 shows a (simplified) example of a configuration f</p><p>  DT2-0 ’), and it sets the transport protocol of the socket adaptor to TCP(‘SocketAdapter=TCP ’). </p><p>  Each ov

54、erlay network is associated with a set of attributes that characterize the properties of the over</p><p>  -lay sockets that participate in the overlay network. As mentioned earlier, the most important attri

55、bute is the overlay ID, which is used to identify an over-.lay network, and which can be used as a key to</p><p>  access all other attributes of an overlay network. The overlay ID should be a globally uniqu

56、e identifier. </p><p>  A new overlay network is created by generating a new overlay ID and associating a set of attributes that specify the properties of the overlay sockets in the overlay network. To join

57、an overlay network, an overlay socket must know the overlay ID and the set of attributes for this overlay ID. This information can be obtained from a configuration file, as shown in Figure 5. </p><p>  All a

58、ttributes have a name and a value, both of which are strings. For example, the overlay protocol of an overlay socket can be determined by an attribute with name NODE. If the attribute is set to NOD</p><p>  

59、-E=DT2- 0, then the overlay node in the overlay socket runs the DT (version 2) overlay protocol. The overlay socket distinguishes between two types of attributes: key attributes and configurable attributes. Key attribute

60、s are specific to an overlay network with a given overlay ID. Key attributes are selected </p><p>  when the overlay ID is created for an overlay network, and cannot be modified after-wards. </p><

61、p>  Overlay sockets that participate in an overlay network must have identical key attributes, but can have different configurable attributes. The attributes OverlayID and KeyAttributes are key attributes by default i

62、n all overlay networks. Configurable at-tributes specify parameters of an overlay socket, which are not considered essential for establishing communication between overlay sockets in the same overlay network, and which a

63、re considered ‘tunable’. </p><p>  5 Conclusions </p><p>  We discussed the design of an overlay socket which attempts to simplify the task of overlay network programming. The overlay socket ser

64、ves as an end point of commu-nication in the overlay network. The overlay socket can be used for various overlay topologies and support different transport protoc-</p><p>  ols. The overlay socket supports a

65、 simple API for joining and leaving an overlay network, and for sending and receiving data to and from other sockets in the overlay network. The main advantage of the overlay socket is that it is relatively easy to chang

66、e the configuration of the overlay network. An implementation of the overlay socket is distributed with the HyperCast2.0 soft-ware. The software has been extensively tested. A variety of different applications, such as d

67、istributed whiteboard and </p><p>  Acknowledgement. In addition to the authors of this article the contributors include Bhupinder Sethi, Tyler Beam, Burton Filstrup, Mike Nahas, Dongwen Wang, Konrad Lorincz

68、, Jean Ablutz, Haiyong Wang, Weisheng Si, Huafeng Lu, and Guangyu Dong. </p><p>  基于Socket的網(wǎng)絡(luò)編程</p><p>  應(yīng)用層覆蓋網(wǎng)絡(luò)的出現(xiàn)促進(jìn)了新網(wǎng)絡(luò)服務(wù)和應(yīng)用的發(fā)展。對(duì)面向網(wǎng)絡(luò)的研究集中于協(xié)議的設(shè)計(jì),并且在網(wǎng)絡(luò)中傳輸數(shù)據(jù),無(wú)論怎樣,在應(yīng)用程序軟件的開(kāi)發(fā)過(guò)程中已對(duì)這個(gè)問(wèn)題引起了一定的注意。 顯然

69、,面向網(wǎng)絡(luò)的網(wǎng)絡(luò)協(xié)議的復(fù)雜性要求合適應(yīng)用程序設(shè)計(jì)接口(API)和抽象觀念,不需要面向網(wǎng)絡(luò)協(xié)議的詳細(xì)知識(shí),因此,簡(jiǎn)化了應(yīng)用程序員的任務(wù)。在這篇文章里,我們提出作為聯(lián)系在一個(gè)覆蓋網(wǎng)絡(luò)內(nèi)的終點(diǎn)的新程序設(shè)計(jì)抽象觀念的一個(gè)面向網(wǎng)絡(luò)上的Socket的概念。面向網(wǎng)絡(luò)上的Socket預(yù)防不依賴選擇的一基于Socket的API 涂上拓?fù)鋵W(xué),并且可能成形為不同的面向網(wǎng)絡(luò)工作上的拓?fù)鋵W(xué)。 面向網(wǎng)絡(luò)上的Socket能在TCP,UDP或者其他傳送協(xié)議上方支持應(yīng)用

70、數(shù)據(jù)傳輸。 這篇文章描述面向網(wǎng)絡(luò)上的Socket設(shè)計(jì)并且討論API 和配置選擇。</p><p><b>  1.引言</b></p><p>  介紹應(yīng)用層覆蓋網(wǎng)絡(luò)為發(fā)展新網(wǎng)絡(luò)服務(wù)提供靈活的平臺(tái),沒(méi)有要求轉(zhuǎn)換成網(wǎng)絡(luò)層基礎(chǔ)設(shè)施。一個(gè)覆蓋網(wǎng)絡(luò)的成員,可能是主機(jī),路由器,服務(wù)器或者應(yīng)用,組織自己形成合乎邏輯的網(wǎng)絡(luò)拓?fù)?,并且只與在面向網(wǎng)絡(luò)上拓?fù)鋵W(xué)方面的各自的鄰居通信。一個(gè)覆

71、蓋網(wǎng)絡(luò)的成員并且得到申請(qǐng)數(shù)據(jù),以及準(zhǔn)備給其他成員傳輸?shù)臄?shù)據(jù)。我們使用網(wǎng)絡(luò)程序設(shè)計(jì)指的是在應(yīng)用層上與另一個(gè)應(yīng)用程序通信的應(yīng)用程序軟件開(kāi)發(fā)過(guò)程。大樓的差異和復(fù)雜性和保養(yǎng)的覆蓋網(wǎng)絡(luò)使它不實(shí)用對(duì)以程序開(kāi)發(fā)員可能關(guān)心管理應(yīng)用程序在網(wǎng)絡(luò)技術(shù)的一些細(xì)節(jié)內(nèi)的復(fù)雜性。</p><p>  我們提出一個(gè)軟件模塊,叫Ovlay Socket,打算簡(jiǎn)化面向網(wǎng)絡(luò)上的網(wǎng)絡(luò)程序設(shè)計(jì)的任務(wù)。面向網(wǎng)絡(luò)上的Socket的設(shè)計(jì)追隨這套以下的目標(biāo):首先

72、,面向網(wǎng)絡(luò)上的Socket的設(shè)計(jì)追隨這套以下的目標(biāo):首先,面向網(wǎng)絡(luò)上的Socket的應(yīng)用程序設(shè)計(jì)接口(API)不要求一個(gè)應(yīng)用程序員有面向網(wǎng)絡(luò)上的網(wǎng)絡(luò)拓?fù)涞闹R(shí)。其次,面向網(wǎng)絡(luò)網(wǎng)絡(luò)拓?fù)渖希嫦蚓W(wǎng)絡(luò)上的Socket被用于適應(yīng)。轉(zhuǎn)向不同的面向網(wǎng)絡(luò)通過(guò)在一件配置文件里修改參數(shù)被做上的網(wǎng)絡(luò)拓?fù)洹5谌?,面向網(wǎng)絡(luò)上的Socket,在應(yīng)用層操作,能適應(yīng)不同的類(lèi)型傳送層協(xié)議。這通過(guò)使用聯(lián)接于非derlying的運(yùn)輸層網(wǎng)絡(luò)并且通過(guò)面向網(wǎng)絡(luò)執(zhí)行信息交換的封裝

73、和解封裝上的Socket的網(wǎng)絡(luò)轉(zhuǎn)接器被完成。目前可得到的網(wǎng)絡(luò)轉(zhuǎn)接器是TCP,UDP 和UDP多路傳送。第四,面向網(wǎng)絡(luò)上的Socket為bootstrapping新覆蓋網(wǎng)絡(luò)提供機(jī)制。</p><p>  在這文章內(nèi),我們提供一面向網(wǎng)絡(luò)上的Socket設(shè)計(jì)的概述并且討論過(guò)于放網(wǎng)絡(luò)程序設(shè)計(jì)與涂上的Socket一起。面向網(wǎng)絡(luò)上的Socket作為HyperCast的部分2.0種軟件配給在java是imple-mented[

74、12].軟件已經(jīng)用于各種各樣的面向網(wǎng)絡(luò)上的應(yīng)用,并且已經(jīng)被在兩個(gè)局部地區(qū)以及廣闊地區(qū)測(cè)試確定。HyperCast2.0軟件實(shí)現(xiàn)描述在里的面向網(wǎng)絡(luò)上的topolo-gies[15]并且[16].這文章最精彩場(chǎng)面面向網(wǎng)絡(luò)上的Socket,另外信息的重要期刊可能被在可以從設(shè)計(jì)文獻(xiàn)編制中獲得內(nèi)發(fā)現(xiàn)[12].幾項(xiàng)研究在我們面前已經(jīng)提出面向網(wǎng)絡(luò)上的網(wǎng)絡(luò)程序設(shè)計(jì)問(wèn)題。即使早期的覆蓋網(wǎng)絡(luò)提議,例如Yoid[9],劃線于[4],并且Scattercast

75、[6],已經(jīng)提出立志爭(zhēng)取從使用的面向網(wǎng)絡(luò)取得API的獨(dú)立上的網(wǎng)絡(luò)拓?fù)涞腁PIs。尤其,Yoid 和Scattercast使用Socket一樣的API,到底怎樣,當(dāng)相同的API被不同的面向網(wǎng)絡(luò)使用上的網(wǎng)絡(luò)拓?fù)鋾r(shí),這些APIs不處理出現(xiàn)的問(wèn)題。幾工作在應(yīng)用層多路傳送上涂上inte 磨擦應(yīng)用程序與負(fù)責(zé)沒(méi)有明確地提供通用APIs保持覆蓋網(wǎng)絡(luò)的軟件一起。</p><p><b>  2.基本概念</b>

76、;</p><p>  一個(gè)面向網(wǎng)絡(luò)上的Socket是在一個(gè)覆蓋網(wǎng)絡(luò)里的通訊的endpoint,并且一個(gè)覆蓋網(wǎng)絡(luò)被作為一次面向網(wǎng)絡(luò)看見(jiàn)上自我組織的Socket使用一份面向網(wǎng)絡(luò)。一個(gè)面向網(wǎng)絡(luò)上的Socket把一伯克利Socket風(fēng)格API提供給一個(gè)申請(qǐng)程序員 [3]為送和得到在一個(gè)覆蓋網(wǎng)絡(luò)上的數(shù)據(jù)。每一個(gè)面向網(wǎng)絡(luò)Socket上執(zhí)行是負(fù)責(zé)保持Socket在被涂上的網(wǎng)絡(luò)拓?fù)鋬?nèi)的會(huì)員的一份面向網(wǎng)絡(luò)上的協(xié)議。面向網(wǎng)絡(luò)Soc

77、ket上的每一個(gè)在覆蓋網(wǎng)絡(luò)里有邏輯地址和物理地址。面向網(wǎng)絡(luò)使用的協(xié)議上,邏輯地址依賴類(lèi)型。在面向網(wǎng)絡(luò)里上的協(xié)議目前在HyperCast2.0實(shí)現(xiàn),邏輯地址是32位整數(shù)。物理地址是涂上Socket的運(yùn)輸層地址從覆蓋網(wǎng)絡(luò)得到消息。在因特網(wǎng)上,物理地址是IP 地址和一TCP或者UDP港口數(shù)目。使用的應(yīng)用程序涂上Socket只與邏輯地址合作,并且面向網(wǎng)絡(luò)上的節(jié)點(diǎn)的物理地址。物理地址在哪里涂上Socket得到消息從一個(gè)涂上的Socket被創(chuàng)造的o

78、verlayWhen那里的一運(yùn)輸層地址,Socket與叫的一套configu口糧參數(shù)一起成形把歸于。應(yīng)用程序能從一件配置文件獲得屬性或者它從一臺(tái)服務(wù)器上下載屬性。 配置</p><p>  Socket交換二類(lèi)消息,消息和消息applica - tion 協(xié)議。協(xié)議消息面向網(wǎng)絡(luò)上協(xié)議主要tain被涂上的拓?fù)鋵W(xué)的消息。應(yīng)用消息包含是在一個(gè)面向網(wǎng)絡(luò)上的報(bào)文首部里的encap-sulated的應(yīng)用數(shù)據(jù)。一條應(yīng)用消息使用

79、在集箱里的邏輯地址鑒定來(lái)源和為單路傳送,消息的目的地。面向網(wǎng)絡(luò)Socket上得到它的一個(gè)鄰居的消息應(yīng)用在方面過(guò)于放網(wǎng)絡(luò),確定消息一定提供另一個(gè)涂上Socket如果,消息需要被傳給地方應(yīng)用。目前被面向網(wǎng)絡(luò)支持上的Socket的這種傳輸方式是單路傳送和多路傳送。在多路傳送過(guò)程中,在覆蓋網(wǎng)絡(luò)里的全部成員都是接收者。不是度過(guò)數(shù)據(jù)在被嵌入在被涂上的拓?fù)鋵W(xué)內(nèi)的生成樹(shù)的是。 例如,多路傳送消息傳送順流有多路傳送消息的發(fā)送人的一生成樹(shù)根(看見(jiàn)圖2(A)

80、)當(dāng)時(shí)。當(dāng)一個(gè)面向網(wǎng)絡(luò)上的Socket得到一條多路傳送消息時(shí),它把消息傳到它所有下游的鄰近的物(孩子),和對(duì)當(dāng)?shù)貞?yīng)用程序通過(guò)單路傳送消息傳送向上游一樹(shù)與消息的接收者一起根(看見(jiàn)圖2(b))當(dāng)時(shí)。 得到消息提出隨著鄰居(父母)向上游的消息在有作為根的目的地的樹(shù)內(nèi)的單路傳送的一個(gè)面向網(wǎng)絡(luò)上的Socket。 </p><p>  3.Overlay Socket 的組成</p><p>  一個(gè)

81、面向網(wǎng)絡(luò)上的Socket由一次在面向網(wǎng)絡(luò)上的Socket被建立時(shí),成形的零部件的收集組成,使用被提供的套屬性。這些組成部分包括面向網(wǎng)絡(luò)上的協(xié)議,這幫助建造并且保持面向網(wǎng)絡(luò)上的網(wǎng)絡(luò)拓?fù)?,處理申?qǐng)數(shù)據(jù)的一個(gè)組成部分,并且聯(lián)接于一個(gè)運(yùn)輸層網(wǎng)絡(luò)。一個(gè)面向網(wǎng)絡(luò)上的Socket的主要零部件,如下:面向網(wǎng)絡(luò)上的節(jié)點(diǎn)實(shí)現(xiàn)建立并且保持面向網(wǎng)絡(luò)上的網(wǎng)絡(luò)拓?fù)涞囊环菝嫦蚓W(wǎng)絡(luò)上的協(xié)議。面向網(wǎng)絡(luò)上的節(jié)點(diǎn)送并且得到面向網(wǎng)絡(luò)上的協(xié)議消息,并且保養(yǎng)一套定時(shí)器。面向網(wǎng)絡(luò)上

82、的節(jié)點(diǎn)是知道面向網(wǎng)絡(luò)上的拓?fù)鋵W(xué)的一個(gè)面向網(wǎng)絡(luò)上的Socket的唯一的零部件。</p><p><b>  應(yīng)用程序接口 </b></p><p>  Statistics Interface </p><p>  Protocol Messages </p><p>  Application </p>&

83、lt;p><b>  Receive </b></p><p><b>  Buffer </b></p><p>  Application </p><p><b>  Transmit </b></p><p>  Buffer Overlay Node </

84、p><p>  O verlay Node </p><p>  Interfac e </p><p>  Node Adapter </p><p>  Adapter Interface </p><p>  Socket Adapter </p><p>  A dapter Interfa

85、ce </p><p>  Application Messages </p><p>  Application Program </p><p>  Transport-layer Network </p><p>  Application Messages </p><p>  forwarding engin

86、e執(zhí)行應(yīng)用層路由器的功能,發(fā)送、接收,并且在覆蓋網(wǎng)絡(luò)里格式化的應(yīng)用層消息。 </p><p>  每一個(gè)面向網(wǎng)絡(luò)Socket上例如TCP或者UDP有每一個(gè)提供給傳送層協(xié)議的一接口的網(wǎng)絡(luò)轉(zhuǎn)接器。節(jié)點(diǎn)改編者作為送并且得到的在terface涂上協(xié)議消息,接合器作為給應(yīng)用消息的接口,就因特網(wǎng)而論,由IP 地址和一UDP或者TCP港口數(shù)目組成。目前,有3類(lèi)不同的改編者,是 TCP,UDP和UDP多路傳送。在保持面向網(wǎng)絡(luò)上的

87、協(xié)議和運(yùn)輸應(yīng)用數(shù)據(jù)的消息時(shí)使用改編者完全分開(kāi)消息的方式 。 </p><p>  應(yīng)用得到緩沖器和應(yīng)用傳送緩沖器能分別臨時(shí)儲(chǔ)存消息,已經(jīng)被Socket收到但不是應(yīng)用發(fā)送的,或者那已經(jīng)被應(yīng)用程序發(fā)布,但不是被Socket傳送了。 </p><p>  面向網(wǎng)絡(luò)Socket上的每一個(gè)有兩個(gè)外部接口。從覆蓋網(wǎng)絡(luò)寄給覆蓋網(wǎng)絡(luò)的其他成員和再接收的數(shù)據(jù)。面向網(wǎng)絡(luò)上的Socket的接口提供進(jìn)入面向網(wǎng)絡(luò)上

88、的Socket信息的途徑,并且用于一個(gè)面向網(wǎng)絡(luò)上的Socket的監(jiān)控和管理。面向網(wǎng)絡(luò)上的Socket的一些零部件也有接口,訪問(wèn)面向網(wǎng)絡(luò)上的Socket的其他零部件。 </p><p>  覆蓋管理程序是在面向網(wǎng)絡(luò)以外上的Socket一個(gè)零部件。 當(dāng)Socket被建立時(shí),使一個(gè)面向網(wǎng)絡(luò)上的Socket成形是負(fù)責(zé)的。 </p><p>  4、面向網(wǎng)絡(luò)的程序設(shè)計(jì)</p><

89、p>  一個(gè)程序開(kāi)發(fā)員不需要如以前的部分描寫(xiě)熟悉一個(gè)面向網(wǎng)絡(luò)上的Socket的零部件的細(xì)節(jié)。開(kāi)發(fā)者只暴露面向網(wǎng)絡(luò)上的Socket的API 和對(duì)一個(gè)文件用構(gòu)造參數(shù)。 配置文件是全部屬性需要一個(gè)面向網(wǎng)絡(luò)上的Socket成形的一個(gè)文本文件。每當(dāng)一種變化被需要到傳送協(xié)議,面向網(wǎng)絡(luò)上的協(xié)議或者面向網(wǎng)絡(luò)上的Socket的一些其他參數(shù)的時(shí)候,配置文件被修改。在如下內(nèi)容里,我們只總結(jié)API的主要特征,我們稱針對(duì)在面向網(wǎng)絡(luò)上的Socket上的詳細(xì)資

90、料。 </p><p>  4.1 基于Socket的API </p><p>  從面向網(wǎng)絡(luò)上的拓?fù)鋵W(xué)起和提出的數(shù)據(jù)應(yīng)用層的給那些應(yīng)用程序,那些API透明適合面向網(wǎng)絡(luò)上網(wǎng)絡(luò)程序設(shè)計(jì)可能被做簡(jiǎn)單。應(yīng)用需要能建立一個(gè)新覆蓋網(wǎng)絡(luò), 參加并且離開(kāi)現(xiàn)有覆蓋網(wǎng)絡(luò),寄給數(shù)據(jù)隨著并且得到面向網(wǎng)絡(luò)上其他成員的數(shù)據(jù)。 </p><p>  面向網(wǎng)絡(luò)上的Socket的API基于消息,

91、并且接近于熟悉的伯克利SocketAPI 故</p><p>  意停留[3].從空間起考慮不允許充分的API的描述,我們借助于一個(gè)簡(jiǎn)化的例子素描API。圖4顯示使用一個(gè)面向網(wǎng)絡(luò)上的Socket的一個(gè)java計(jì)劃的碎片。一個(gè)應(yīng)用程序借助于覆蓋管理程序成形并且建立一個(gè)面向網(wǎng)絡(luò)上的Socket。覆蓋管理程序從一個(gè)configu口糧文件(hypercast.prop)適合面向網(wǎng)絡(luò)讀構(gòu)造參數(shù)上的Socket,這能類(lèi)似如圖

92、5中所示看起來(lái)。applica - tion程序用來(lái)自文件的命om.getDefault</p><p>  Property(“OverlayID”)讀面向網(wǎng)絡(luò)上的ID,并且為一個(gè)面向網(wǎng)絡(luò)建立一個(gè)構(gòu)造(配置)上的Socket 。 </p><p>  // 產(chǎn)生構(gòu)造物體 </p><p>  OverlayManager om = new OverlayMana

93、ger("hypercast.prop"); </p><p>  String MyOverlay = om.getDefaultProperty("OverlayID"); </p><p>  OverlaySocketConfig config =new om.getOverlaySocketConfig(MyOverlay); </p

94、><p>  // create an overlay socket </p><p>  OL Socket socket =config.createOverlaySocket(callback); </p><p>  // Join an overlay </p><p>  socket.joinGroup(); </p>

95、<p>  // Create a message </p><p>  OL Message msg = socket.createMessage(byte[] data, int length); </p><p>  // Send the message to all members in overlay network </p><p>  s

96、ocket.sendToAll(msg); </p><p>  // Receive a message from the socket </p><p>  OL Message msg = socket.receive(); </p><p>  Fig. 4. Program with overlay sockets. </p><p&

97、gt;  # OVERLAY Server: </p><p>  # OVERLAY ID: </p><p>  OverlayID = 1234 </p><p>  KeyAttributes= Socket,Node,SocketAdapter </p><p>  # SOCKET: </p><p>  

98、Socket = HCast2-0 </p><p>  HCAST2-0.TTL = 255 </p><p>  HCAST2-0.ReceiveBufferSize = 200 </p><p>  # SOCKET ADAPTER: </p><p>  SocketAdapter = TCP </p><p>

99、;  SocketAdapter.TCP.MaximumPacketLength = 16384 </p><p><b>  # NODE: </b></p><p>  Node = DT2-0 </p><p>  DT2-0.SleepTime = 400 </p><p>  # NODE ADAPTER: &

100、lt;/p><p>  NodeAdapter = NodeAdptUDPServer </p><p>  NodeAdapter.UDP.MaximumPacketLength = 8192 </p><p>  NodeAdapter.UDPServer.UdpServer0 = </p><p>  128.143.71.50:8081

101、</p><p>  4.2 面向網(wǎng)絡(luò)的協(xié)議管理 </p><p>  顯然,一個(gè)面向網(wǎng)絡(luò)上的Socket的性質(zhì)成形歸于在確定時(shí)在一件配置文件內(nèi)。 在一個(gè)應(yīng)用進(jìn)程里的覆蓋管理程序使用屬性建立一個(gè)面向網(wǎng)絡(luò)上的Socket。通過(guò)在配置文件里修改屬性,一個(gè)申請(qǐng)程序員能使被面向網(wǎng)絡(luò)使用上的Socket的面向網(wǎng)絡(luò)上的協(xié)議或者傳送協(xié)議成形。換乘文件一定做在Socket被創(chuàng)造之前。配置文件的每條線把價(jià)值

102、歸因于一個(gè)屬性。屬性和范圍的完整的目錄被用文獻(xiàn)證明在[12]里。其中有,對(duì)‘1234’的面向網(wǎng)絡(luò)上的ID,面向網(wǎng)絡(luò)協(xié)議(‘= DT2.0節(jié)點(diǎn)’)上的那樣選擇DT 協(xié)議的第2.0版本,并且它把接口的傳送協(xié)議確定成TCP(‘Socket-Adapter= </p><p>  TCP’) 。每個(gè)覆蓋網(wǎng)絡(luò)與表現(xiàn)參加覆蓋網(wǎng)絡(luò)的面向網(wǎng)絡(luò)上的Socket的性質(zhì)的特性的一套屬性有關(guān)。如前所說(shuō),最重要的屬性是面向網(wǎng)絡(luò)上的ID,并

103、且能被用作一把訪問(wèn)一個(gè)覆蓋網(wǎng)絡(luò)的全部其他屬性的鑰匙。面向網(wǎng)絡(luò)上的ID 應(yīng)該是一個(gè)全球獨(dú)特的標(biāo)識(shí)符。 </p><p>  一個(gè)新覆蓋網(wǎng)絡(luò)被創(chuàng)造,在產(chǎn)生新面向網(wǎng)絡(luò)上ID并且聯(lián)系指定面向網(wǎng)絡(luò)上的Socket在覆蓋網(wǎng)絡(luò)內(nèi)的性質(zhì)的一套屬性時(shí)。為了加入一個(gè)覆蓋網(wǎng)絡(luò),一個(gè)面向網(wǎng)絡(luò)上的Socket必須知道面向網(wǎng)絡(luò)上的ID和這個(gè)面向網(wǎng)絡(luò)的ID上的各種屬性。 </p><p>  全部屬性有一個(gè)名稱。例如,

104、一個(gè)面向網(wǎng)絡(luò)上的Socket的面向網(wǎng)絡(luò)上的協(xié)議能通過(guò)名字節(jié)點(diǎn)對(duì)一個(gè)屬性加以測(cè)定。如果屬性調(diào)整到DT2-0節(jié)點(diǎn),然后在面向網(wǎng)絡(luò)上的Socket里的面向網(wǎng)絡(luò)上的節(jié)點(diǎn)運(yùn)轉(zhuǎn)DT(第2版本)。那些面向網(wǎng)絡(luò)上的Socket區(qū)分在之間屬性有二類(lèi):關(guān)鍵屬性和configurable 屬性。 </p><p><b>  5、 結(jié)論 </b></p><p>  我們討論試圖簡(jiǎn)化面向網(wǎng)

105、絡(luò)上網(wǎng)絡(luò)程序設(shè)計(jì)任務(wù)的一個(gè)面向網(wǎng)絡(luò)上的Socket的設(shè)計(jì)。面向網(wǎng)絡(luò)上的Socket在覆蓋網(wǎng)絡(luò)里作為一個(gè)交互的終點(diǎn)。面向網(wǎng)絡(luò)上Socket</p><p>  可能用于各種各樣的面向網(wǎng)絡(luò)上的拓?fù)鋵W(xué)并且支持不同的傳送協(xié)議。面向網(wǎng)絡(luò)上的Socket為參加和留下一個(gè)覆蓋網(wǎng)絡(luò)支持sim-ple API,并且為送和得到來(lái)自在覆蓋網(wǎng)絡(luò)里的其他Socket的數(shù)據(jù)。面向網(wǎng)絡(luò)覆蓋網(wǎng)絡(luò)的構(gòu)造上的Socket的主要優(yōu)勢(shì)是它相對(duì)易于轉(zhuǎn)換。

溫馨提示

  • 1. 本站所有資源如無(wú)特殊說(shuō)明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁(yè)內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒(méi)有圖紙預(yù)覽就沒(méi)有圖紙。
  • 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 眾賞文庫(kù)僅提供信息存儲(chǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
  • 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。

最新文檔

評(píng)論

0/150

提交評(píng)論