Clocks — It’s not that simple!
Yes, I know you don’t agree with me! Clocks are simple! Clocks are designed for measuring time & we know very well how to interpret them.
But, before going into this article, I’d advise you to go through the following articles to get the complete context.
- Consistency & Consistency Levels
- Consistency Models — Strong Consistency Models
- Consistency Models — Session & Eventual Consistency Models
- Consistency & Consistency Levels — Tuning Consistency Levels
In this series(Yes, this is a series as well because Clocks ain’t simple), we will talk about the different types of Clocks, how our computers & other devices can tell time and the challenges associated with tracking time in a distributed context & their solutions.
We’ve already seen in our consistency series that to establish strong consistency models, we need to establish an ordering between our operations, either total ordering or causal/partial ordering. But establishing ordering across distributed systems isn’t straightforward and that’s where we leverage clocks.
Let’s also think about use cases where we need ordering -
- Distributed Data Stores for consistency reasons as already discussed.
- Event-Driven Systems where any event can trigger a series of ordered calls to different services.
- Business flows like placing an order on any website. There is an…