Consistency & Consensus for System Design Interview (4): implementing causality

SystemDesign
Tech Wrench
Published in
8 min readSep 3, 2023

--

PREV | HOME | NEXT | System Design Resource List

Don’t forget to get your copy of Designing Data Intensive Applications, the single most important book to read for system design interview prep!

Check out ByteByteGo’s popular System Design Interview Course

Consider signing-up for paid Medium account to access our curated content for system design resources.

Introduction

Causal consistency requires that a database maintains knowledge of which operations occur before a particular operation. In case of concurrent operations, all replicas of a database must process operations in the same order. If a replica finds a missing operation then the latter operations must wait until the missing operation has been processed. So the next question is how does a database determine if an operation by a client is causally related to a preceding operation? This can be answered by knowing what version of the database the client reads, since a client can only build-upon or depend upon what it has already read. However, tracking what each client reads across the entire database quickly becomes impractical. Also, it can’t be differentiated what part of the overall data that a client reads causally precedes a later write.

Grokking Modern System Design for Software Engineers and Managers

--

--