Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

RPC (remote procedure call) process

Tags:

networking

I have read about RPC(remote procedure call), but still i am not very much clear about this. Can anybody explain it in very easy way by giving a simple and suitable/understandable example ?

like image 697
Lalit patidar Avatar asked Apr 03 '18 11:04

Lalit patidar


Video Answer


1 Answers

Remote Procedure Call (RPC) is a protocol that one program can use to request a service from a program located in another computer on a network without having to understand the network's details. A procedure call is also sometimes known as a function call or a subroutine call.

RPC uses the client-server model. The requesting program is a client and the service providing program is the server. Like a regular or local procedure call, an RPC is a synchronous operation requiring the requesting program to be suspended until the results of the remote procedure are returned. However, the use of lightweight processes or threads that share the same address space allows multiple RPCs to be performed concurrently.

When program statements that use 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.

enter image description here

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 procedure itself. Response-request protocols are returned the same way.

Just google RPC and you can get many resources regarding it.

like image 115
Karthik Venkatraman Avatar answered Sep 30 '22 22:09

Karthik Venkatraman