0
votes

I am confused by the term "Consistency". It's been used in many different context, i.e Distributed System, Memory Model and Database. People/Wikipedia summarize all different Consistency Model in the same page. But I don't really think that they are used to describe the same problem.

For example, Sequential/Relax/Weak/Strict/Processor consistency, etc make sense in Memory model(provided by modern architecture & modern language compiler). On the other hand, Sequential/Eventually Consistency make sense in Distributed System (When you try to build replicate state machine). Paxos/raft like consensus algorithm help you build SC model and DynamoDB is an example of EC model.

However, it really doesn't make sense to talk about release/weak consistency when you build replicated logs as well as talking about eventual consistency in Memory model.

As far as traditional Relation Database, it confuses me even more. Since in ACID model, the Consistency seems to mean a different concept. It only requires after the transaction, the database should be in a valid/consistent state. However, the isolation part of ACID sounds more like Consistency Model, in particular, the Sequential consistency model.

Do I misunderstand anything here? Or Computer people are just enjoying abusing terminology and confusing people...

Please correct me if I'm wrong even if it's just minor detail. I really want to understand the concepts correctly. Thanks you : )

1
Don't confuse Dynamo and DynamoDB, the former is an example of EC model (see the "Dynamo: Amazon’s Highly Available Key-value Store" paper), the latter is a SC solution which uses a similar name.rystsov
@rystsov Thanks for pointing that outOliver Young

1 Answers

0
votes

In all three contextes, consistency really boils down to memory visibility.

Processor and compiler can only reorder memory so far that the memory model stipulates that it must guarantee the memory are visible to the world at defined points in the program.

In distributed system, every read should receive the most recent write to be considered consistent. I.e. the write must be visible to subsequent read.

Database must be able to see all the memory effect prior the action to be performed to make a valid state transition.