Questions: CRDTs: Conflict-Free Replicated Data Types

5 questions to test your understanding

Score: 0 / 5
Question 1 Multiple Choice

A G-Counter allows each of n replicas to increment only its own entry. When two replicas exchange state, what merge operation ensures they converge to the same count, and why?

AElement-wise sum — add corresponding entries so no increments are lost
BElement-wise maximum — take the larger value for each entry; because max is commutative and idempotent, replicas converge regardless of message order
CElement-wise minimum — take the smaller value to prevent double-counting
DLast-write-wins — the most recently timestamped entry overwrites the other
Question 2 Multiple Choice

An application needs to ensure no two users can register the same username — a global uniqueness constraint. Can a CRDT provide this guarantee without any coordination?

AYes — an OR-Set CRDT tags each username with a unique identifier, preventing duplicates
BYes — a G-Set's union merge naturally ensures each element appears only once
CNo — enforcing global uniqueness requires knowing the complete current state across all replicas simultaneously, which requires coordination that CRDTs cannot provide
DNo — CRDTs only support numeric data types, not strings like usernames
Question 3 True / False

CRDTs achieve conflict-free convergence by having replicas contact a central coordinator before accepting each write operation.

TTrue
FFalse
Question 4 True / False

If a replica receives the same CRDT update twice due to network retransmission, applying it a second time corrupts the state.

TTrue
FFalse
Question 5 Short Answer

Why must a CRDT's merge operation be commutative, associative, AND idempotent? What breaks if any one of these properties is missing?

Think about your answer, then reveal below.