4

About coherence vs consistency, https://en.wikipedia.org/wiki/Consistency_model says

Coherence deals with maintaining a global order in which writes to a single location or single variable are seen by all processors.

Consistency deals with the ordering of operations to multiple locations with respect to all processors.

That reminds me of isolation in ACID in database systems vs consistency, from Design Data Intensive Applications:

Isolation

Most databases are accessed by several clients at the same time. That is no problem if they are reading and writing different parts of the database, but if they are accessing the same database records, you can run into concurrency problems (race conditions). Isolation in the sense of ACID means that concurrently executing transactions are isolated from each other: they cannot step on each other’s toes. The classic database textbooks formalize isolation as serializability, which means that each transaction can pretend that it is the only transaction running on the entire database. The database ensures that when the transactions have committed, the result is the same as if they had run serially (one after another), even though in reality they may have run concurrently.

Consistency Guarantees

There is some similarity between distributed consistency models and the hierarchy of transaction isolation levels we discussed previously [4, 5] (see “Weak Isolation Levels” on page 233). But while there is some overlap, they are mostly independent concerns: transaction isolation is primarily about avoiding race conditions due to concurrently executing transactions, whereas distributed consistency is mostly about coordinating the state of replicas in the face of delays and faults.

Is it correct that

  • The two discuss the same meaning of consistency?

  • Coherence in the first and isolation in the second mean the same?

Thanks.

lennon310
  • 3,242
Tim
  • 5,545

2 Answers2

1

I don't think they are related. Isolation focuses on preventing undesired interaction while coherence is about almost the opposite: making sense together, creating a bigger meaning in conjunction with each other.

So if you want to see a similarity between isolation and something else I would say you would come closer with something like integrity or synchronization.

Martin Maat
  • 18,652
0

Coherence in ACID is mostly about preserving referential integrity.

Keep in mind that ACID is very poor. Serializable is really terribly useless. It defines that the system needs to behave as if the transactions are executed in some sequential order. So transactions don't need to preserve any real time order. Even the order of transactions issued by a single 'process' don't need to be preserved. So the following system is SERIALIZABLE:

thread1: tx1:start
thread1: tx1:A=1
thread1: tx1:commit
thread1: tx2:start
thread1: tx2:r=A
thread1: tx2:commit

Then it is allowed that transaction tx2 is skewed before tx1. And hence a thread doesn't need to observe a write made by an earlier transaction.

pveentjer
  • 121