Consistency Models (L8) Flashcards

(23 cards)

1
Q

What is the main goal of Consistency Models?

A

To study different consistency models for replica management.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is the CAP theorem?

A

The CAP theorem states that a distributed system can only pick two out of three properties: (C)onsistency, (A)vailability, and (P)artition tolerance. In practice, since network faults (Partition tolerance) are a given, the choice is often between strong consistency and availability.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Define ‘Consistency’ (C) in the context of the CAP theorem.

A

Every read receives the latest write or an error. All clients have the same view of the data.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Define ‘Availability’ (A) in the context of the CAP theorem.

A

Every request gets a response, even if it’s not the latest data. All clients can read and write.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Define ‘Partition tolerance’ (P) in the context of the CAP theorem.

A

The system continues to function despite network failures (parts of the system become disconnected).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What are the main categories of consistency models discussed in the lecture?

A
  • Data-centric consistency models
  • Client-centric consistency models
  • Group operations (consistency models enforced with synchronization variables)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is Strong Consistency in data-centric models?

A

Every read reflects the most recent write.
Trade-off: Can delay responses (C), reducing availability (A).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is Sequential Consistency in data-centric models?

A

Operations appear in the same order to all users, but delays can occur. The result of any execution is the same as if the (read and write) operations by all processes on the data store were executed in some sequential order, and the operations of each individual process appear in this sequence in the order specified by its program.
* Trade-off: Allows some flexibility (P) while keeping order intact (C).
* Example: A social media post.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is Eventual Consistency in data-centric models?

A

Data eventually synchronizes, but some reads might be outdated.
* Trade-off: Lower consistency (C) but high availability (A).
* Example: Cache propagation or updates.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What is Strict Consistency?

A

Any read on a data item x returns a value corresponding to the result of the most recent write on x. This is an ideal model and is impossible to implement in a distributed system due to the implicit assumption of absolute global time.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What is Causal Consistency?

A

Writes that are potentially causally related must be seen by all processes in the same order. Concurrent writes may be seen in a different order on different machines. It is a weakening of sequential consistency.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What is the basic idea behind Grouping Operations for consistency?

A

It is not important that reads and writes of a series of operations are immediately known to other processes. What is important is that the effect of the series itself is known. Accesses to locks are sequentially consistent.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Name three consistency models enforced with synchronization variables (Grouping Operations).

A

Weak consistency: Shared data is consistent only after a synchronization is done.
Release consistency: Shared data is made consistent when a critical region is exited.
Entry consistency: Shared data pertaining to a critical region is made consistent when a critical region is entered.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What is the focus of Client-Centric Consistency Models?

A

Focused on what an individual client observes, which is useful in disconnected or weak connectivity scenarios (e.g., for mobile users). The goal is that the database appears consistent to the individual user.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Define Monotonic Reads.

A

If a process reads the value of a data item x, any successive read operation on x by that process will always return that same value or a more recent value.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Define Monotonic Writes.

A

A write operation by a process on a data item x is completed before any successive write operation on x by the same process.

17
Q

Define Read Your Writes.

A

The effect of a write operation by a process on data item x will always be seen by a successive read operation on x by the same process.

18
Q

Define Writes Follow Reads.

A

A write operation by a process on a data item x following a previous read operation on x by the same process is guaranteed to take place on the same or a more recent value of x that was read.

19
Q

What is a Consistency Protocol?

A

It describes an implementation of a specific consistency model.
* Examples: Primary-based protocols, Quorum-based protocols, Version vectors, Paxos, and Raft.

20
Q

What is the essence of Primary-Based Protocols?

A

Each data item x in the data store has an associated primary which is responsible for coordinating write operations on x. They provide a straightforward implementation of sequential consistency.

21
Q

Differentiate between Remote-Write and Local-Write in Primary-Based Protocols.

A

Remote-Write: The primary is fixed at a remote server; write operations are forwarded to this primary.
Local-Write: The primary is moved to the process where the write operation is initiated, and the write is carried out locally.

22
Q

What does Continuous Consistency address?

A

It addresses how to ensure that replicas remain consistent with the primary in a primary-backup replication setup and how to measure any deviations.

23
Q

What is a Conit (Consistency Unit)?

A

It specifies the data unit over which consistency is to be measured.