Question 4 of 11 · CIE-1 QB · Set 1 · 7 marks
Open in ChatGPTDifferentiate between Data-Centric Consistency Models and Client-Centric Consistency Models. Explain how replica management and consistency protocols help maintain consistency across replicas.
Introduction
Consistency models answer one question: what may a read return? Data-centric models constrain the store itself; client-centric models constrain what a single client sees, which matters when a mobile client connects to different replicas as it moves.
Data-centric models
- Strict: every read sees the last write everywhere.
- Sequential: one total order of operations that respects each client's program order.
- Causal: causally related writes are seen in the same order everywhere; concurrent writes may differ per replica.
- FIFO: writes by one process are seen in that process's order.
- Weak: consistency only after a synchronisation operation.
Client-centric models
- Monotonic reads: a client that has read a value never sees an older value on a later read.
- Monotonic writes: a client's writes are applied in the order the client issued them.
- Read-your-writes: after a client writes, its own subsequent reads see that write.
- Writes-follow-reads: a write after a read is applied on the same replica that served the read.
Comparison
| Point | Data-centric | Client-centric |
|---|---|---|
| Unit of guarantee | The whole data store | What one client observes |
| Typical use | Fixed servers, replicated databases | Mobile clients, many replicas |
| Scope | Global order | Per-client session |
| Example | Sequential consistency over a cluster | Monotonic reads on a phone moving between cells |
| Cost | Coordination across all replicas | State kept per client |
Replica management and consistency protocols
Replication places copies; the protocol keeps them close. Two decisions:
- Where to place a replica: near the readers, or on a permanent server set.
- How to propagate an update: a primary forwards the write, or a writer multicasts it (state machine replication), or the client sends it to all replicas.
Consistency protocols implement the chosen model:
| Protocol | Model |
|---|---|
| Primary-based, remote write | Sequential |
| Replicated write / active replication | Sequential if totally ordered |
| Cache-coherence protocol | FIFO or causal |
| Quorum-based (read R, write W, R + W > N) | Sequential |
Conclusion
Data-centric models describe the store and are enforced by the replicas' protocol; client-centric models are enforced per session and cost only the state of one client. A mobile application normally needs client-centric guarantees, and a replicated database needs data-centric ones.