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 03 · Data Systems · Data in motion · about 15 min to read

Play it as a journeyTutor comes with a plan

Streams that remember: state, checkpoints and joins

Stream Processing
Stream Processing · Open board

The Data Systems stream processing board. This lesson goes inside the box that does the work: what that box must remember, and how it survives a crash without a wrong answer.

Before you start. Stream Processing gave you events, event time, windows and the watermark, which tells a window when to close. It also named checkpointing and exactly-once in two lines, and this lesson opens those lines. Batch Processing showed a joined file that ends, so a failed job could simply run again from the start. Kafka 02: The Log gave you the log with offsets, where each reader remembers its own place and can read again.

Lesson 21 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

  • February 1985: a snapshot of a system that never stops
  • A join needs a memory: the state store
  • The crash: what dies with the memory
  • The checkpoint: state and offset saved as one
  • Closing the gap: commit the output with the checkpoint
  • Alignment: when an operator has two inputs
  • The join code, run
  • Edge cases and trade-offs

Terms it explains: stream-stream join, state store, checkpoint, exactly-once inside an engine, barrier, alignment, Stream-table joins, Common mistakes, CDC, event, event sourcing, event time vs processing time, exactly-once, load balancing vs fan-out, log compaction, log-based broker (Kafka), message broker, microbatch / checkpoint, offset, producer/consumer, straggler, stream-stream / stream-table join, watermark, window.

Lab

A tap from a phone in a tunnel arrives twenty seconds late. How long should the server wait before showing a count?

Drag How long to wait for stragglers and watch Thrown away fall while Seconds waited climbs.

Open The late tap

Related papers

Review Data Systems