Need a layman's example of Linearizable Consistency model

  • Thread starter Thread starter user366312
  • Start date Start date
  • Tags Tags
    Example Model
AI Thread Summary
Linearizable consistency is a strong, data-centric model ensuring that all clients experience the same data and ordering when accessing a shared data store. This model requires that operations on shared data are synchronized, meaning all clients see the same updates at the same time. The discussion highlights confusion regarding the representation of linearizability in examples. The first example illustrates a single data store scenario, while the second involves two data stores, emphasizing the difference between linearizable and non-linearizable systems. In the second case, asynchronous database replication is used, where a Primary node handles both reads and writes, and a Follower node is designated for read operations only. This setup can lead to inconsistencies, as changes made on the Primary may not be immediately reflected on the Follower due to replication lag. To achieve linearizability in such a system, synchronous replication is necessary, ensuring that updates are only considered complete once all replicas have applied the changes.
user366312
Gold Member
Messages
88
Reaction score
3
TL;DR 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:
Technology news on Phys.org
user366312 said:
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.​
 
Thread 'Is this public key encryption?'
I've tried to intuit public key encryption but never quite managed. But this seems to wrap it up in a bow. This seems to be a very elegant way of transmitting a message publicly that only the sender and receiver can decipher. Is this how PKE works? No, it cant be. In the above case, the requester knows the target's "secret" key - because they have his ID, and therefore knows his birthdate.
I tried a web search "the loss of programming ", and found an article saying that all aspects of writing, developing, and testing software programs will one day all be handled through artificial intelligence. One must wonder then, who is responsible. WHO is responsible for any problems, bugs, deficiencies, or whatever malfunctions which the programs make their users endure? Things may work wrong however the "wrong" happens. AI needs to fix the problems for the users. Any way to...
Back
Top