Skip to content

Stream processing and windows

Assign events to windows, reason about watermarks and late updates, and size bounded deduplication state without claiming global exactly-once effects.

26 min8 steps

By the end you can
  • Assign event timestamps to aligned half-open tumbling windows
  • Calculate state cleanup thresholds and choose a policy for late events
  • Estimate deduplication memory from unique arrival rate and retention
  • Choose keys and sink semantics that keep replay and late corrections safe

An event has more than one clock

Event time: when it happened. Processing time: when the pipeline sees it. Validate timestamps at ingestion; a far-future clock distorts progress.

  1. 12:01

    Purchase happens (event time)

  2. 12:01–12:08

    Phone offline

  3. 12:08

    Pipeline receives it (processing time)

A 12:00-12:05 report belongs to 12:01, not 12:08.

A purchase occurs at 12:01 and arrives at 12:08. Which time belongs in an event-time revenue report?

Answer this step to continue.