Lably
Skip to content

Consistency model

Rules that guarantee predictable computer memory operation

  • 30 min read
  • 9 chapters

Related on Lably

Through Computer science, Distributed computing and File system

High level languages, such as C++ and Java, maintain the consistency contract by translating memory operations into low-level operations in a way that preserves memory semantics, reordering some memory instructions, and encapsulating required synchronization with library calls such as pthread_mutex_lock().

Example

Assume that the following case occurs:

  • The row X is replicated on nodes M and N
  • The client A writes row X to node M
  • After a period of time t, client B reads row X from node N

The consistency model determines whether client B will definitely see the write performed by client A, will definitely not, or cannot depend on seeing the write.

Sign in to keep reading

8 more chapters are free with a Lably account.

More in Computing and communication