📘 How does streaming beat the nightly file?
Batch vs stream, event time, and delivery guarantees—how systems keep answering before the file closes.
What you’ll learn
- Batch vs Stream ProcessingDistinguish bounded from unbounded data, and choose batch or streaming from the latency the result actually needs.The useful split is the shape of the input, not the logo on the engine. Batch waits for a closed set. Streaming starts while the set is still growing. Akidau reserves bounded/unbounded for data and streaming/batch for runtimes. You pick the tool from how late the answer can be.
- Events and the Log AbstractionDescribe the append-only log and how immutable events let you replay, decouple, and derive state.A log is an append-only, totally ordered sequence with monotonic offsets. Events are facts; tables are projections. Because the tape is durable, a consumer can rewind to a retained offset and rebuild. Writers do not wait on readers. Kleppmann's move is to make that changelog the public interface.
- Pub/Sub and Message BrokersExplain publish-subscribe and Kafka's topics, partitions, offsets, and classic consumer groups.Producers publish to a named topic. Kafka stores the topic as partitions, each an independent ordered log. Order is per partition. Offsets are bookmarks, not deletes. In a classic consumer group, each partition has one owner at a time; another group gets its own full copy. Partition count caps that group's parallelism.
- Time, Windows, and StateSeparate event time from processing time, and use watermarks, windows, and checkpointed state without treating any of them as magic.Event time is when it happened. Processing time is when you saw it. A watermark is a heuristic lower bound on event time already seen, used to emit a window. Fixed/tumbling, sliding, and session windows cut the stream differently. Aggregations need durable keyed state, or a crash invents a new past.
- Guided Project: Real-Time Order PipelineDesign a live per-minute revenue pipeline that keys for order, windows on event time, writes idempotently, and watches lag.Key by region for per-region order, then watch for skew. Tumbling minutes use event time; the watermark decides when to emit; late data needs an explicit path. Kafka transactions can be exactly-once Kafka-to-Kafka; an external dashboard needs an idempotent region+minute key. Backpressure and consumer lag keep the process from dying into its own buffer.
Questions this course answers
What most fundamentally distinguishes stream processing from batch processing?
Akidau's framing is boundedness of the input: streaming is built for unbounded data and low latency, while batch waits for a bounded set. Memory use and correctness are not the defining factors.
A team needs hourly sales summaries with no requirement for fresh, up-to-the-second data. Which approach best fits?
When low latency provides no business value, batch is the simpler fit. Streaming adds out-of-order data and watermarks that this job does not need.
In Akidau's bounded/unbounded framing, what is 'batch' best understood as?
The Dataflow paper reserves batch and streaming for engines, and bounded/unbounded for data. A streaming engine can process a bounded file; a batch engine can slice unbounded data into files.
Which property best describes a log in the streaming sense?
A log is append-only and totally ordered, with each record assigned a monotonically increasing offset. Reading does not delete records.
Why does the log abstraction enable replay and rebuilding of state?
Durability and fixed ordering let consumers rewind to any retained offset and reprocess events. Records are retained until policy deletes them, not when they are read.
What best characterizes an event in an event-driven log?
An event is an immutable fact. New facts are appended. Current state is derived by processing those facts.
Grounded in trusted sources
- Streaming 101: The world beyond batch — Tyler Akidau, O'Reilly Radar, 5 August 2015 — unbounded vs bounded data; event time vs processing time; windowing — https://www.oreilly.com/radar/the-world-beyond-batch-streaming-101/
- The Dataflow Model: A Practical Approach to Balancing Correctness, Latency, and Cost in Massive-Scale, Unbounded, Out-of-Order Data Processing — Akidau et al., PVLDB 8(12), 2015 — §1.1 bounded/unbounded; §1.2 fixed/sliding/session; §1.3 watermarks as heuristic lower bounds — https://www.vldb.org/pvldb/vol8/p1792-Akidau.pdf
- Turning the database inside-out with Apache Samza — Martin Kleppmann, 4 March 2015 — append-only log of immutable facts; materialized views as projections — https://martin.kleppmann.com/2015/03/04/turning-the-database-inside-out.html
- Apache Kafka Design — Message Delivery Semantics — Apache Kafka 4.3 documentation — partitions, consumer position, at-most/at-least/exactly-once, transactions, share groups — https://kafka.apache.org/43/design/design/
- Apache Kafka Introduction — Apache Kafka documentation — topics, partitions, consumer groups, per-partition order — https://kafka.apache.org/documentation/
- Timely Stream Processing — Apache Flink documentation — watermarks, late elements, event time vs processing time — https://nightlies.apache.org/flink/flink-docs-stable/docs/concepts/time/
Every Wunder lesson is built from real, reputable sources — never invented.
Related courses
Wunder is a personalized learn-anything platform — tell it any topic and it builds a beautiful, fact-checked course in minutes, with narration, a knowledge check, and a college-style University track.
© 2026 Wunder Learning LLC · Terms & Privacy