PreviousNext

DCE Remote Procedure Call

A distributed application based on the client/server model consists of two parts: the client side of the application, which runs on one machine and makes a request for service on behalf of a user, and the server side of the application, which runs on another machine on the network and fulfills the service request. The two pieces of code on two different machines need to be able to communicate across the network. One model for implementing communications between the client and server of an application is the remote procedure call (RPC).

RPC gives programmers the ability to express an interaction between the client and server of a distributed application as if it were a procedure call: the programmer defines a calling interface and a procedure that implements it, makes a call to the procedure along with any arguments, and receives a return value through the argument list or as the procedure result.

In RPC, as in a traditional local procedure call, control is passed from one code segment to another, and then returns to the original segment. However, in a local procedure call, the code segments are in the same address space on the same machine; whereas in a remote procedure call, the called procedure runs in a different address space, usually on a different machine than the calling procedure. As a result, arguments and results are passed differently for local and remote procedure calls. In local procedure calls, arguments and return values can be passed on the process's stack. In remote procedure calls, arguments and return values must be packed up into messages and sent to the peer machine over the network. The underlying RPC mechanism makes this look like a procedure call to the programmer.

An RPC facility shields the application programmer from the details of network communications between client and server nodes, such as:

· Fragmentation and reassembly of messages

· Handling different data formats (such as byte ordering) between different machines

· Using a directory service to find message recipients

· Using security services to ensure secure communications

Programmers using RPC do not need to rewrite applications in order to port them to different architectures, operating systems, communications protocols, or languages. RPC provides a high level programming model to the distributed application programmer, hiding communications details, and removing nonportable system and hardware dependencies.

The following topics give an overview of the DCE Remote Procedure Call technology component. They describe the components that comprise the technology, and how DCE RPC is seen from the end user's, programmer's, and administrator's perspective, focusing primarily on programming with RPC, since the application programmer is the main consumer of this technology. The topics also describe the steps involved in the execution of a remote procedure call. They describe the ways in which DCE RPC frees the programmer from system software and hardware dependencies, and then list additional sources of information on DCE RPC.

More:

What Is DCE RPC?

End User's Perspective

Programming with DCE RPC

DCE RPC Administration

How an RPC Call Works

System Independence

Additional Information on DCE RPC