See an example first :
In the above graph,
This is not linearizability
This is what we want for fully linearizability :
Once the x = 1 is read, all its following read must return 1 even the write hasn't complete.
Another example with compare and set
Compare and set means a write compare what it knows the original value , if successes the write new value
cas
failed due to old value is not 0 (it's 2)cas
), so older value cannot be returned in the linearizable system Linearizable vs serializable
Application areas
Channel -> you have a stale query and new result needs a new channel
You have a website where users can upload a photo, a background process resize the photos to lower resolution for faster download(thumbnails)
The image resizes needs to be explicitly instructed to performa a resizing job.
If the file storage service is not linearizable, there is a risk of race condition: the message queen might be faster than the internal replication inside the storage service
Two different channels -> file storage and message queue
Strict quorum may have lineaerizable in a Dynamo0style model -> why may -> network delays
It can be linearizable with performance reducing: a reader must performa a read repair synchronously , before returning the result to the application , and a writer must read the latest state of a quorum of nodes before sending it's writes.