📄 rfc707.txt
字号:
-7-NWG/RFC# 707 JEW 14-JAN-76 19:51 34263NCC 76 A High-Level Framework for Network-Based Resource Sharing A Command/Response Protocol, the Basis for an Alternative ApproachSecond, the Protocol should remove the known deficiencies of itspredecessor, that is: 3b2 (3) Allow an arbitrary number of parameters to be supplied as arguments to a single command. (4) Provide representations for a variety of parameter types, including but not limited to character strings. (5) Permit commands to return parameters as results as well as accept them as arguments.And, finally, the Protocol should provide whatever additionalcapabilities are required by the more complex distributed systemswhose creation the Protocol seeks to encourage. Although others maylater be identified, the three capabilities below are recognized nowto be important: 3b3 (6) Permit the server process to invoke commands in the user process, that is, eliminate entirely the often inappropriate user/server distinction, and allow each process to invoke commands in the other. In the workshop environment alluded to earlier, for example, the user process is the command language interpreter and the server process is any of the software tools available to the user. While most commands are issued by the interpreter and addressed to the tool, occasionally the tool must invoke commands in the interpreter or in another tool. A graphical text editor, for example, must invoke commands within the interpreter to update the user's display screen after an editing operation. (7) Permit a process to accept two or more commands for concurrrent execution. The text editor may wish to permit the user to initiate a long formatting operation with one command and yet continue to issue additional, shorter commands before there is a response to the first. (8) Allow the process issuing a command to suppress the response the command would otherwise elicit. This feature would permit network traffic to be reduced in those cases in which the process invoking the command deems a -8-NWG/RFC# 707 JEW 14-JAN-76 19:51 34263NCC 76 A High-Level Framework for Network-Based Resource Sharing A Command/Response Protocol, the Basis for an Alternative Approach response unnecessary. Commands that always succeed but never return results are obvious candidates for this kind of treatment.A Formulation of the Protocol That Meets These Specifications 3c The eight requirements listed above are met by a protocol inwhich the following two messages are defined: 3c1 message-type=COMMAND [tid] command-name arguments message-type=RESPONSE tid outcome resultsHere and in subsequent protocol descriptions, elements enclosed insquare brackets are optional. 3c2 The first message invokes the command whose NAME is specifiedusing the ARGUMENTS provided. The second is issued in eventualresponse to the first and returns the OUTCOME and RESULTS of thecompleted command. Whenever OUTCOME indicates that a command hasfailed, the command's RESULTS are required to be an error number anddiagnostic message, the former to help the invoking programdetermine what to do next, the latter for possible presentation tothe user. The protocol thus provides a framework for reportingerrors, while leaving to the applications program the tasks ofassigning error numbers and composing the text of error messages. 3c3 There are several elements of the Protocol that are absent fromthe existing command/response discipline: 3c4 (1) RESULTS, in fulfillment of Requirement 5. (2) A MESSAGE TYPE that distinguishes commands from responses, arising from Requirement 6. In the existing discipline, this distinction is implicit, since user and server processes receive only responses and commands, respectively. (3) An optional transaction identifier TID by which a command and its response are associated, arising from Requirements 7 and 8. The presence of a transaction identifier in a command implies the necessity of a response echoing the identifier; and no two concurrently outstanding commands may bear the same identifier. -9-NWG/RFC# 707 JEW 14-JAN-76 19:51 34263NCC 76 A High-Level Framework for Network-Based Resource Sharing A Command/Response Protocol, the Basis for an Alternative Approach Requirements 3 and 4--the ability to transmit an arbitrary numberof parameters of various types with each command or response--aremost economically and effectively met by defining a small set ofprimitive "data types" (for example, booleans, integers, characterstrings) from which concrete parameters can be modeled, and a"transmission format" in which such parameters can be encoded.Appendix A suggests a set of data types suitable for a large classof applications; Appendix B defines some possible transmissionformats. 3c5 The protocol description given above is, of course, purelysymbolic. Appendix C explores one possible encoding of the Protocolin detail. 3c6Summarizing the Arguments Advanced So Far 3d The author trusts that little of what has been presented thus farwill be considered controversial by the reader. The followingprincipal arguments have been made: 3d1 (1) The more effective forms of resource sharing depend upon remote resources being usefully accessible to other programs, not just to human users. (2) Application-dependent protocols providing such access using the current approach leave to the applications programmer the task of constructing the additional layer of software (above the IPC facility provided by the system) required to make remote resources accessible at the functional level, thus discouraging their use. (3) A single, resource-independent protocol providing flexible and efficient access at the functional level to arbitrary remote resources can be devised. (4) This protocol would make possible the construction at each installation of an application-independent, network run-time environment making remote resources accessible at the functional level and thus encouraging their use by the applications programmer. A protocol as simple as that suggested here has great potentialfor stimulating the sharing of resources within a computer network.First, it would reduce the cost of adapting existing resources fornetwork use by eliminating the need for the design, documentation,and implementation of specialized delivery protocols. Second, it -10-NWG/RFC# 707 JEW 14-JAN-76 19:51 34263NCC 76 A High-Level Framework for Network-Based Resource Sharing A Command/Response Protocol, the Basis for an Alternative Approachwould encourage the use of remote resources by eliminating the needfor application-specific interface software. And finally, it wouldencourage the construction of new resources built expressly forremote access, because of the ease with which they could be offeredand used within the network software marketplace. 3d2 -11-NWG/RFC# 707 JEW 14-JAN-76 19:51 34263NCC 76 A High-Level Framework for Network-Based Resource Sharing A High-Level Model of the Network EnvironmentA HIGH-LEVEL MODEL OF THE NETWORK ENVIRONMENT 4The Importance of the Model Imposed by the Protocol 4a The Protocol proposed above imposes upon the applicationsprogrammer a particular model of the network environment. In aheterogeneous computer network, nearly every protocol intended forgeneral implementation has this effect, since it idealizes a classof operations that have concrete but slightly different equivalentsin each system. Thus the ARPANET's TELNET Protocol alluded toearlier, for example, specifies a Network Virtual Terminal thatattempts to provide a best fit to the many real terminals in usearound the Network. 4a1 As now formulated, the Protocol models a remote resource as aninteractive program with a simple, rigidly specified commandlanguage. This model follows naturally from the fact that thefunction-oriented protocols from which the Protocol was extractedwere necessitated by the complexity and diversity of user-orientedcommand languages. The Protocol may thus legitimately be viewed asa vehicle for providing, as an adjunct to the sophisticated commandlanguages already available to users, a family of simple commandlanguages that can readily be employed by programs. 4a2 While the command/response model is a natural one, others arepossible. A remote resource might also be modeled as a process thatservices and replies to requests it receives from other computerprocesses. This request/reply model would emphasize the fact thatthe Protocol is a vehicle for inter-process communication and thatno human user is directly involved. 4a3 Substituting the request/reply model for the command/responsemodel requires only cosmetic changes to the Protocol: 4a4 message-type=REQUEST [tid] op-code arguments message-type=REPLY tid outcome resultsIn the formulation above, the terms "REQUEST", "REPLY", and"op-code" have simply been substituted for "COMMAND", "RESPONSE",and "command-name", respectively. 4a5 The choice of model need affect neither the content of theProtocol nor the behavior of the processes whose dialog it governs.Use of the word "command" in the command/response model, forexample, is not meant to imply that the remote process can becoerced into action. Whatever model is adopted, a process has -12-NWG/RFC# 707 JEW 14-JAN-76 19:51 34263NCC 76 A High-Level Framework for Network-Based Resource Sharing A High-Level Model of the Network Environmentcomplete freedom to reject an incoming remote request that it isincapable of or unwilling to fulfill. 4a6 But even though it has no substantive effect upon the Protocol,the selection of a model--command/response, request/reply, and soon--is an important task because it determines the way in which bothapplications and systems programmers perceive the networkenvironment. If the network environment is made to appear foreignto him, the applications programmer may be discouraged from usingit. The choice of model also constrains the kind and range ofprotocol extensions that are likely to occur to the systemsprogrammer; one model may suggest a rich set of useful extensions,another lead nowhere (or worse still, in the wrong direction). 4a7 In this final section of the paper, the author suggests a networkmodel (hereafter termed the Model) that he believes will bothencourage the use of remote resources by the applications programmerand suggest to the systems programmer a wide variety of usefulProtocol extensions. Unlike the substance of the Protocol, however,the Model has already proven quite controversial within the ARPANETcommunity. 4a8Modeling Resources As Collections of Procedures 4b Ideally, the goal of both the Protocol and its accompanying RTEis to make remote resources as easy to use as local ones. Sincelocal resources usually take the form of resident and/or librarysubroutines, the possibility of modeling remote commands as"procedures" immediately suggests itself. The Model is furtherconfirmed by the similarity that exists between local procedures andthe remote commands to which the Protocol provides access. Bothcarry out arbitrarily complex, named operations on behalf of therequesting program (the caller); are governed by arguments suppliedby the caller; and return to it results that reflect the outcome ofthe operation. The procedure call model thus acknowledges that, ina network environment, programs must sometimes call subroutines inmachines other than their own. 4b1 Like the request/reply model already described, the procedurecall model requires only cosmetic changes to the Protocol: 4b2 message-type=CALL [tid] procedure-name arguments message-type=RETURN tid outcome resultsIn this third formulation, the terms "CALL", "RETURN", and"procedure-name" have been substituted for "COMMAND, "RESPONSE", and -13-NWG/RFC# 707 JEW 14-JAN-76 19:51 34263NCC 76 A High-Level Framework for Network-Based Resource Sharing A High-Level Model of the Network Environment"command-name", respectively. And in this form, the Protocol mightaptly be designated a "procedure call protocol (PCP)". 4b3 "The procedure call model would elevate the task of creatingapplications protocols to that of defining procedures and theircalling sequences. It would also provide the foundation for a truedistributed programming system (DPS) that encourages and facilitatesthe work of the applications programmer by gracefully extending thelocal programming environment, via the RTE, to embrace modules onother machines." This integration of local and network programmingenvironments can even be carried as far as modifying compilers toprovide minor variants of their normal procedure-calling constructsfor addressing remote procedures (for which calls to the appropriateRTE primitives would be dropped out). 4b4 Finally, the Model is one that can be naturally extended in avariety of ways (for example, coroutine linkages and signals) tofurther enhance the distributed programming environment. 4b5Clarifying the Procedure Call Model 4c Although in many ways it accurately portrays the class of networkinteractions with which this paper deals, the Model suggested abovemay in other respects tend to mislead the applications programmer.The Model must therefore be clarified: 4c1 (1) Local procedure calls are cheap; remote procedure calls are not. Local procedure calls are often effected by means of a single machine instruction and are therefore relatively inexpensive. Remote procedure calls, on the other hand, would be effected by means of a primitive provided by the local RTE and require an exchange of messages via IPC. Because of this cost differential, the applications programmer must exercise discretion in his use of remote resources, even though the mechanics of their use will have been greatly simplified by the RTE. Like virtual memory, the procedure call model offers great convenience, and therefore power, in exchange for reasonable alertness to the possibilities of abuse. (2) Conventional programs usually have a single locus of control; distributed programs need not.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -