Comments (2)
In strong consistency, what do you mean by x<y
?
What would be a good running example to show the difference of all 4 models here?
from josehu07.github.io.
In strong consistency, what do you mean by
x < y
?
It means operation x
is ordered before operation y
. In the examples, I used characters a ~ h
to name operations and used x
to name a global variable, which might be a bit confusing. Say a < b
, it means operation a
is ordered before operation b
.
What would be a good running example to show the difference of all 4 models here?
The 4 examples shown in figures should be sufficient to demonstrate the differences. Basically,
- Strong consistency (linearizability) means all nodes agree on the same global ordering of operations AND operations must respect the real-time property: if a read starts later (in terms of physical real-world time) after the finish of a write, it must see the effect of that write. In the example of 1),
c
must read out 1 because it starts after the ack ofa
; similarly ford
afterb
. This is the common notion of "consistency". - Sequential consistency means all nodes agree on the same global ordering, but that ordering might not respect the real-time property. In the example of 2),
d
actually starts after the ack ofb
but all nodes agree on an ordering thatd
happens beforeb
, hence reading out 1. This could happen when a system acks a write earlier than the write has been accepted by a majority. - Causal consistency means that nodes do not have to agree on the same global ordering. But for each node (or said client thread) itself, the ordering of operations issued by itself must be maintained in the final ordering of all operations it thinks. In other words, the final ordering of all ops it agrees on should be the original ordering of its own operations interleaved with other nodes' operations. This could happen when a system acks a write as soon as the local state has been changed and say a read just reads the local state.
- Eventual consistency means that even the operations issued by a single client thread can end up out-of-order -- even if a client thread issues and completes a Wx2 followed by a Rx, it could read out 1. This could happen when a system implements writes entirely async and acks a write immediately, say even earlier than the local state has been changed.
I will update the wording of the post a bit to try to state the differences clearer.
from josehu07.github.io.
Related Issues (9)
- index HOT 8
- memo/2020/02/10/macos-dev-environment HOT 1
- technical/2019/09/03/rust-lang HOT 3
- personal/2020/06/17/pc-building HOT 2
- technical/2021/05/31/locking-techniques HOT 1
- technical/2020/06/13/write-buffering-lsm-tree HOT 2
- memo/2021/01/02/linux-kernel-build-debug HOT 12
- technical/2020/06/10/cpu-side-channel HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from josehu07.github.io.