0
21kviews
Explain RPC Implementation Mechanism
1 Answer
0
1.2kviews
  • RPC mechanism uses the concepts of stubs to achieve the goal of semantic transparency.
  • Stubs provide a local procedure call abstraction by concealing the underlying RPC mechanism.
  • A separate stub procedure is associated with both the client and server processes.
  • RPC communication package known as RPC Runtime is used on both the sides to hide existence and functionalities of a network.
  • Thus implementation of RPC involves the five elements of program:
    1. Client
    2. Client Stub
    3. RPC Runtime
    4. Server stub
    5. Server

The client, the client stub, and one instance of RPC Run time execute on the client machine.

The server, the server stub, and one instance of RPC Run time execute on the server machine.

Remote services are accessed by the user by making ordinary LPC.

enter image description here

1. Client

  • A Client is a user process which initiates a RPC
  • The client makes a normal call that will invoke a corresponding procedure in the client stub.

2. Client Stub

Client stub is responsible for the following two tasks:

i. On receipt of a call request from the client, it packs specifications of the target procedure and arguments into a message and asks the local RPCRuntime to send it to the server stub.

ii. On receipt of the result of procedure execution, it unpacks the result and passes it to the client.

3. RPCRuntime

  • Transmission of messages between Client and the server machine across the network is handled by RPCRuntime.
  • It performs Retransmission, Acknowledgement, Routing and Encryption.
  • RPCRuntime on Client machine receives messages containing result of procedure execution from server and sends it client stub as well as the RPCRuntime on server machine receives the same message from server stub and passes it to client machine.
  • It also receives call request messages from client machine and sends it to server stub.

4. Server Stub

Server stub is similar to client stub and is responsible for the following two tasks:

i. On receipt of a call request message from the local RPCRuntime, it unpacks and makes a normal call to invoke the required procedure in the server.

ii. On receipt of the result of procedure execution from the server, it unpacks the result into a message and then asks the local RPCRuntime to send it to the client stub.

5. Server

When a call request is received from the server stub, the server executes the required procedure and returns the result to the server stub.

Please log in to add an answer.