RPC

4 min read


Hello Stackers, Remote Procedure Calls (RPC) RPC is a protocol that provides a communication mechanism between processes that allows a program to run on a computer without the feeling of code execution on a remote system. This is different from REST. 

https://book.systemsapproach.org/e2e/rpc.html

RPC assumes the existence of a low-level transport protocol, such as TCP or UDP, to carry message data in the communication of a program. The RPC protocol is built on top of the External Data Representation (XDR) protocol, which is the standard for data representation in remote communication. The XDR protocol changes the parameters and results of each RPC service provided. The RPC protocol allows users to work with remote procedures as well as they do with local procedures. 

RPC is defined using the routines contained in the RPC protocol. Each message from the call will be adjusted to the message return. The RPC protocol itself is actually a protocol for “forwarding messages” that implements other non-RPC protocols such as remote batching and broadcasting calls.

This protocol also supports callbacks and select subroutines on the server side. Client and server are computers or processes that access a service or resources from other processes or computers on a network. A server is a computer that provides services and resources and implements network services. 

Each service on the network is an arrangement of remote programs, and each remote program implements remote procedures. All procedures, their parameters, and their results are specifically documented on the protocol of a program. The Message RPC protocol is defined by using the External Data Representation (XDR) data description, which includes structure, enumeration, and union. 

This message protocol requires the following supporting factors: 

  1. Unique specifications for each call procedure 
  2. The appropriate message response for each requested message and client authentication for each service and vice versa RPC Message Protocol has two (2) different structures, namely call message and reply message. 

Each client that RPCs with a server on the network will receive a reply in the form of the result of the execution of the procedure. By using unique specifications for each remote procedure, RPC can match the reply message for each call message requested by the client.

Call Message Each call message in RPC contains unsigned integer values that are used to identify the remote procedure requested. These values are: 

  1. Version Number of the Program 
  2. Procedure Number Reply Message Reply messages sent by network servers vary depending on whether the call messages requested by the client are accepted or rejected.

Reply messages contain information that is used to distinguish the conditions requested according to the call messages. This information includes: 

  1. RPM executes call messages successfully. 
  2. The remote implementation does not conform to the protocol used. Lower or higher versions will be rejected. 
  3. Remote programs are not available on remote systems. 
  4. Remote programs do not support client-requested versions. 
  5. The requested procedure number does not exist. The features in RPC have the following features: batching calls, broadcasting calls, callback procedures, and using the select subroutine. 

Batching Calls The batching calls feature allows clients to send large numbers of message calls to the server in sequence. Batching uses byte-streaming protocols such as TCP/IP as the medium. When batching, the client does not wait for the server to reply to each message sent, nor does the server that never sends a message reply. This feature is widely used by clients because the RPC architecture is designed so that every call message sent by the client must have a process of waiting for a reply from the server. 

Therefore, the client must be able to overcome errors that may occur because the client will not receive a warning if an error occurs in the message sent. Broadcasting Calls The broadcasting feature allows clients to send data packets to the network and wait for a reply from the network. This feature uses a protocol based on data packets such as UDP or IP as the medium. Broadcast RPC requires the RPC port mapper service to implement its functionality. 

Callback Procedures The Callback Procedures feature allows the server to act as a client and perform RPC callbacks to processes executed by the client. Using the select subroutine feature will check the descriptions of a file and messages in the queue to see if they are ready to be read (received) or written (sent), or if they are in a temporarily held condition. This procedure allows the server to interrupt an activity, check its data, and then continue processing that activity.

RPC authentication The authentication process is the process used to identify servers and clients on RPC. For each remote procedure performed, the RPC protocol provides a slot that is used as an authentication parameter that functions so that the caller can provide its identity to the server. These authentication parameters are created in the client package.

Okay, That’s All folks, see you in the next post.

Bima Sena

Leave a Reply

Your email address will not be published. Required fields are marked *