rfc722.txt

来自「RFC 的详细文档!」· 文本 代码 · 共 801 行 · 第 1/2 页

TXT
801
字号
Network Working Group                                       Jack Haverty  (MIT)
Request for Comments: 722                                             Sept 1976
NIC #36806


I. ABSTRACT


     This paper addresses some issues concerned with the
design of distributed services.  In particular, it is
concerned with the characteristics of the interactions,
between programs which support some service at various
network sites.  The ideas presented are derived mainly from
experience 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 simplify
the construction of reliable, responsive services are
identified.  These dualities are motivated by problems
experienced with various ARPANET protocols and in the design
and maintenance of programs which use these protocols in the
performance of some service.

     Using this model as a template, the general
architecture of one possible interaction protocol is
presented.  This mechanism provides a foundation on which
protocols would be constructed for particular services,
simplifying the process of creating services which are easy
to implement and maintain, and appear reliable and
responsive to the customer.  This presentation is meant to
serve as an introduction to a specific instance of such a
protocol, called the RRP, which is defined in one of the
references.

























                                -1-
II. OVERVIEW AND TERMINOLOGY


     This paper considers the interaction of two programs
which support some network service.  It develops a model of
the interactions of a class of such applications, and
includes some thoughts on desirable goals and
characteristics of implementations.  The model is derived
from a proposal [Reference 2] for mail-handling
systems.  Terminology, as introduced, is highlighted by
capitalization.

     Many uses of computer networks involve communication
directly between programs, without human intervention or
monitoring.  Some examples would include an advanced
mail-handling system, or any kind of multi-site data base
manager.

     Such programs will be termed SERVERs.  They are the
users of some mechanism which provides the needed
communication and synchronization.  The particular facility
which the servers implement will be termed a SERVICE.
Servers for any particular service may be written in several
languages, operate in various system environments on
different kinds of computers.  The entity which utilizes the
service will be termed the CUSTOMER.

     Servers interact during ENCOUNTERs, which are the
periods when two servers are in communication.  An encounter
begins when one server establishes a CHANNEL, a
bidirectional communication link with another server.  The
interaction between servers is effected by the exchange of
information over the channel.  The conventions used in such
an exchange are defined by the PROTOCOLs for the
interaction.

     The theme of this paper is a model for a particular
class of process interactions which may be used as a basis
for many possible services, where the interactions are
fairly simple.  Services which fit in this category interact
in a manner which can be modeled by a REQUEST-REPLY
DISCIPLINE, which is defined herein.

     A set of guidelines and goals is developed, which
address issues relevant to ease or implementation and
reliability of operation of servers.  These guidelines may
be used to assist in the formulation of protocols specific
to appropriate services.








                                -2-
     Additionally, the guidelines presented may be used as a
basis for a general process interaction protocol, by
extracting the primitives and operational concepts which
would be common to a protocol constructed for virtually any
such service.

     From these ideas, a protocol which provides a
foundation can be constructed, to be extended for particular
services by adding primitives specific to each.  The RRP
[Reference 4] is one such possible protocol.  It
provides basic primitives to control the interaction between
servers, and a mechanism for extending the primitives to
include service-specific operations.

     The discussion here is primarily intended to explain
the basis for the design of the RRP, and to present some
general issues of design of services.


III. THE REQUEST-REPLY DISCIPLINE


     The class of services relevant to this discussion are
those whose interactions could be performed in the following
manner.

     Two servers have established a channel by some external
means.  A single interaction between servers begins with one
server, called the REQUESTER, issuing a request.  The server
receiving that request, the RESPONDER, issues a REPLY.  The
requester interprets the reply sequence to determine whether
the request was successful, failed, or partially failed, and
takes appropriate action.  Such a sequence of events is
termed an EXCHANGE.  This is analogous to a subroutine call
in a simple single-processor operating system.

     This model is termed a REQUEST-REPLY DISCIPLINE of
program interaction.  It should be noted that this is only a
model of program behavior, and does not necessarily exclude
services which require, for example, some measure of
pipelining of requests for efficiency in long-delay
situation;.  In fact, most network services would require
such measures, put their interactions can still be reduced
to the request-reply model.

     At any time, one of the partners is in control of the
interaction, and is termed the MASTER of the interaction.
The other partner is called the SLAVE.  In the simplest
cases, the requester is always the master, although this is
not always true in particular implementations, such as the
RRP [Reference 4].




                                -3-
IV. CHARACTERISTICS OF AN INTERACTION MECHANISM


     The following set of characteristics desirable in an
interaction mechanism is the result of experience with
program communication in various ARPANET applications, such
as message services, file transfer, Datacomputer, and remote
job entry applications.

     In attempting to produce such systems, several
qualities recurred which would be desirable in the
substructure upon which the systems are built.  These
characteristics would promote ease of writing and debugging
servers, maintaining reliability, and providing services
which are responsive to customer needs, while avoiding
disruptions of service.

     The qualities desired in the interaction mechanism are
presented along with a discussion of the effects which they
are intended to produce in the associated services.  It must
be emphasized that this discussion is related to a class of
simple services, and might not be appropriate for more
complex 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, data
precision (1), process synchronization (2), and service
enhancement (3, 4, 5).  Each will be discussed separately in
the following sections.  The significance of each quality
and its effect on the associated service characteristics
will be included, with some references to related problems
with current and past services.

     Since these considerations are common to many possible
services, it is appropriate for the interaction protocol to
include them within its machinery as much as possible.  This
permits services to be implemented which, if carefully
designed, inherit these properties from the interaction
substrate.


V. PRECISE DATA TRANSFER


     Precision in data transfer permits semantic and
structural information which exists in the sender's instance
of a datum to be reproduced in the receiver's image of the
datum, even though it may be represented in the systems
involved in entirely different fashions.

     For programs to provide powerful, reliable
capabilities, they must be able to interact using data which
is meaningful to the particular service involved.  The
interaction mechanism must permit services to define their
own relevant data types, and transfer such items efficiently
and precisely.  This facility provides a 'standard' for data,
permitting the service's designers to concentrate on
higher-level issues of concern to the service itself.

     Data of a given type should be recognizable as such
without need for context.  The mechanism should also permit
new data types to be handled by older servers without error,
even though they cannot interpret the semantics of the new
data.

     These characteristic permits services to be designed in
terms of the abstract data they need to function, without
continued detailed concern for the particular formats in
which it is represented within various machines.

     For example, servers may need to transfer a datum
identifying a particular date, which may be represented
internally within systems in different forms.  The data
transfer mechanism should be capable of transferring such a
datum as a date per se, rather than a strict pattern or bits
or characters.




                                -5-
     For example, in current FTP-based mail systems,
messages often contain information with significant semantic
meaning, which is lost or obscured when transferred between
sites.  An example might be a file specification, which
effectively loses all identity as such when translated into
a simple character stream.  People can usually recognize
such streams as file names, but it is often extremely
difficult, time-consuming, and inefficient to construct a
program to do so reliably.  As a result, services which
should be easy to provide to the customer, such as automatic
retrieval of relevant files, become difficult and
unreliable.

     Some success has been achieved in handling certain
data, such as dates and times, by defining a particular
character pattern which, if seen in a particular context,
can be recognized as a date or time.  Each of these cases
has been done on an individual basis, by defining a format
for the individual data of concern.  Generally, the format
depends to some extent on the datum occurring within a
particular context, and is not unique enough to be
identifiable outside of that context.

     A particular service can achieve data precision by
meticulous specification of the protocols by which data is
transferred.  This need is widespread enough, however, that
it is appropriate to consider inclusion of a facility to
provide data precision within the interaction mechanism
itself.

     The major effect of this would be to facilitate the
design of reliable, responsive services, by relieving the
service's designers from the need to consider very low-level
details of data representation, which are usually the least
interesting, but highly critical, aspects of the design.  By
isolating the data transfer mechanism, thIs architecture
also promotes modularity or implementations, which can
reduce the cost and time needed to implement or modify
services.


VI. PROCESS SYNCHRONIZATION

     A major source of problems in many services involved
synchronization of server; interacting over a relatively
low-bandwidth, high-delay communications link.

     Interactions in most services involve issuing a command
and waiting for a response.  The number of responses which
can be elicited by a given command often varies, and there
is usually no way to determine if all replies have arrived.
Programs can easily issue a request before the responses to
a previous request have completed, and get out of
synchronization in a response is incorrectly matched to a
request.  Each server program must be meticulously designed
to be capable of recovering if an unexpected reply arrives
after a subsequent command is issued.

                                -6-
     Note that, for reliable operation, it is always
necessary that each response cause a reply to occur, at
least in the sense that the request ts confirmed at some
point.  No service should perform a critical operation, such
as deleting a file, which depends on the success of a
previous request unless it has been confirmed.  Requests in
current protocols which do not appear to cause a reply may
be viewed as confirmed later when a subsequent request is
acknowledged, while such protocols work, they are more
opaque than desirable, and consequently more difficult to
implement.

     These characteristics of protocols have often resulted
in implementation of ad hoc methods for interaction, such as
timeouts or sufficient length to assure correctness in an
acceptably high percentage of situations.  Often this has
required careful tuning of programs as experience in using a
protocol shows which commands are most likely to cause
problems.  Such methods generally result in a service which
is less responsive, powerful, or efficient than desirable,
and expensive to build and maintain.

     Additionally, protocol specifications for services have
often been incomplete, in that an enumeration of the
responses which may occur for a given command is inaccurate
or non-existent.  This greatly complicates the task of the
programmer trying to construct an intelligent server.  In
most cases, servers are slowly improved over time as
experience shows which responses are common in each
instance.

     The synchronization problems mentioned above are in
addition to those which naturally occur as part of the
service operation.  Thus, problems of synchronization may
be split into two classes, those inherent in the service,
and those associated with the interaction mechanism itself.

     Construction of reliable, responsive servers can be
assisted by careful design of the interaction mechanism and
protocols.  An unambiguous, completely specified mapping
between commands and responses is desirable.
Synchronization considerations of the two types can be
attacked separately.  An interaction mechanism which handles
its own synchronization can be provided as a base for
service' designers to use, relieving them of considerations
of the low-level, protocol-derived problems, by providing
primitives which encourage the design of reliable services.

     To achieve a reasonable effective bandwidth, it is
usually desirable to permit interacting programs to operate
in a full-duplex fashion.  Significant amounts of data are
often in transit at any time.  This magnifies the problems
associated with interaction by introducing parallelism.  The
interaction mechanism can also be structured to provide ways
of handling these problems, and to provide a basis on which
servers which exploit parallelism can be constructed.

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?