---
title: "Reliable client-server communication"
subject: "Distributed System"
chapter: 9
key: "semester_7/distributed_system:reliable-client-server"
source: https://www.bctengineer.com/q/semester_7/distributed_system/reliable-client-server
site: BCT Engineering
---

# Reliable client-server communication

Distributed System · Chapter 9: Fault Tolerance

- Asked in: Model question
- Video: [3.8 Reliable client server communication](https://www.youtube.com/watch?v=OrVF223HLuo) — OU Education
- Answer checked by Claude Opus 5.5 (high effort) on 2026-10-14
- Page: https://www.bctengineer.com/q/semester_7/distributed_system/reliable-client-server
- Whole chapter: https://www.bctengineer.com/md/semester_7/distributed_system/chapter-9

## Question

Explain 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.

## Answer

**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.

## Check yourself

The answer's key points as multiple-choice questions, with the correct option and why.

1. How is a lost request message handled?
   A. Client timer and retransmission after time-out
   B. Extermination
   C. Reincarnation
   D. Throw exception immediately
   Answer: A. The client's timer expires and the request is resent. (Key point: Lost request)

2. Which operations are safe under at-least-once semantics?
   A. Idempotent operations
   B. Money transfer
   C. Any operation
   D. Operations with side effects
   Answer: A. Repeated execution does no harm only if the operation is idempotent. (Key point: At-least-once)

3. Why are orphan computations a problem?
   A. They waste resources and may hold locks
   B. They cause lost replies
   C. They corrupt sequence numbers
   D. They stop the server
   Answer: A. A computation with no parent client wastes resources and may keep locks. (Key point: Orphans)

4. What does the expiration orphan solution do?
   A. Broadcasts a new epoch
   B. Logs each call and kills orphans after reboot
   C. Gives each call a time quantum T and kills it if unfinished
   D. Kills only if owner cannot be found
   Answer: C. Expiration limits how long a call may run. (Key point: Expiration)

## Related in Distributed System

- [Short note: Reliable group communication](https://www.bctengineer.com/question.md?key=semester_7%2Fdistributed_system%3Areliable-group-comm-note) — Distributed System, chapter 9
- [Triple modular redundancy; reliable C/S](https://www.bctengineer.com/question.md?key=semester_7%2Fdistributed_system%3Atmr-reliable-client-server) — Distributed System, chapter 9
- [RPC and its communication semantics](https://www.bctengineer.com/question.md?key=semester_7%2Fdistributed_system%3Arpc-semantics) — Distributed System, chapter 2, asked 3×

## Related in other subjects

- [Server before client; TCP reliability](https://www.bctengineer.com/question.md?key=semester_7%2Fcomputer_networks_and_security%3Atcp-server-before-client-reliability) — Computer Networks and Security, chapter 5, asked 2×
- [Client-side versus server-side scripting](https://www.bctengineer.com/question.md?key=semester_7%2Fweb_technology%3Aclient-vs-server-side-scripting) — Web Technology, chapter 3, asked 3×
- [Short note: Client-Server and Master-Slave](https://www.bctengineer.com/question.md?key=semester_8%2Fbig_data_technologies%3Ashort-note-client-server-master-slave) — Big Data Technologies, chapter 1
- [Client/server architecture and FTP operation](https://www.bctengineer.com/question.md?key=semester_8%2Finternet_and_intranet%3Aclient-server-ftp) — Internet and Intranet, chapter 3
