Index

Free, with Google

Keep going, free.

A free account opens lessons 2 and 3 of every track, 33 more lessons, and keeps your progress and review cards on every device.

Start free with Google

A chalk plan

Open everything on chalk.

Every lesson, board, video, lab and paper, and the full review decks. Yearly is $39/year.

See plansStart free instead

Module 02 · Data Systems · Data on many machines · about 16 min to read

Play it as a journeyTutor comes with a plan

Waiting out the clock: TrueTime, HLC and NewSQL

Consistency and Consensus
Consistency and Consensus · Open board

The map of what a group of machines can still promise each other. This lesson adds the part the map leaves open: what to do about the clocks.

Before you start. Transactions gave you versions: a database keeps several versions of a row, each with a timestamp, and a reader sees the newest version stamped at or before its own timestamp. When Machines Fail showed a clock that runs 40 milliseconds slow making an older write beat a newer one. Consistency and Consensus gave you linearizability (every read sees the latest completed write), the Lamport clock (a counter that grows with every event and every message), and two-phase commit, where every participant must say yes.

Lesson 17 of 24 in Data Systems

The rest of this lesson is part of a plan.

A plan opens every lesson, board, video, lab and paper on chalk. Yearly is $39/year.

See plansAlready a member? Sign in

Or start free: a free account opens lessons 2 and 3 of every track.

In this lesson

  • The problem: a payment that the next read cannot see
  • TrueTime: a clock that returns an interval, not one number
  • Commit wait: pause until the timestamp is in the past
  • Hybrid logical clock: an ordinary clock plus a counter
  • Uncertainty restart: retry the read instead of waiting after the write
  • Calvin: agree on the order first, then no clock is needed

Terms it explains: TrueTime, commit wait, hybrid logical clock, maximum clock offset, uncertainty interval, Calvin, Common mistakes, 2PC, causal consistency, consensus, coordination service, coordinator/participant, FLP, Lamport timestamp, linearizability, partial vs total order, Paxos/Raft/Zab, strict serializability, total order broadcast.

Related papers

Review Data Systems