📄 rfc707.txt
字号:
-14-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 Conventional programs are usually implemented as a single process with exactly one locus of control. A procedure call, therefore, traditionally implies a transfer of control from caller to callee. Distributed systems, on the other hand, are implemented as two or more processes, each of which is capable of independent execution. In this new environment, a remote procedure call need not suspend the caller, which is capable of continuing execution in parallel with the called procedure. The RTE can therefore be expected to provide, for convenience, two modes of remote procedure invocation: a blocking mode that suspends the caller until the procedure returns; and a non-blocking mode that releases the caller as soon as the CALL message has been sent or queued. Most conventional operating systems already provide such a mode choice for I/O operations. For non-blocking calls, the RTE must also, of course, either arrange to asynchronously notify the program when the call is complete, or provide an additional primitive by which the applications program can periodically test for that condition. Finally, the applications programmer must recognize that by nomeans all useful forms of network communication are effectivelymodeled as procedure calls. The lower level IPC facility thatremains directly accessible to him must therefore be employed inthose applications for which the procedure call model isinappropriate and RTE-provided primitives simply will not do. 4c2 -15-NWG/RFC# 707 JEW 14-JAN-76 19:51 34263NCC 76 A High-Level Framework for Network-Based Resource Sharing Some ExpectationsSOME EXPECTATIONS 5 Both the Procedure Call Protocol and its associated Run-TimeEnvironment have great potential for facilitating the work of thenetwork programmer; only a small percentage of that potential hasbeen discussed in the present paper. Upon the foundation providedby PCP can be erected higher level application-independent protocollayers that further enhance the distributed programming environmentby providing even more powerful capabilities (see Appendix D). 5a As the importance of the RTE becomes fully evident, additionaltasks will gradually be assigned to it, including perhaps those of: 5b (1) Converting parameters between the format employed internally by the applications program, and that imposed by the Protocol. 5b1 (2) Automatically selecting the most appropriate inter-process transmission format on the basis of the two machines' word sizes. 5b2 (3) Automatically substituting for network IPC a more efficient form of communication when both processes reside on the same machine. 5b3The RTE will eventually offer the programmer a wide variety ofapplication-independent, network-programming conveniences, and so,by means of the Protocol, become an increasingly powerfuldistributed-system-building tool. 5c -16-NWG/RFC# 707 JEW 14-JAN-76 19:51 34263NCC 76 A High-Level Framework for Network-Based Resource Sharing AcknowledgmentsACKNOWLEDGMENTS 6 Many individuals within both SRI's Augmentation Research Center(ARC) and the larger ARPANET community have contributed their timeand ideas to the development of the Protocol and Model described inthis paper. The contributions of the following individuals areexpressly acknowledged: Dick Watson, Jon Postel, Charles Irby, KenVictor, Dave Maynard, and Larry Garlick of ARC; and Bob Thomas andRick Schantz of Bolt, Beranek and Newman, Inc. 6a ARC has been working toward a high-level framework fornetwork-based distributed systems for a number of years now [14].The particular Protocol and Model described here result fromresearch begun by ARC in July of 1974. This research includeddeveloping the Model; designing and documenting the Protocolrequired to support it [15]; and designing, documenting, andimplementing a prototype run-time environment for a particularmachine [16, 17], specifically a PDP-10 running the Tenex operatingsystem developed by Bolt, Beranek and Newman, Inc [18]. Threedesign iterations were carried out during a 12-month period, and theresulting specification implemented for Tenex. The Tenex RTEprovides a superset of the capabilities presented in the body ofthis paper and Appendices A through C as well as those alluded to inAppendix D. 6b The work reported here was supported by the Advanced ResearchProjects Agency of the Department of Defense, and by the Rome AirDevelopment Center of the Air Force. 6c -17-NWG/RFC# 707 JEW 14-JAN-76 19:51 34263NCC 76 A High-Level Framework for Network-Based Resource Sharing Appendix A: Suggested Data TypesAPPENDIX A: SUGGESTED DATA TYPES 7 The Protocol requires that every parameter or "data object" berepresented by one of several primitive data types defined by theModel. The set of data types below is sufficient to convenientlymodel a large class of data objects, but since the need foradditional data types (for example, floating-point numbers) willsurely arise, the set must remain open-ended. Throughout thedescriptions below, N is confined to the range [0, 2**15-1]: 7a LIST: A list is an ordered sequence of N data objects called "elements". A LIST may contain other LISTs as elements, and can therefore be employed to construct arbitrarily complex composite data objects. 7a1 CHARSTR: A character string is an ordered sequence of N ASCII characters, and conveniently models a variety of textual entities, from short user names to whole paragraphs of text. 7a2 BITSTR: A bit string is an ordered sequence of N bits and, therefore, provides a means for representing arbitrary binary data (for example, the contents of a word of memory). 7a3 INTEGER: An integer is a fixed-point number in the range [-2**31, 2**31-1], and conveniently models various kinds of numerical data, including time intervals, distances, and so on. 7a4 INDEX: An index is an integer in the range [1, 2**15-1]. As its name and value range suggest, an INDEX can be used to address a particular bit or character within a string, or element within a list. INDEXes have other uses as well, including the modeling of handles or identifiers for open files, created processes, and the like. Also, because of their restricted range, INDEXes are more compact in transmission than INTEGERs (see Appendix B). 7a5 BOOLEAN: A boolean represents a single bit of information, and has either the value true or false. 7a6 EMPTY: An empty is a valueless place holder within a LIST or parameter list. 7a7 -18-NWG/RFC# 707 JEW 14-JAN-76 19:51 34263NCC 76 A High-Level Framework for Network-Based Resource Sharing Appendix B: Suggested Transmission FormatsAPPENDIX B: SUGGESTED TRANSMISSION FORMATS 8 Parameters must be encoded in a standard transmission formatbefore they can be sent from one process to another via theProtocol. An effective strategy is to define several formats andselect the most appropriate one at run-time, adding to the Protocola mechanism for format negotiation. Format negotiation would beanother responsibility of the RTE and could thus be made completelyinvisible to the applications program. 8a Suggested below are two transmission formats. The first is a36-bit binary format for use between 36-bit machines, the second an8-bit binary, "universal" format for use between dissimilarmachines. Data objects are fully typed in each format to enable theRTE to automatically decode and internalize incoming parametersshould it be desired to provide this service to the applicationsprogram. 8bPCPB36, For Use Between 36-Bit Machines 8c Bits 0-13 Unused (zero) 8c1 Bits 14-17 Data type 8c2 EMPTY =1 INTEGER=4 LIST=7 BOOLEAN=2 BITSTR =5 INDEX =3 CHARSTR=6 Bits 18-20 Unused (zero) 8c3 Bits 21-35 Value or length N 8c4 EMPTY unused (zero) BOOLEAN 14 zero-bits + 1-bit value (TRUE=1/FALSE=0) INDEX unsigned value INTEGER unused (zero) BITSTR unsigned bit count N CHARSTR unsigned character count N LIST unsigned element count N Bits 36- Value 8c5 EMPTY unused (nonexistent) BOOLEAN unused (nonexistent) INDEX unused (nonexistent) INTEGER two's complement full-word value BITSTR bit string + zero padding to word boundary CHARSTR ASCII string + zero padding to word boundary LIST element data objects -19-NWG/RFC# 707 JEW 14-JAN-76 19:51 34263NCC 76 A High-Level Framework for Network-Based Resource Sharing Appendix B: Suggested Transmission FormatsPCPB8, For Use Between Dissimilar Machines 8d Byte 0 Data type 8d1 EMPTY =1 INTEGER=4 LIST=7 BOOLEAN=2 BITSTR =5 INDEX =3 CHARSTR=6 Bytes 1- Value 8d2 EMPTY unused (nonexistent) BOOLEAN 7 zero-bits + 1-bit value (TRUE=1/FALSE=0) INDEX 2-byte unsigned value INTEGER 4-byte two's complement value BITSTR 2-byte unsigned bit count N + bit string + zero padding to byte boundary CHARSTR 2-byte unsigned character count N + ASCII string LIST 2-byte element count N + element data objects -20-NWG/RFC# 707 JEW 14-JAN-76 19:51 34263NCC 76 A High-Level Framework for Network-Based Resource Sharing Appendix C: A Detailed Encoding of the Procedure Call ProtocolAPPENDIX C: A DETAILED ENCODING OF THE PROCEDURE CALL PROTOCOL 9 Although the data types and transmission formats detailed in theprevious appendixes serve primarily as vehicles for representing thearguments and results of remote procedures, they can just as readilyand effectively be employed to represent the commands and responsesby which those parameters are transmitted. 9a Taking this approach, one might model each of the two Protocolmessages as a PCP data object, specifically a LIST whose firstelement is an INDEX message type. The following concise statementof the Protocol then results: 9b LIST (CALL, tid, procedure, arguments) INDEX=1 INDEX/EMPTY CHARSTR LIST 9b1 LIST (RETURN, tid, outcome, results) INDEX=2 INDEX BOOLEAN LIST 9b2The RESULTS of an unsuccessful procedure would be represented asfollows: 9c LIST (error, diagnostic) INDEX CHARSTR 9c1
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -