System Design Interview — an Insider’s Guide
Here, have some highlights:
Highlights
If W + R > N, strong consistency is guaranteed (Usually N = 3, W = R = 2).
Using vector clocks, it is easy to tell that a version X is an ancestor (i.e. no conflict) of version Y if the version counters for each participant in the vector clock of Y is greater than or equal to the ones in version X.
Similarly, you can tell that a version X is a sibling (i.e., a conflict exists) of Y if there is any participant in Y’s vector clock who has a counter that is less than its corresponding counter in X.
Process finished with exit code 0