home *** CD-ROM | disk | FTP | other *** search
/ Unix System Administration Handbook 1997 October / usah_oct97.iso / rfc / 600s / rfc684.txt < prev    next >
Text File  |  1992-10-14  |  21KB  |  407 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6. Network Working Group
  7. RFC #684
  8. NIC #32252
  9. April 15,1975
  10.  
  11.  
  12.  
  13.     A Commentary on Procedure Calling as a Network Protocol
  14.  
  15.                         Richard Schantz
  16.  
  17.                            BBN-TENEX
  18.  
  19.  
  20.  
  21. Preface_______
  22.  
  23. This RFC is being issued as a first step in an attempt to  stimulate
  24. a dialog on some issues in designing a distributed computing system.
  25. In particular, it considers the approach taken in a design set forth
  26. in  RFC #674, commonly known as the "Procedure Call Protocol" (PCP).
  27. In the present document, the concentration is on what we believe  to
  28. be the shortcomings of such a design approach.
  29.  
  30. Note at the outset that this is not the first time we are  providing
  31. a critical commentary on PCP.  During the earlier PCP design stages,
  32. we met with the PCP designers for  a  brief  period,  and  suggested
  33. several  changes,  many  of  which became part of PCP Version 2.  We
  34. hasten to add, however, that the nature of  those  suggestions  stem
  35. from  an entirely different point of view than those presented here.
  36. Our original suggestions, and also some subsequent ones, were mainly
  37. addressing  details  of implementation.  In this note the concern is
  38. more with the concepts underlying the PCP design than with  the  PCP
  39. implementation.
  40.  
  41. This note is being  distributed  because  we  feel  that  it  raises
  42. certain  issues  which  have not been adequately addressed yet.  The
  43. PCP designers are to  be  congratulated  for  providing  a  detailed
  44. written  description  of  their  ideas,  thereby  creating a natural
  45. starting  point  for  a  discussion  of  distributed  system  design
  46. concepts.  It is the intent of this note to stimulate an interaction
  47. among individuals involved with distributed computing,  which  could
  48. perhaps  result in systems whose designs don't preclude their use in
  49. projects  other  than  the  one  for  which  they  were   originally
  50. conceived.
  51.  
  52. The ideas  expressed  in  this  RFC  have  benefited  from  numerous
  53. discussions with Bob Thomas, BBN-TENEX, who shares the point of view
  54. taken.
  55.  
  56.           A COMMENTARY on PROCEDURE CALLING         Page   2
  57.  
  58.  
  59.  
  60. Introduction____________
  61.  
  62.  
  63.      While the Procedure Call Protocol (PCP) and its use within  the
  64. National  Software  Works (NSW) context attacks many of the problems
  65. associated with integrating independent computing systems to  handle
  66. a  distributed  computation,  it  is  our  feeling  that  its design
  67. contains flaws which should prevent its widespread use, and  in  our
  68. view,  limit  its overall utility.  We are not voicing our objection
  69. to the use of PCP, in its current  definition,  as  the  base  level
  70. implementation  vehicle for the NSW project.  It is already too late
  71. for any such objection, and PCP may, in fact, be very effective  for
  72. the  NSW  implementation,  since they are proceeding in parallel and
  73. have probably influenced each other.   Rather,  we  are  voicing  an
  74. objection  to  the  "PCP philosophy", in the hope of preventing this
  75. type of protocol from becoming the  de-facto  network  standard  for
  76. distributed  computation,  and in the hope of influencing the future
  77. direction of this and similar efforts.
  78.  
  79.      Some of the objectionable aspects of PCP, it can be argued, are
  80. differences  of  individual  preference, and philosophers have often
  81. indicated that you cannot argue about  tastes.   We  have  tried  to
  82. avoid  such  arguments in this document.  Rather, we consider PCP in
  83. light  of  our  experience  in   developing   distributed   systems.
  84. Considered  in  this  way,  we  feel  that  PCP  and  its underlying
  85. philosophy have flaws which  make  it  inappropriate  as  a  general
  86. purpose protocol and virtual programming system for the construction
  87. of distributed software systems.  It is  our  opinion  that  PCP  is
  88. probably  complete  in  the  sense that one can probably do anything
  89. that is required using its primitives.  A key  issue  then,  is  not
  90. whether this function or that function can be supported.  Rather, to
  91. us an important question is how easy it is to do  the  things  which
  92. experience has indicated are important to distributed computing.  In
  93. addition, a programming discipline dedicated to network applications
  94. should  pay  particular  attention  to  coercing its users away from
  95. actions which systems programming in general and network programming
  96. in particular have shown to be pitfalls in system implementation.
  97.  
  98.  
  99. A Point of View_ _____ __ ____
  100.  
  101.  
  102.      At the outset, we fully support the aspects of the  PCP  design
  103. effort  that  have  gone  into  systematizing  the  interaction  and
  104. agreements between distributed  elements  to  support  inter-machine
  105. computing.   This  includes  the  definition of the various types of
  106. replies, the  standardization  of  the  data  structure  format  for
  107. inter-machine  exchange,  and  the process creation primitives which
  108. extend the machine boundaries.  Such notions are basic and  must  be
  109. part  of any distributed system definition.  Our main concern is not
  110. with these efforts.
  111.  
  112.           A COMMENTARY on PROCEDURE CALLING         Page   3
  113.  
  114.  
  115.  
  116.      Rather, we take exception to PCP's underlying premise: that the
  117. procedure  calling  discipline  is  the  starting point for building
  118. multi-computer systems.  This premise leads to a model which  has  a
  119. central  point  for the entire algorithm control, rather than a more
  120. natural (in network situations) distributed control accomplished  by
  121. cooperating   independent   entities   interacting   through  common
  122. communication paths.  While the procedure call may be an appropriate
  123. basis  for  certain  applications,  we  believe  that it can neither
  124. directly  nor  accurately  model  the   interactions   and   control
  125. structures that occur in many distributed multi-computer systems.
  126.  
  127.      Much of what follows may seem to be a pedagogic  argument,  and
  128. PCP supporters may take the position of "who cares what you call it,
  129. its doing the same thing".  Our reply is that it is  very  important
  130. to achieve a clear and concise model of distributed computation, and
  131. while the PCP  model  does  not  require  "poor  implementation"  of
  132. distributed  systems, neither does it make "good implementation" any
  133. easier, nor does it prohibit ill-advised programming  practices.   A
  134. model  stressing the dynamic interconnection of somewhat independent
  135. computing  entities,  we  feel,  adheres  more  to  the  notions  of
  136. defensive  programming,  which  we  have  found to be fundamental to
  137. building usable multi-machine implementations.
  138.  
  139.      The rest of this RFC discusses what we feel to be some  of  the
  140. shortcomings of a procedure call protocol.
  141.  
  142.  
  143. Limitations of Procedure Calling Across Machines___________ __ _________ _______ ______ ________
  144.  
  145.  
  146.      First and foremost, it is our contention that procedure calling
  147. should  not  be  the  basis for multi-machine interactions.  We feel
  148. that a request and reply protocol along  with  suitably  manipulated
  149. communication paths between processes forms a model better suited to
  150. the situation  in  which  the  network  places  us.   In  a  network
  151. environment  one has autonomous computing entities which have agreed
  152. on their cooperation, rather than a master process forcing execution
  153. of a certain body of code to fulfill its computing needs.  In such a
  154. configuration, actions required of a process are  best  accommodated
  155. indirectly (by request) rather than directly (by procedure call), in
  156. order to maintain the integrity of the constituent processes.
  157.  
  158.      Procedure calling is most  often  a  very  primitive  operation
  159. whose   implementation   often   requires   only  a  single  machine
  160. instruction.  In addition, it is usually true that procedure calling
  161. is  usually  not  within  the  domain of the operating system.  [The
  162. Multics intersegment procedure  calling  mechanism  may  present  an
  163. exception  to  this,  until  linkage is complete.  In the remote PCP
  164. case, however, linkage  can  never  be  complete  in  the  sense  of
  165. supporting  a  fast transfer of control between modules].  Processes
  166. and communication paths between processes, however,  are  undeniably
  167. operating   system   constructs.   In  an  environment  where  local
  168. procedure calling was "cheap", it would be ill-advised to  blur  the
  169.  
  170.           A COMMENTARY on PROCEDURE CALLING         Page   4
  171.  
  172.  
  173.  
  174. distinction  between  a local (inexpensive in time and effort) and a
  175. remote procedure call, which obviously  requires  a  great  deal  of
  176. effort  by  the "PCP system", if not by the PCP user.  It also seems
  177. to  be  the  case  that  the  cost  of  blurring  the   local/remote
  178. distinction  at  the  procedure call level will be found in the more
  179. frequent use of a less efficient local procedure calling  mechanism.
  180. Interprocess communication, on the other hand, (at least with regard
  181. to stream or  message  oriented  channels  and  not  just  interrupt
  182. signals)   is  generally  regarded  as  having  a  significant  cost
  183. associated with it.   Message  sending  is  always  an  interprocess
  184. action,  and  requires  system intervention always.  There is not as
  185. substantial a difference between the IPC of local processes and  the
  186. IPC  of  remote  processes,  as  between  local and remote procedure
  187. calling.  PCP is suggestive of a model in which processes exist that
  188. span machine boundaries to provide inter-machine subroutine calling.
  189. Yet the PCP documentation has not advocated the notion of a  process
  190. that  spans  machine  boundaries,  and  rightfully  so  since such a
  191. creation would cause innumerable problems.  Since procedure  calling
  192. is more suitable as an intra-process notion, it seems to be a better
  193. idea to take the interprocess communication framework and extend  it
  194. to  have  a uniform interpretation locally and remotely, rather than
  195. to extend the procedure calling model.  It is  also  our  contention
  196. that  a  model  which relies on procedure calling for its basis does
  197. not take into account the special nature of the network environment,
  198. and  that  such  an  environment  can  be more suitably handled in a
  199. message passing model.  Furthermore, we feel that programming  as  a
  200. whole,  even  purely  local computing, will benefit from paying more
  201. attention to such areas as reliability and  robustness,  which  have
  202. been  brought to the forefront through experience with an oftentimes
  203. unreliable network and  collection  of  hosts.   An  IPC  model,  by
  204. emphasizing  the  connections  between  disjoint processes, seems to
  205. reinforce the idea that distributed  computing  is  accomplished  by
  206. joining  separate entities, and that defensive programming and error
  207. handling techniques are appropriate.  Since PCP is,  we  think,  for
  208. distributed  system  builders,  and  not  for  the end user (e.g. an
  209. RSEXEC user), avoiding  the  network,  interconnection  issues,  and
  210. relative  costs, may be counter-productive if the goal is to achieve
  211. usable network systems.
  212.  
  213.      In a similar vein, the entire notion of inter-machine procedure
  214. calling  underlies  a model which in effect has extended the address
  215. space of a single process.  That is, there  is  a  single  locus  of
  216. algorithm   control   (although   perhaps  not  a  single  locus  of
  217. execution).  While this model may well serve the needs of a  "local"
  218. computation  where  the  parts  are  strongly  bound  together,  our
  219. experience in building working distributed  systems  has  shown  the
  220. utility of a model which has multiple loci of control and execution.
  221. In such a model, it is through agreements on the method and type  of
  222. information  interchange  and synchronization, that a computation is
  223. carried out, rather than at the  singular  direction  of  a  central
  224. entity.   In  a model that has distributed control and execution, we
  225. feel a process will be in a better position to naturally  cope  with
  226. the many vagaries that necessarily arise in a network environment.
  227.  
  228.           A COMMENTARY on PROCEDURE CALLING         Page   5
  229.  
  230.  
  231.  
  232.      The  unmistakable  trend  in  systems  programming  is   toward
  233. inviolable    (protected)    process    structures   with   external
  234. synchronization as a means of coping with  complex  debugging  tasks
  235. and  the  difficulty of making system changes.  This trend is better
  236. supported, we feel, by a message passing rather  than  a  procedural
  237. model of computation.  Furthermore, we feel that network programming
  238. techniques should be applied to local computation, not the other way
  239. around.
  240.  
  241.  
  242. Some Particulars____ ___________
  243.  
  244.  
  245.      In the following list, we try to be more specific with  respect
  246. to  particular situations where we think the PCP concept may be weak
  247. as the basis for a network programming system.  For  some  of  these
  248. examples to be meaningful, the reader should be fairly familiar with
  249. the PCP documents issued as RFC 674.
  250.  
  251.        1.  Recovery  from  component  malfunction  may  be  very
  252.     difficult  to  handle  by  a process that is not the central
  253.     control (i.e.  a  process  which  is  being  manipulated  by
  254.     having  its  procedures  executed).   Is the situation where
  255.     there is network trouble, for example, to be  modeled  by  a
  256.     forced procedure call to some error recovery routine?  It is
  257.     precisely such situations where distributed  control  serves
  258.     as  a  better  model.   Consider  the  act of introducing an
  259.     inferior to another acquaintance and then supplying the  new
  260.     handle  as a parameter of a subsequent procedure call in the
  261.     inferior.  The inferior's blind  use  of  the  parameter  to
  262.     interact with the other process illustrates the manipulative
  263.     aspects of a superior.  The inferior never really  is  aware
  264.     of  a new communication path to a new process.  The inferior
  265.     environment (as maintained by the  PCP  "system")  has  been
  266.     changed  by the superior, with no active notification of the
  267.     inferior.  Certainly this makes user  coded  error  recovery
  268.     somewhat awkward.
  269.  
  270.        2.  Such process manipulation may at  times  violate  the
  271.     principles  of  modular programming.  In this vein, it seems
  272.     beneficial to be able to debug separately the  pieces  of  a
  273.     computation  and then worry only about their synchronization
  274.     to achieve a totally  debugged  system.   With  PCP  in  its
  275.     fullest sense, the danger of error propagation seems greater
  276.     because of the power of a process to cause execution  of  an
  277.     arbitrary  procedure  and  to  read/write remote data stores
  278.     without the active participation of the remote process.
  279.  
  280.        3.  Can we assume a proper initialization sequence if our
  281.     procedures   are  called  remotely?   Must  every  procedure
  282.     contain the code to check  for  the  propriety  and  correct
  283.     sequencing of the call? A model in which each remote process
  284.     is  an  active  computing  element  seems  better  able   to
  285.  
  286.           A COMMENTARY on PROCEDURE CALLING         Page   6
  287.  
  288.  
  289.  
  290.     conveniently apply protective standards to the code and data
  291.     it encompasses.
  292.  
  293.        4.  PCP doesn't model long term parallel  activity  in  a
  294.     convenient   fashion,  as  is  required  to  handle  various
  295.     asynchronous producer/consumer process  relationships.   The
  296.     synchronization  is  geared  more  to  a one-to-one call and
  297.     return, rather than to the asynchronous nature and  multiple
  298.     returns  for  a single request, as exhibited by many network
  299.     services.  In addition, low priority, preemptable background
  300.     tasks  are  hard  (impossible?) to model in a procedure call
  301.     environment.
  302.  
  303.        5.  Communication  paths  are  not  treated  as  abstract
  304.     objects  which are independent from the actual entities they
  305.     connect, and hence they cannot be utilized  in  some  useful
  306.     ways (e.g. to carry non PCP messages).  Also with respect to
  307.     treating communication paths as objects, there is no concept
  308.     of  passing  a  communication  path  to  an  inferior (or an
  309.     acquaintance), without having to create a  new  "connection"
  310.     (whether  or  not  this turns out to be a physical channel).
  311.     The ability to pass communication paths is often  useful  in
  312.     subcontracting  requests  to inferior processes.  To do this
  313.     within PCP requires the cooperation of the  calling  process
  314.     (i.e. to  use  the new connection handle), which again seems
  315.     to  violate  the  concepts  of  modular  programming.    The
  316.     alternative  approach  in  PCP is to have the superior relay
  317.     the subsequent communications to its created  inferior,  but
  318.     the  effort involved would probably prohibit the use of this
  319.     technique for subcontracting.
  320.  
  321.        6.  PCP seems too complicated to be used for the type  of
  322.     processing  which  requires  periodic but short (i.e.  a few
  323.     words  exchanged)  interactions.    An   example   of   such
  324.     interactions  is  the  way the TIP uses the TENEX accounting
  325.     servers (see RFC #672).  Furthermore, PCP is  probably  much
  326.     too  complex  for  implementation  on a small host.  In that
  327.     regard, there does not seem to be a definition of what might
  328.     constitute a minimum implementation for a host/process which
  329.     did/could not handle all of what has been developed.
  330.  
  331.        7.  In the PCP model, it may become awkward  or  resource
  332.     consuming  for  a service program to do such things as queue
  333.     operations for execution at a later time (persistence) or at
  334.     a  more opportune time (priority servicing mechanism).  Such
  335.     implementations may require dummy returns  and  modification
  336.     of   the   controlling   fork  concept,  or  maintenance  of
  337.     processing forks over long periods of inactivity.
  338.  
  339.        8.  It is not  always  true  that  a  process  connecting
  340.     (splicing)  to  a  service  should  be able to influence the
  341.     service process environment in any direct way.   How  can  a
  342.     service process in PCP prevent a malicious user fom splicing
  343.  
  344.           A COMMENTARY on PROCEDURE CALLING         Page   7
  345.  
  346.  
  347.  
  348.     to it and then introducing it  to  an  arbitrary  number  of
  349.     processes,  thereby  overflowing  the  table  space  in that
  350.     process.  All of that could  have  been  done  without  ever
  351.     executing  a  single instruction of user written code.  This
  352.     difficulty is a consequence of the PCP notion of having  one
  353.     process  manipulate  the  environment of another without its
  354.     active participation in such actions.
  355.  
  356.        9.   Doesn't  the  fact  that  the  network  PCP  process
  357.     implementation  is so much neater than the TENEX PCP process
  358.     implementation (since  TENEX  doesn't  have  a  general  IPC
  359.     facility)  suggest  that  message  passing and communication
  360.     facilities supported by the "system" provides a sound  basis
  361.     for  multi-process  implementations,  and  that perhaps such
  362.     facilities  should   be   primitively   available   to   the
  363.     distributed system builders who will use PCP?
  364.  
  365.        10.   There  is  a  question  of  whether   PCP   is   an
  366.     implementation virtual machine (language), or an application
  367.     virtual machine (language).  That is, is PCP intended to  be
  368.     used   to   implement   systems   which  manage  distributed
  369.     resources, or as an end  product  which  makes  the  network
  370.     resources  themselves  easier  to  use  for  the  every day,
  371.     ordinary  programmer  (e.g.   makes   the   network   itself
  372.     transparent  to  users).   One  gets  the  feeling  that the
  373.     designers had both goals, and that neither one is completely
  374.     satisfied.   If  the  former  goal is taken, we believe that
  375.     most of the  complexities  (e.g.   network  trouble,  broken
  376.     connections,   etc.)   and  possibilities  (e.g.   redundant
  377.     implementation,  broadcast   request,   etc.)   of   network
  378.     implementations  are  not  provided for adequately.  In this
  379.     view,  the  NSW  framework  (Works  manager,  FE)   is   the
  380.     distributed  system  that  utilizes  the  PCP implementation
  381.     language.  We do not see how the use of PCP in this  context
  382.     provides   for   either  an  extra-reliable  system  through
  383.     component redundancy,  or  a  persistent  system  which  can
  384.     tolerate  temporary malfunctions.  If one subscribes to this
  385.     view, then it doesn't seem right that the objects  that  run
  386.     under the created system (i.e.  the tools that run under the
  387.     PCP implemented Front End, Works Manager, and  TBH  monitor)
  388.     should  also  be  aware of or use PCP.  If one considers the
  389.     latter goal, that PCP implements a  virtual  machine  to  be
  390.     presented   to   all   programmers  for  making  distributed
  391.     resources easy to use, then it is clear that  PCP  with  its
  392.     manifest  concern  for  object location does not provide for
  393.     the desireable properties of network transparency.
  394.  
  395. Our conclusion is that procedure  calling  is  not  the  appropriate
  396. basis  for distributed multi-computer systems because it can neither
  397. directly nor accurately model  the  network  environment.   The  PCP
  398. virtual  programming  system may be inadequate for implementing many
  399. distributed  systems  because  the  complexities  and  possibilities
  400. unique to the network environment are not provided for at this basic
  401.  
  402.           A COMMENTARY on PROCEDURE CALLING         Page   8
  403.  
  404.  
  405.  
  406. level.