CSE Roadmap

Specialist tier · about 2 hours · 5 parts

Part 5 of 5 · 4 min read

Exercises

Easy

Easy 1: State CAP's actual condition (15 minutes)

State under what specific condition the CAP theorem's trade-off applies.

Done when: during an actual network partition is correctly identified as the specific condition.

Hint

During an actual network partition.

Easy 2: State CAP's two competing properties (15 minutes)

Name the two properties the CAP theorem says cannot both be fully provided during a partition.

Done when: consistency and availability are both correctly named.

Hint

Consistency and availability.

Easy 3: State what a system can be outside of a partition (15 minutes)

State whether a system can be both consistent and available when no network partition is occurring.

Done when: yes is correctly stated, since CAP's trade-off only applies during an actual partition.

Hint

Yes, CAP's trade-off only applies during an actual partition.

Medium

Medium 1: Identify the flaw in "choose two of three" (25 minutes)

Identify why treating partition tolerance as something a system can simply opt out of misstates the theorem.

Done when: the explanation correctly notes that a real network can and eventually will experience a partition regardless of a designer's preference, so partition tolerance is not actually an optional choice.

Hint

A real network can and eventually will experience a partition regardless of preference, so partition tolerance is not actually something a system can opt out of.

Medium 2: Determine what CAP says about a quiet period (25 minutes)

A system runs for six months with no network partition ever occurring. Determine what CAP says it must sacrifice during that period.

Done when: nothing is correctly identified, since CAP's trade-off is specifically about behavior during an actual partition, not about ordinary operation.

Hint

Nothing, since CAP's trade-off only applies during an actual partition, not during ordinary operation with no partition occurring.

Medium 3: Determine what CAP says about latency (30 minutes)

A vendor claims their system is slow because it "chooses consistency under CAP." Evaluate whether CAP actually explains this slowness.

Done when: the evaluation correctly notes that CAP says nothing about latency or throughput, so slowness is not something the theorem itself explains or requires, even for a system that does choose consistency during a partition.

Hint

CAP says nothing about latency or throughput, so it does not explain or require the system's slowness, even if it does choose consistency during a partition.

Hard

Hard 1: Distinguish CAP's consistency from eventual consistency (30 minutes)

Explain why a system using eventual consistency, covered in the replication level, is not simply making the same choice CAP describes as "choosing availability."

Done when: the explanation correctly notes that CAP's definition of consistency is a strict, all-or-nothing guarantee, while eventual consistency is a separate, weaker guarantee with its own specific properties, such as eventually converging, making it a more nuanced trade-off than the simple binary CAP describes.

Hint

CAP's consistency is a strict, all-or-nothing guarantee, while eventual consistency is a separate, weaker guarantee with its own properties, making it a more nuanced trade-off than CAP's simple binary.

Hard 2: Evaluate a system's marketing claim against what CAP actually constrains (35 minutes)

A system advertises itself as "CP," claiming it sacrifices availability at all times in exchange for consistency. Evaluate whether this framing is accurate given what CAP actually constrains.

Done when: the evaluation correctly notes that CAP's trade-off only has to apply during an actual partition, so a system correctly described this way should still be able to provide both consistency and availability during ordinary operation with no partition occurring, making "sacrifices availability at all times" an overreach of what CAP actually requires.

Hint

CAP's trade-off only applies during an actual partition, so a correctly CP-described system should still provide both consistency and availability during ordinary operation, making "sacrifices availability at all times" an overreach.

Hard 3: Connect CAP to the earlier consensus and two-phase commit pages (40 minutes)

Explain how a fault-tolerant consensus protocol, covered two pages earlier, relates to CAP's consistency-versus-availability trade-off during a partition.

Done when: the explanation correctly notes that a consensus protocol requiring a majority of nodes to agree effectively chooses consistency during a partition, since the minority side of the partition, unable to reach a majority, must refuse to make progress rather than risk disagreeing with whatever the majority side decides, directly illustrating CAP's trade-off in a concrete mechanism.

Hint

A majority-based consensus protocol effectively chooses consistency during a partition, since the minority side cannot reach a majority and must refuse to make progress rather than risk disagreeing with the majority's decision.