Remote Procedure Call

Remote Procedure Call (RPC, literally " calling a remote procedure" ) is a technique for realizing inter-process communication. It allows calling functions in other address spaces. Normally, the functions called on another computer to run as the calling program. There are many implementations of this technique, usually they are not compatible with each other.

History and distribution

The basic idea of RPC was first published in 1976 by James E. White in RFC 707. One of the first implementations Xerox Courier, which is part of the Xerox Network Systems ( XNS ), and is also used in Novell Netware. The developer Andrew Birrell and Bruce Nelson received for the 1994 ACM Software System Award. The precise structure of RPC is described in RFC 1057 and RFC 5531.

The most common variant is the ONC RPC (Open Network Computing Remote Procedure Call), which is often referred to as Sun RPC. ONC RPC was originally developed by Sun Microsystems for the Network File System (NFS). For those RPC variant is found among other things, an implementation in Linux.

The implementation of the Distributed Computing Environment Remote Procedure Call ( DCE RPC) is also widespread. Microsoft launched Microsoft RPC ( MSRPC ) of the DCE RPC 1.1 reference implementation from. On this basis, DCOM was implemented later. The experience of DCOM flowed into. NET remoting.

Expiration

RPC is a way to implement a client-server model. The communication starts when the client sends a request to a known server and waits for the response. In the request, the client specifies the function to be performed and the parameters. The server processes the request and sends the response back to the client. After receiving the message, the client can continue its processing.

When using RPC, different error situations occur because of communication errors that need to be considered and processed.

Error semantics

RPC is generally based on UDP. Therefore, it is a connectionless communication. This has the advantage that no traffic overhead caused by Ack packets. However, the UDP packet size is not sufficient for large responses. It must therefore be assumed that two types of RPC protocols here: Request -Reply and Request - Reply- ACK. This is important, because each of these two protocols has other sources of error and thus a different error handling is necessary. In case of error no results, exactly one result or many results can be received depending on the implementation. This may include the following " error semantics " are selected on the client side: maybe, at- least -once, exactly -once and at- most-once.

If errors occur, can happen depending on the specified error semantics of the following:

(If no errors occur, all semantics guarantee a single execution of the procedure. )

However, a general rule: There can be no guarantee. For example, if a network node fails permanently in any case not a single design is possible.

Operation

To invoke an external procedure, a message from the client process to the server process must be sent. In this the procedure name ( or ID ) and the associated parameter values ​​must be included. The message should ultimately arrive at a server process that implements exactly this procedure ( this requires the server: register ( notice, provision of public access ), this requires the client: lookup and binding).

The search for an appropriate server can be realized by broadcast ( in a local network ) or by use of a directory service. ( The directory service keeps ready a globally available object, specifically a list of servers and they implement procedures. )

Search and coding, but also, for example, necessary recovery measures (error recoveries ) done on the client side, the client stub.

The most important component on the server side is the portmapper daemon which listens for ONC RPC on UDP and TCP port 111; DCE RPC takes over this function of Endpointmapper which UDP and TCP port 135 is listening on. Portmapper, respectively. Endpointmapper take over the coordination of the desired by the client function calls. Any program that wants to put on the server RPC services available, so it must know.

If the computer on which the server process is running, receives the request, it will create with the help of the portmapper either only the process that executes the procedure. Or alternatively, a process can only be activated (in this case, a predetermined number of processes kept ). Or else it is created a new thread.

Foreign hits

On Microsoft Windows, all settings of the remote procedure call can not be changed or disabled (see Windows, Services, % SystemRoot % \ system32 \ mmc.exe % SystemRoot % \ system32 \ services.msc / s).

663402
de