- Model question
Reliable client-server communication
Short answer
Reliable client-server communication handles lost requests and replies by timers, retransmission, and idempotent operations or sequence numbers. Server crash semantics are at-least-once, at-most-once, or exactly-once; client crashes are handled by extermination, reincarnation, gentle reincarnation, or expiration.
Explain reliable client-server communication.
Reliable client-server (RPC/RMI) communication deals with the following failures and how to tolerate them.
| Failure | Solution |
|---|---|
| Client cannot locate server | Return an exception to the client; use a name or binding service |
| Lost request message | Client timer; retransmit the request after time-out |
| Server crash | Depends on when it crashed (see below) |
| Lost reply message | Retransmit with idempotent operations or sequence numbers/duplicate filtering |
| Client crash | Orphan handling |
Server crash: the server may crash before executing the request or after executing it but before replying; the client cannot tell the two apart. Semantics:
- At-least-once: the client keeps retrying until a reply arrives; the operation may run more than once (fine for idempotent operations).
- At-most-once: the request is never repeated; if no reply, the client gets an error.
- Exactly-once: ideal, but cannot be guaranteed in general.
Client crash (orphans): a computation running without a parent client wastes resources and may hold locks. Solutions: extermination (log each call and kill orphans after reboot), reincarnation (broadcast a new epoch; old computations are killed), gentle reincarnation (kill only if the owner cannot be found), and expiration (each call gets a time quantum T; it is killed if not finished).
For TCP-type reliable communication (point-to-point), acknowledgements, sequence numbers and retransmission give reliable delivery; connection loss causes an exception which the application must handle.
✓ Answer checked by Claude Opus 5.5 (high effort)
Related questions
- Short note: Reliable group communication · Distributed System, chapter 9
- Triple modular redundancy; reliable C/S · Distributed System, chapter 9
- RPC and its communication semantics · Distributed System, chapter 2 · asked 3×
- Server before client; TCP reliability · Computer Networks and Security, chapter 5 · asked 2×
- Client-side versus server-side scripting · Web Technology, chapter 3 · asked 3×
- Short note: Client-Server and Master-Slave · Big Data Technologies, chapter 1
- Client/server architecture and FTP operation · Internet and Intranet, chapter 3