Jump to content

Remote procedure call

From Wikipedia, the free encyclopedia

This is an old revision of this page, as edited by 98.209.136.197 (talk) at 18:13, 6 March 2010 (Undid revision 347739071 by Lakmiviji (talk) - removing poorly-written, misplaced, redundant paragraph). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

Remote procedure call (RPC) is an Inter-process communication technology that allows a computer program to cause a subroutine or procedure to execute in another address space (commonly on another computer on a shared network) without the programmer explicitly coding the details for this remote interaction. That is, the programmer would write essentially the same code whether the subroutine is local to the executing program, or remote. When the software in question is written using object-oriented principles, RPC may be referred to as remote invocation or remote method invocation.

Note that there are many different (often incompatible) technologies commonly used to accomplish this.

History and origins

The idea of RPC (Remote Procedure Call) goes back at least as far as 1976, when it was described in RFC 707. One of the first business uses of RPC was by Xerox under the name "Courier" in 1981. The first popular implementation of RPC on Unix was Sun's RPC (now called ONC RPC), used as the basis for Sun's NFS. ONC RPC is still widely used today on several platforms.

Another early Unix implementation was Apollo Computer's Network Computing System (NCS). NCS later was used as the foundation of DCE/RPC in the OSF's Distributed Computing Environment (DCE). A decade later Microsoft adopted DCE/RPC as the basis of their Microsoft RPC (MSRPC) mechanism, and implemented DCOM atop it. Around the same time (mid-90's), Xerox PARC's ILU, and the Object Management Group's CORBA, offered another RPC paradigm based on distributed objects with an inheritance mechanism.

Message passing

An RPC is initiated by the client sending a request message to a known remote server in order to execute a specified procedure using supplied parameters. A response is returned to the client where the application continues along with its process. There are many variations and subtleties in various implementations, resulting in a variety of different (incompatible) RPC protocols. While the server is processing the call, the client is blocked (it waits until the server has finished processing before resuming execution).

An important difference between remote procedure calls and local calls is that remote calls can fail because of unpredictable network problems. Also, callers generally must deal with such failures without knowing whether the remote procedure was actually invoked. Idempotent procedures (those which have no additional effects if called more than once) are easily handled, but enough difficulties remain that code which calls remote procedures is often confined to carefully written low-level subsystems.

Standard contact mechanisms

In order to allow servers to be accessed by differing clients, a number of standardized RPC systems have been created. Most of these use an interface description language (IDL) to allow various platforms to call the RPC.

The IDL files can then be used to generate code to interface between the client and server. The most common tool used for this is RPCGEN.

Other RPC analogues

RPC analogues found elsewhere:

  • Java's Java Remote Method Invocation (Java RMI) API provides similar functionality to standard UNIX RPC methods.
  • Modula-3's Network Objects, which were the basis for Java's RMI[1]
  • XML-RPC is an RPC protocol which uses XML to encode its calls and HTTP as a transport mechanism.
  • Microsoft .NET Remoting offers RPC facilities for distributed systems implemented on the Windows platform.
  • RPyC implements RPC mechanisms in Python, with support for asynchronous calls.
  • Etch (protocol) framework for building network services.
  • Facebook's Thrift protocol and framework.
  • CORBA provides remote procedure invocation through an intermediate layer called the "Object Request Broker"
  • DRb allows Ruby programs to communicate with each other on the same machine or over a network. DRb uses remote method invocation (RMI) to pass commands and data between processes.
  • AMF allows Flex applications to communicate with back-ends or other applications which support AMF.

Web services RPC

See also

References

Bruce Jay Nelson, Remote Procedure Call, PARC CSL-81-9 (Also CMU-CS-81-119), Xerox Palo Alto Research Center, Palo Alto, CA 94306, May 1981, other keywords: IPC, interprocess communication, Emissary, RPC, PhD thesis.


This article is based on material taken from the Free On-line Dictionary of Computing prior to 1 November 2008 and incorporated under the "relicensing" terms of the GFDL, version 1.3 or later.