Remote Procedure Call
Remote Procedure Call
Remote Procedure Call
Distributed System
ByLawrence WilliamsUpdatedJanuary 31, 2023
What is RPC?
Remote Procedure Call (RPC) is an interprocess communication technique. The
Full form of RPC is Remote Procedure Call. It is used for client-server applications.
RPC mechanisms are used when a computer program causes a procedure or
subroutine to execute in a different address space, which is coded as a normal
procedure call without the programmer specifically coding the details for the
remote interaction.
This procedure call also manages low-level transport protocol, such as User
Datagram Protocol, Transmission Control Protocol/Internet Protocol etc. It is used
for carrying the message data between programs.
In this operating system tutorial, you will learn:
What is RPC?
Types of RPC
RPC Architecture
How PRC Works?
Characteristics of RPC
Features of RPC
Advantages of RPC
Disadvantages of Remote Procedure Call
Types of RPC
Three types of RPC are:
Callback RPC
Broadcast RPC
Batch-mode RPC
Callback RPC
This type of RPC enables a P2P paradigm between participating processes. It helps
a process to be both client and server services.
Broadcast RPC
Broadcast RPC is a client’s request, that is broadcast on the network, processed by
all servers which have the method for processing that request.
Batch-mode RPC
Batch-mode RPC helps to queue, separate RPC requests, in a transmission buffer,
on the client-side, and then send them on a network in one batch to the server.
RPC Architecture
RPC architecture has mainly five components of the program:
1. Client
2. Client Stub
3. RPC Runtime
4. Server Stub
5. Server
RPC Architecture
Step 1) The client, the client stub, and one instance of RPC run time execute on the
client machine.
Step 2) A client starts a client stub process by passing parameters in the usual way.
The client stub stores within the client’s own address space. It also asks the local
RPC Runtime to send back to the server stub.
Step 3) In this stage, RPC accessed by the user by making regular Local Procedural
Cal. RPC Runtime manages the transmission of messages between the network
across client and server. It also performs the job of retransmission,
acknowledgment, routing, and encryption.
Step 4) After completing the server procedure, it returns to the server stub, which
packs (marshalls) the return values into a message. The server stub then sends a
message back to the transport layer.
Step 5) In this step, the transport layer sends back the result message to the client
transport layer, which returns back a message to the client stub.
Step 6) In this stage, the client stub demarshalls (unpack) the return parameters, in
the resulting packet, and the execution process returns to the caller.
Characteristics of RPC
Here are the essential characteristics of RPC:
Features of RPC
Here are the important features of RPC:
Simple call syntax
Offers known semantics
Provide a well-defined interface
It can communicate between processes on the same or different machines
Advantages of RPC
Here are Pros/benefits of RPC:
Disadvantages of RPC
Here are the cons/drawbacks of using RPC:
Summary
A remote procedure call is an interprocess communication technique.
Three types of RPC are 1) Callback RPC 2)Broadcast RPC, and 3) Batch-mode
RPC
RPC architecture has mainly five components of the program: 1) Client 2)
Client Stub 3)RPC Runtime 4) Server Stub, and 5) Server
In RPC method the processes do not share address space
RPC offers simple call syntax and known semantics
RPC method helps clients to communicate with servers by the conventional
use of procedure calls in high-level languages.
The biggest drawback of RPC method is that it is highly vulnerable to failure
as it involves a communication system, another machine, and another
process.