Eventual consistency
Encyclopedia
Eventual consistency is one of the consistency model
Consistency model
In computer science, consistency models are used in distributed systems like distributed shared memory systems or distributed data stores . The system supports a given model, if operations on memory follow specific rules...

s used in the domain of parallel programming, for example in distributed shared memory
Distributed shared memory
Distributed Shared Memory , in Computer Architecture is a form of memory architecture where the memories can be addressed as one address space...

, distributed transactions, and optimistic replication
Optimistic replication
Optimistic replication is a strategy for replication in which replicas are allowed to diverge.Traditional pessimistic replication systems try to guarantee from the beginning that all of the replicas are identical to each other, as if there was only a single copy of the data all along...

, it means that given a sufficiently long period of time over which no changes are sent, all updates can be expected to propagate eventually through the system and all the replicas will be consistent. While some authors use that definition (e.g. Vogels), others prefer a stronger definition that requires good things to happen even in the presence of continuing updates, reconfigurations, or failures. In the Terry et al. work referenced above, eventual consistency means that for a given accepted update and a given replica, eventually, either the update reaches the replica, or the replica retires from service.

In database terminology, this is known as BASE (Basically Available, Soft state, Eventual consistency), as opposed to the database concept of ACID
ACID
In computer science, ACID is a set of properties that guarantee database transactions are processed reliably. In the context of databases, a single logical operation on the data is called a transaction...

.

Conflict resolution

As the consistency achieved is eventual, the conflicts have to be resolved. There are three types of resolution:
  • Read repair: The correction is done when a read finds an inconsistency. This slows down the read operation.
  • Write repair: The correction is done during a write operation, if an inconsistency has been found out, slowing down the write operation.
  • Asynchronous repair: The correction is not part of a read or write operation.


Concepts used for the conflict resolution are the client-specified timestamp
Timestamp
A timestamp is a sequence of characters, denoting the date or time at which a certain event occurred. A timestamp is the time at which an event is recorded by a computer, not the time of the event itself...

s and vector clocks.

Types

A number of different levels of consistency that can be reached. Apache Cassandra uses three levels:
  • ONE: Data is written after at least one node's commit table and memory table has been modified with the new data, and the node response has reached the client.
  • QUORUM: Data has to be written to < replication factor >/2 + 1 nodes before responding to the client.
  • ALL: All nodes have to read (write) the data.

See also

  • CAP theorem
    CAP theorem
    In theoretical computer science the CAP theorem, also known as Brewer's theorem, states that it is impossible for a distributed computer system to simultaneously provide all three of the following guarantees:...

  • Create, read, update and delete
  • Immediate consistency
    Immediate consistency
    Immediate consistency is one of the consistency models used in the domain of parallel programming, in contrast to eventual consistency. The term "immediate" refers not to updates not taking any time to perform, but simply to the fact that when an update operation returns to the user with a...

  • Optimistic replication
    Optimistic replication
    Optimistic replication is a strategy for replication in which replicas are allowed to diverge.Traditional pessimistic replication systems try to guarantee from the beginning that all of the replicas are identical to each other, as if there was only a single copy of the data all along...

The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK