CAP theorem is great, though it does omit latency. Which leads you to the logical extension, PACELC [1]:
If there is a network Partition you must choose Availability or Consistency, Else the tradeoff is Latency vs Consistency.
This offers practical intuition for certain design choices.
For example Google Spanner [2] is a distributed DB that offers globally consistent reads/writes, but to achieve high performance (low latency) nodes must synchronize with multiple extremely accurate reference clocks (GPS & atomic) and follow a complex two phase commit protocol that ensures transactional linearizability using lower bounds and uncertainty of timestamps.
As another example, your multicore CPU leverages a cache coherency protocol that faces remarkably similar tradeoffs. Perhaps others have made this connection before…it does feel like some sort of universal law of physics.
If there is a network Partition you must choose Availability or Consistency, Else the tradeoff is Latency vs Consistency.
This offers practical intuition for certain design choices.
For example Google Spanner [2] is a distributed DB that offers globally consistent reads/writes, but to achieve high performance (low latency) nodes must synchronize with multiple extremely accurate reference clocks (GPS & atomic) and follow a complex two phase commit protocol that ensures transactional linearizability using lower bounds and uncertainty of timestamps.
As another example, your multicore CPU leverages a cache coherency protocol that faces remarkably similar tradeoffs. Perhaps others have made this connection before…it does feel like some sort of universal law of physics.
[1] https://en.m.wikipedia.org/wiki/PACELC_theorem
[2] https://static.googleusercontent.com/media/research.google.c...