Professional Documents
Culture Documents
Remote Procedure Call (RPC) is a protocol that one program can use to request a service from a
details. RPC is used to call other processes on the remote systems like a local system.
A client has a request message that the RPC translates and sends to the server. This request may
be a procedure or a function call to a remote server. When the server receives the request, it
sends the required response back to the client. The client is blocked while the server is
processing the call and only resumed execution after the server is finished.
1. The client calls the client stub. The call is a local procedure call with parameters pushed
2. The client stub packs the procedure parameters into a message and makes a system call to
send the message. The packing of the procedure parameters is called marshalling.
3. The client's local OS sends the message from the client machine to the remote server
machine.
5. The server stub unpacks the parameters -- called unmarshalling -- from the message.
6. When the server procedure is finished, it returns to the server stub, which marshals the
return values into a message. The server stub then hands the message to the transport
layer.
7. The transport layer sends the resulting message back to the client transport layer, which
8. The client stub unmarshalls the return parameters, and execution returns to the caller.
When program statements that use the RPC framework are compiled into an executable program,
a stub is included in the compiled code that acts as the representative of the remote procedure
code. When the program is run and the procedure call is issued, the stub receives the request and
forwards it to a client runtime program in the local computer. The first time the client stub is
invoked, it contacts a name server to determine the transport address where the server resides.
The client runtime program has the knowledge of how to address the remote computer and server
application and sends the message across the network that requests the remote procedure.
Similarly, the server includes a runtime program and stub that interface with the remote
There are several RPC models and distributed computing implementations. A popular model and
(DCE).
RPC spans the transport layer and the application layer in the Open Systems Interconnection
(OSI) model of network communication. RPC makes it easier to develop an application that
When a remote procedure call is invoked, the calling environment is suspended, the procedure
parameters are transferred across the network to the environment where the procedure is to
When the procedure finishes, the results are transferred back to the calling environment, where
1. The normal method of operation where the client makes a call and doesn't continue until
2. The client makes a call and continues with its own processing. The server doesn't reply.
4. RPC clients have a broadcast facility, i.e., they can send messages to many servers and
5. The client makes a nonblocking client/server call; the server signals the call is completed
helps clients communicate with servers via the traditional use of procedure calls in high-
level languages;
The client and server use different execution environments for their respective routines,
and the use of resources -- e.g., files -- is also more complex. Consequently, RPC systems
RPC is only interaction-based, and as such, it doesn't offer any flexibility when it comes
to hardware architecture.
Examples of RPC
Remote file and database access is one of the earliest uses of RPC
2. Remote Graphics
An active monitoring program may call standard graphics primitive which are executed on a
remote workstation.
3. Remote software task management Load /Start/Control
RPC allows a coordinating computer to perform the management functions needed to setup and
a) Local call is processed by a server which hosts the program while remote procedure call
b) A local call is faster in nature where as a remote procedure call is slower in nature.
c) RPC is less reliable than a local call because RPC can fail due to network problem.
Phone: 0720780398
Email:pawngomeh@kibu.ac.ke