Big Data Systems HPI

Quiz 3 - MapReduce II & Key-Value Stores


Question

Alt text

Consider the scenario in the image above. Server A and B are both part of the same key value store. Clients A and B both interact with this key value store.

Initially, x = 3 on all servers.

Depending on the consistency guarantees given by the key value store, the read results of the clients as shown in the image can be different (shown as read x = ?).

For the following consistency guarantees, select which value the x can be when reading. In some cases it might be possible that x can be multiple values. In that case explicitly select the option that states it can be "either ... or ...".


Answer

No guarantee: As the system provides no guarantees, it is possible that they read either 3 or 4, depending on whether the servers have synced their data.

Strong consistency: The system guarantees that there is only one valid version for a certain key at any given time. In this case, 4 will be the value that the clients read.

Monotonic reads: Monotonic reads only guarantee that if a process P has read a value for x, it will not read an older value in a new read. In this case, we cannot make any assumptions about the results of the reads that are performed for client B, so either 3 or 4 can be read on both clients. A reads his own writes.

Read your own writes: Client A is guaranteed to read 4, as it has just written it. Client B, on the other hand, has not written anything so it can receive either 3 or 4.




Comments