Need a layman's example of Linearizable Consistency model

  • Thread starter user366312
  • Start date

user366312

Gold Member
62
2
Summary
Distributed Systems: Replication & Consistency.
As far as I understand,

Linearizable Consistency model is a Data-centric and Strong consistency model:

Data-centric means:
  1. All clients experience the consistency
  2. All clients access the same data store
  3. All clients experience the same ordering
  4. Non-mobile clients. I.e. replica used doesn’t change. I.e. replicas are not affected by synchronization delays.
Strong means:
  1. Operations on shared data are synchronized
this link has a good and easy to follow example. But, I a confused about one thing.

In the first image, he is showing only one data-store:
242653


But, in the second image, he is showing two data stores:
242654


Why is that?

Isn't it possible to show the example with only one data-store in the second case?
 
Last edited by a moderator:
32,344
4,130
Isn't it possible to show the example with only one data-store in the second case?
No, because the author of the post you quoted makes a distinction between a scenario with linearizability (the first figure) and one without linearizability (the second figure).
From the stackoverflow topic you quoted, referring figure with the Follower datastore:
This time, we don’t have a single registry or a single source of truth. Our system uses asynchronous database replication, and we have a Primary node that takes both reads and writes and a Follower node used for read operations only.​
Because replication happens asynchronously, there’s a lag between the Primary node row modification and the time when the Follower applies the same change.​
One database connection changes the account balance from 50 to 10 and commits the transaction. Right after, a second transaction reads from the Follower node, but since replication did not apply the balance modification, the value of 50 is read.​
Therefore, this system is not linearizable since changes don’t appear to happen instantaneously. In order to make this system linearizable, we need to use synchronous replication, and the Primary node UPDATE operation will not complete until the Follower node also applies the same modification.​
 

Want to reply to this thread?

"Need a layman's example of Linearizable Consistency model" You must log in or register to reply here.

Physics Forums Values

We Value Quality
• Topics based on mainstream science
• Proper English grammar and spelling
We Value Civility
• Positive and compassionate attitudes
• Patience while debating
We Value Productivity
• Disciplined to remain on-topic
• Recognition of own weaknesses
• Solo and co-op problem solving
Top