📄 rfc722.txt
字号:
Network Working Group Jack Haverty (MIT)Request for Comments: 722 Sept 1976NIC #36806I. ABSTRACT This paper addresses some issues concerned with thedesign of distributed services. In particular, it isconcerned with the characteristics of the interactions,between programs which support some service at variousnetwork sites. The ideas presented are derived mainly fromexperience with various service protocols [Reference 1]on the ARPANET. A model is developed of interactions between programs.Salient features of this model which promote and simplifythe construction of reliable, responsive services areidentified. These dualities are motivated by problemsexperienced with various ARPANET protocols and in the designand maintenance of programs which use these protocols in theperformance of some service. Using this model as a template, the generalarchitecture of one possible interaction protocol ispresented. This mechanism provides a foundation on whichprotocols would be constructed for particular services,simplifying the process of creating services which are easyto implement and maintain, and appear reliable andresponsive to the customer. This presentation is meant toserve as an introduction to a specific instance of such aprotocol, called the RRP, which is defined in one of thereferences. -1-II. OVERVIEW AND TERMINOLOGY This paper considers the interaction of two programswhich support some network service. It develops a model ofthe interactions of a class of such applications, andincludes some thoughts on desirable goals andcharacteristics of implementations. The model is derivedfrom a proposal [Reference 2] for mail-handlingsystems. Terminology, as introduced, is highlighted bycapitalization. Many uses of computer networks involve communicationdirectly between programs, without human intervention ormonitoring. Some examples would include an advancedmail-handling system, or any kind of multi-site data basemanager. Such programs will be termed SERVERs. They are theusers of some mechanism which provides the neededcommunication and synchronization. The particular facilitywhich the servers implement will be termed a SERVICE.Servers for any particular service may be written in severallanguages, operate in various system environments ondifferent kinds of computers. The entity which utilizes theservice will be termed the CUSTOMER. Servers interact during ENCOUNTERs, which are theperiods when two servers are in communication. An encounterbegins when one server establishes a CHANNEL, abidirectional communication link with another server. Theinteraction between servers is effected by the exchange ofinformation over the channel. The conventions used in suchan exchange are defined by the PROTOCOLs for theinteraction. The theme of this paper is a model for a particularclass of process interactions which may be used as a basisfor many possible services, where the interactions arefairly simple. Services which fit in this category interactin a manner which can be modeled by a REQUEST-REPLYDISCIPLINE, which is defined herein. A set of guidelines and goals is developed, whichaddress issues relevant to ease or implementation andreliability of operation of servers. These guidelines maybe used to assist in the formulation of protocols specificto appropriate services. -2- Additionally, the guidelines presented may be used as abasis for a general process interaction protocol, byextracting the primitives and operational concepts whichwould be common to a protocol constructed for virtually anysuch service. From these ideas, a protocol which provides afoundation can be constructed, to be extended for particularservices by adding primitives specific to each. The RRP[Reference 4] is one such possible protocol. Itprovides basic primitives to control the interaction betweenservers, and a mechanism for extending the primitives toinclude service-specific operations. The discussion here is primarily intended to explainthe basis for the design of the RRP, and to present somegeneral issues of design of services.III. THE REQUEST-REPLY DISCIPLINE The class of services relevant to this discussion arethose whose interactions could be performed in the followingmanner. Two servers have established a channel by some externalmeans. A single interaction between servers begins with oneserver, called the REQUESTER, issuing a request. The serverreceiving that request, the RESPONDER, issues a REPLY. Therequester interprets the reply sequence to determine whetherthe request was successful, failed, or partially failed, andtakes appropriate action. Such a sequence of events istermed an EXCHANGE. This is analogous to a subroutine callin a simple single-processor operating system. This model is termed a REQUEST-REPLY DISCIPLINE ofprogram interaction. It should be noted that this is only amodel of program behavior, and does not necessarily excludeservices which require, for example, some measure ofpipelining of requests for efficiency in long-delaysituation;. In fact, most network services would requiresuch measures, put their interactions can still be reducedto the request-reply model. At any time, one of the partners is in control of theinteraction, and is termed the MASTER of the interaction.The other partner is called the SLAVE. In the simplestcases, the requester is always the master, although this isnot always true in particular implementations, such as theRRP [Reference 4]. -3-IV. CHARACTERISTICS OF AN INTERACTION MECHANISM The following set of characteristics desirable in aninteraction mechanism is the result of experience withprogram communication in various ARPANET applications, suchas message services, file transfer, Datacomputer, and remotejob entry applications. In attempting to produce such systems, severalqualities recurred which would be desirable in thesubstructure upon which the systems are built. Thesecharacteristics would promote ease of writing and debuggingservers, maintaining reliability, and providing serviceswhich are responsive to customer needs, while avoidingdisruptions of service. The qualities desired in the interaction mechanism arepresented along with a discussion of the effects which theyare intended to produce in the associated services. It mustbe emphasized that this discussion is related to a class ofsimple services, and might not be appropriate for morecomplex applications. 1/ Servers must be able to transfer data in a precise fashion, retaining the structure and semantic meaning of the data, despite the dissimilarities of the computer systems in which they function. 2/ Synchronization and timing problems due to the characteristics of the communications link must be isolated and handled separately from any which might be characteristic of the service itself. 3/ Since services may wish to provide expanded facilities as they are used and developed, a mechanism must be included to enable the service protocol to evolve. 4/ Since various programs which act as servers may undergo simultaneous development, care must be taken to insure that servers with different capabilities interact reliably, maintaining at least the same level of service as existed previously. 5/ The mechanisms for extending the facilities must avoid requiring servers to be modified when new capabilities are introduced, but not impede progress by maintainers who are anxious to provide a new or experimental service. -4- These qualities may be placed in three categories, dataprecision (1), process synchronization (2), and serviceenhancement (3, 4, 5). Each will be discussed separately inthe following sections. The significance of each qualityand its effect on the associated service characteristicswill be included, with some references to related problemswith current and past services. Since these considerations are common to many possibleservices, it is appropriate for the interaction protocol toinclude them within its machinery as much as possible. Thispermits services to be implemented which, if carefullydesigned, inherit these properties from the interactionsubstrate.V. PRECISE DATA TRANSFER Precision in data transfer permits semantic andstructural information which exists in the sender's instanceof a datum to be reproduced in the receiver's image of thedatum, even though it may be represented in the systemsinvolved in entirely different fashions. For programs to provide powerful, reliablecapabilities, they must be able to interact using data whichis meaningful to the particular service involved. Theinteraction mechanism must permit services to define theirown relevant data types, and transfer such items efficientlyand precisely. This facility provides a 'standard' for data,permitting the service's designers to concentrate onhigher-level issues of concern to the service itself. Data of a given type should be recognizable as suchwithout need for context. The mechanism should also permitnew data types to be handled by older servers without error,even though they cannot interpret the semantics of the newdata. These characteristic permits services to be designed interms of the abstract data they need to function, withoutcontinued detailed concern for the particular formats inwhich it is represented within various machines. For example, servers may need to transfer a datumidentifying a particular date, which may be representedinternally within systems in different forms. The datatransfer mechanism should be capable of transferring such adatum as a date per se, rather than a strict pattern or bitsor characters. -5- For example, in current FTP-based mail systems,messages often contain information with significant semanticmeaning, which is lost or obscured when transferred betweensites. An example might be a file specification, whicheffectively loses all identity as such when translated intoa simple character stream. People can usually recognizesuch streams as file names, but it is often extremelydifficult, time-consuming, and inefficient to construct aprogram to do so reliably. As a result, services whichshould be easy to provide to the customer, such as automaticretrieval of relevant files, become difficult andunreliable. Some success has been achieved in handling certaindata, such as dates and times, by defining a particularcharacter pattern which, if seen in a particular context,can be recognized as a date or time. Each of these caseshas been done on an individual basis, by defining a formatfor the individual data of concern. Generally, the formatdepends to some extent on the datum occurring within aparticular context, and is not unique enough to beidentifiable outside of that context. A particular service can achieve data precision bymeticulous specification of the protocols by which data istransferred. This need is widespread enough, however, thatit is appropriate to consider inclusion of a facility toprovide data precision within the interaction mechanismitself. The major effect of this would be to facilitate thedesign of reliable, responsive services, by relieving theservice's designers from the need to consider very low-leveldetails of data representation, which are usually the leastinteresting, but highly critical, aspects of the design. Byisolating the data transfer mechanism, thIs architecturealso promotes modularity or implementations, which canreduce the cost and time needed to implement or modifyservices.VI. PROCESS SYNCHRONIZATION A major source of problems in many services involvedsynchronization of server; interacting over a relativelylow-bandwidth, high-delay communications link. Interactions in most services involve issuing a commandand waiting for a response. The number of responses whichcan be elicited by a given command often varies, and thereis usually no way to determine if all replies have arrived.Programs can easily issue a request before the responses toa previous request have completed, and get out ofsynchronization in a response is incorrectly matched to arequest. Each server program must be meticulously designedto be capable of recovering if an unexpected reply arrivesafter a subsequent command is issued. -6- Note that, for reliable operation, it is alwaysnecessary that each response cause a reply to occur, atleast in the sense that the request ts confirmed at somepoint. No service should perform a critical operation, suchas deleting a file, which depends on the success of aprevious request unless it has been confirmed. Requests incurrent protocols which do not appear to cause a reply maybe viewed as confirmed later when a subsequent request isacknowledged, while such protocols work, they are moreopaque than desirable, and consequently more difficult toimplement. These characteristics of protocols have often resultedin implementation of ad hoc methods for interaction, such astimeouts or sufficient length to assure correctness in anacceptably high percentage of situations. Often this hasrequired careful tuning of programs as experience in using aprotocol shows which commands are most likely to causeproblems. Such methods generally result in a service whichis less responsive, powerful, or efficient than desirable,and expensive to build and maintain. Additionally, protocol specifications for services haveoften been incomplete, in that an enumeration of theresponses which may occur for a given command is inaccurateor non-existent. This greatly complicates the task of theprogrammer trying to construct an intelligent server. Inmost cases, servers are slowly improved over time asexperience shows which responses are common in eachinstance. The synchronization problems mentioned above are inaddition to those which naturally occur as part of theservice operation. Thus, problems of synchronization maybe split into two classes, those inherent in the service,and those associated with the interaction mechanism itself. Construction of reliable, responsive servers can beassisted by careful design of the interaction mechanism andprotocols. An unambiguous, completely specified mappingbetween commands and responses is desirable.Synchronization considerations of the two types can beattacked separately. An interaction mechanism which handlesits own synchronization can be provided as a base forservice' designers to use, relieving them of considerationsof the low-level, protocol-derived problems, by providingprimitives which encourage the design of reliable services. To achieve a reasonable effective bandwidth, it isusually desirable to permit interacting programs to operatein a full-duplex fashion. Significant amounts of data areoften in transit at any time. This magnifies the problemsassociated with interaction by introducing parallelism. Theinteraction mechanism can also be structured to provide waysof handling these problems, and to provide a basis on whichservers which exploit parallelism can be constructed.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -