2
27kviews
Write a short note on call semantics of RPC.
1 Answer
3
1.4kviews
  • In RPC the caller and callee processes can be situated on different nodes. The normal functioning of an RPC may get disrupted due to one or more reasons mentioned below:

i. Call message is lost or response message is lost

ii. The callee node crashes and is restarted

iii. The caller node crashes and is restarted.

  • In RPC system the call semantics determines how often the remote procedure may be executed under fault conditions. The different types of RPC call semantics are as follows:

a. May-Be Call Semantics

  • This is the weakest semantics in which a timeout mechanism is used that prevents the caller from waiting indefinitely for a response from the callee.
  • This means that the caller waits until a pre-determined timeout period and then continues to execute.
  • Hence this semantics does not guarantee the receipt of call message nor the execution. This semantics is applicable where the response message is less important and applications that operate within a local network with successful transmission of messages.

b. Last-Once Call Semantics

  • This call semantics uses the idea of retransmitting the call message based on timeouts until the caller receives a response.
  • The call, execution and result of will keep repeating until the result of procedure execution is received by the caller.
  • The results of the last executed call are used by the caller, hence it known as last-one semantics.
  • Last one semantics can be easily achieved only when two nodes are involved in the RPC, but it is tricky to implement it for nested RPCs and cases by orphan calls.

c. Last-of-Many Call Semantics

  • This semantics neglects orphan calls unlike last-once call semantics. Orphan call is one whose caller has expired due to node crash.
  • To identify each call, unique call identifiers are used which to neglect orphan calls.
  • When a call is repeated, it is assigned to a new call identifier and each response message has a corresponding call identifier.
  • A response is accepted only if the call identifier associated with it matches the identifier of the most recent call else it is ignored.

d. At-Least-Once Call Semantics

  • This semantics guarantees that the call is executed one or more times but does not specify which results are returned to the caller.
  • It can be implemented using timeout based retransmission without considering the orphan calls.

e. Exactly-Once Call Semantics

  • This is the strongest and the most desirable call semantics. It eliminates the possibility of a procedure being executed more than once irrespective of the number of retransmitted call.
  • The implementation of exactly-once call semantics is based on the use of timeouts, retransmission, call identifiers with the same identifier for repeated calls and a reply cache associated with the callee.
Please log in to add an answer.