- Asked 3/15
- 2074 Chaitra · 2+6 marks
- 2071 Shrawan · 4 marks
- 2076 Asoj
RPC and its communication semantics
Short answer
RPC lets a program call a remote procedure as if it were local. Communication semantics include maybe (no retransmission, may execute 0 or 1 time), at-least-once (retransmit, may execute multiple times), and at-most-once (retransmit with duplicate filtering, executes once or not at all).
Define Remote Procedure Call (RPC). Describe various RPC communication semantics of client server communication in distributed system.
Definition
Remote Procedure Call (RPC) lets a program call a procedure that runs in another address space, normally on another computer, with the same syntax as a local call. The network communication is hidden from the programmer.
RPC communication semantics
When a client calls a remote procedure, the request or reply message may be lost, or the server may crash. RPC systems offer different call (invocation) semantics depending on how they use retransmission, duplicate filtering and re-execution.
| Semantics | Fault tolerance measures | Meaning |
|---|---|---|
| Maybe | No retransmission, no filtering | Procedure may be executed once or not at all; client cannot know |
| At-least-once | Retransmit request; no duplicate filtering; re-execute procedure | Executed one or more times; if the result arrives, it ran at least once. Suited for idempotent operations |
| At-most-once | Retransmit request, filter duplicates, retransmit stored reply | Either executed exactly once (result received), or not at all (exception). Used by most RPC/RMI systems |
| Exactly-once (ideal) | Needs fault-tolerant recovery of the server | Executed exactly once even with failures; hard to guarantee |
Details
- Maybe is used where occasional loss is tolerable (e.g. status updates).
- At-least-once is simple; repeating an operation such as "read block 5" is harmless (idempotent), but "deposit Rs 100" would be repeated. Sun RPC, used by NFS, provides this.
- At-most-once uses a request identifier; the server keeps a history of replies, so a retransmitted request gets the stored reply instead of being executed again. This is the usual choice in Java RMI and CORBA.
The failures these semantics must deal with are: lost request, lost reply, server crash before or after execution, and client crash (orphans).
✓ Answer checked by Claude Opus 5.5 (high effort)
Related questions
- Reliable client-server communication · Distributed System, chapter 9
- Distributed object, IDL; RPC vs RMI · Distributed System, chapter 2
- Object communication; RPC vs RMI · Distributed System, chapter 2
- Middleware importance; RPC operation · Distributed System, chapter 2
- Distributed objects and communication · Distributed System, chapter 2 · asked 2×
- Access transparency and modern RPC · Distributed System, chapter 2
- Client-server versus distributed object architecture · Software Engineering, chapter 3
- Client-side versus server-side scripting · Web Technology, chapter 3 · asked 3×
- Server before client; TCP reliability · Computer Networks and Security, chapter 5 · asked 2×
- Short note: Client-Server and Master-Slave · Big Data Technologies, chapter 1