Remote Procedural Call

Remote Procedural Call

Introduction

Remote procedure calls allow a local computer (client) to remotely call procedures on a different computer (server). It is a software communication protocol, One program can use to request a service from a program located on another computer on a network without having to understand the network's details. Remote Procedure Call (RPC) provides a different paradigm for accessing network services. Instead of accessing remote services by sending and receiving messages, a client invokes services by making a local procedure call. The local procedure hides the details of the network communication.

Call on one computer/machine and Execution on Different computer/machine done for below reasons

  • Distributed computing
  • Increase in performance
  • Secure execution

RPC calls are synchronous operations, requiring the requesting program gets suspended until the result of the RPC call is returned from the callee.

Before understanding How RPC calls Works need to go through the below understandings.

What is a stub?

The stub is an auto-generated code, It creates a common interface between client and server, It is an abstracted layer for client and server, Which takes care of packing and unpacking of messages, also transmission and reception of the message to the next Layer. Stub in also takes care of converting parameters passed between client and server during a remote procedure call (RPC). The client and server may also use different data representations, even for simple parameters (e.g., big-endian versus little-endian for integers). Stubs perform the conversion of the parameters, so a remote procedure call looks like a local function call for the remote computer.


The interface definition language (IDL)

IDL provides a bridge between the machines at either end of the link that may be using different operating systems and computer languages. Stub code generation IDL file feed to the compiler which will generate stub shared libraries. The IDL language is used to describe a software component's API interface between client and server (application programming interface).

This technique is most commonly used in Remote Procedure Call software. An interface definition has information to indicate whether each argument is input, output, or both. Only input arguments need to be copied from client to server and only output elements need to be copied from server to client.

No alt text provided for this image

Advantages of using RPC

  1. RPC Provides a good level of abstraction, for ex. the message-passing nature of network communication is hidden from the user. RPC stack is helpful in distributed computing
  2. RPC stack most of the code parts are portable, it allows easy up-gradation and changes
  3. RPC enables the usage of the applications in the distributed environment, not only in the local environment
  4. Process-oriented and thread oriented models supported by RPC

Disadvantages of RPC

1.?????RPC systems aren't always suited for transferring large amounts of data

2.?????RPC is vulnerable to failure because it involves a communication system, another machine, and another process

3.?????The main goal of RPC is to hide the existence of the network from a program. As a result, RPC doesn't quite fit into the OSI model: Call-by-reference is not possible, and the client and server don't share an address space. (This point is no more valid when client and server are sharing the same address space, In the case of distributed computing it is the case)

4.??????RPC calls are synchronous calls, As an exception handling call Time out needs to define

5.?????It is difficult to define timeout and raise an exception or report failure to the client because every call takes diff amount of time


Shwetank Kishor Ambast

Teacher of Physics at Sant Atulanand Convent School, Varanasi

2 年

Impressive

Ajay Velappan Maharajan

System Architect |Product development Lead|Connected Car|Infotainment|OTA|SDV|PSPO certified|People enabler| Aspiring Impactful Leader|Cricket enthusiast

2 年

Thanks for sharing Vinit.

要查看或添加评论,请登录

Vinit ..的更多文章

  • Cache

    Cache

    Introduction Memory is an Important resource in all embedded systems, any program executing on the core will be needing…

  • How does Linker Works???

    How does Linker Works???

    We know the general compiler steps, which the compiler follows for the generation of the executable file. Code -->…

    2 条评论
  • Security Attacks by Buffer overflows

    Security Attacks by Buffer overflows

    Introduction Buffer is a chunk of contiguous memory which is used to store some data. Buffers are used for data…

    2 条评论
  • Virtual function/class, Where? Why? & How?

    Virtual function/class, Where? Why? & How?

    There is no doubt object-oriented languages are becoming the base for the creation of a new software stack. In this…

    1 条评论
  • CPU Isolation & CPU affinity In Linux

    CPU Isolation & CPU affinity In Linux

    In Multi-processor architecture processors is directly get compared with processing power. Common notion is more…

    13 条评论
  • Kernel Module Debugging Techniques

    Kernel Module Debugging Techniques

    There are several Debugging Techniques, few efficient Debugging techniques are listed Below. For kernel Module…

    4 条评论
  • Debugging With GDB

    Debugging With GDB

    GNU GDB Debugger No programmer is perfect, some of them do logical mistakes so some to syntactical. Syntax error can be…

    1 条评论
  • "Inline" Function and It's Use

    "Inline" Function and It's Use

    "Inline" Function is a provision or feature provided by the compiler. Inline is a request made to the compiler to…

  • Which Programming Language to learn???

    Which Programming Language to learn???

    Which Programming Language to learn???? it is always a big question for new learners or beginners. should it be C, C++,…

社区洞察

其他会员也浏览了