9-consistency-replication Flashcards

(40 cards)

1
Q

Why replicate data?

A
  1. Enhance reliability (what if replica crashes). 2. Improve performance (more processes need access).
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is the main issue with replication?

A

Keeping replicas consistent - when one updated

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

What is a Read-Write conflict?

A

Read and write operation acting concurrently on same data.

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

What is a Write-Write conflict?

A

Two concurrent write operations on same data.

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

What is the scalability trade-off with consistency?

A

Guaranteeing global ordering on conflicting operations is costly - may need to weaken consistency.

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

What is a Consistency Model?

A

Contract between data store and processes specifying results of read/write in presence of concurrency.

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

What is a Data Store?

A

Distributed collection of storages.

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

Name 3 Data-Centric consistency models.

A

Continuous, Sequential, Causal.

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

Name 3 Client-Centric consistency models.

A

Monotonic Reads, Monotonic Writes, Read Your Writes.

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

What is Continuous Consistency?

A

Replicas may differ in numerical value

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

What is a Conit?

A

Consistency Unit - specifies data unit over which consistency is measured.

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

What is Order Deviation?

A

Number of tentative operations pending to be committed.

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

What is Numerical Deviation?

A

Number of operations at other replicas not yet seen

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

What is Sequential Consistency?

A

Result same as if all operations in some sequential order and each process’s operations appear in program order.

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

What notation means ‘P1 writes value a to x’?

A

W₁(x)a

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

What notation means ‘P1 reads x and gets value b’?

A

R₁(x)b

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

When is a data store NOT sequentially consistent?

A

When different processes see different interleavings of write operations.

18
Q

What is the Happens-Before relation?

A

Event a → b means a happened before b (partial order).

19
Q

What are the 3 rules for Happens-Before?

A
  1. Same node, a before b locally. 2. a is send, b is receive of same message. 3. Transitivity via c.
20
Q

What are concurrent events?

A

When neither a → b nor b → a. Written a ‖ b.

21
Q

What is Causal Consistency?

A

Writes that are potentially causally related must be seen by all processes in same order. Concurrent writes may differ.

22
Q

When are two writes causally related?

A

When one process reads a value and then writes based on it.

23
Q

What is the key difference between Sequential and Causal consistency?

A

Sequential: all processes see same order of ALL writes. Causal: only causally related writes must be in same order.

24
Q

What is Client-Centric consistency?

A

Guarantees for single client about consistency of their accesses. No guarantees about concurrent accesses by different clients.

25
What is Monotonic Reads?
If process reads x
26
Example of Monotonic Reads?
Reading email while moving - each server fetches at least all updates from previous server.
27
What is Monotonic Writes?
Write on x completed before any successive write on x by same process.
28
Example of Monotonic Writes?
Version control - file versions maintained in correct order everywhere.
29
What is Read Your Writes?
Effect of write on x always seen by successive read on x by same process.
30
Example of Read Your Writes?
Web page update - browser shows newest version not cached copy.
31
What notation means 'xⱼ based on previous xᵢ'?
W₁(xᵢ;xⱼ)
32
What notation means 'xⱼ concurrent to xᵢ'?
W₁(xᵢ|xⱼ)
33
What are the 3 types of replicas?
Permanent (always there), Server-initiated (on server request), Client-initiated (client cache).
34
What factors determine replica placement?
Distance to clients, access patterns, latency.
35
How does server-initiated replication work based on access counts?
Below threshold D: drop file. Above threshold R: replicate. Between D and R: migrate.
36
What is Primary-Backup Protocol?
All writes go to primary. Primary forwards to backups. Backups ack. Primary acks client.
37
What are the write steps in Primary-Backup?
W1: request, W2: forward to primary, W3: tell backups, W4: backups ack, W5: ack write complete.
38
What are the read steps in Primary-Backup?
R1: request, R2: response.
39
What is Primary-Backup with Local Writes?
Primary moves to where write occurs (for mobile computing in disconnected mode).
40
When is Primary-Backup with Local Writes used?
Mobile computing - ship files to user before disconnecting