Skip to content
About
Main content
Time & Change

Streaming

What does it cost to remember, when the input never ends?

Who this mechanism is for: a developer who writes code, calls APIs and knows basic SQL, and has maybe used a message , but has never built or operated a stream-processing job. You do not need any database or distributed-systems background. Every technical term is explained the first time it appears, and again in the glossary at the end. Where an idea comes from a that other books treat separately (queues, transactions, log , queueing mathematics), we explain it in a few sentences right here.

The story we will follow

Ana Costa is a backend engineer at Ridelo, a food-delivery company. Every order, cancellation, payment and courier GPS ping becomes an event (a small record that says "this happened") and is appended to a shared log. Ridelo runs a stream-processing job on that log: a program that never finishes, reads events as they arrive, and keeps results fresh. The job computes fraud scores per user, joins orders with courier positions, enriches orders with restaurant data, feeds a "busiest restaurants in the last 24 hours" dashboard, and writes charges into the billing database.

Her teammate Tomás is the on-call engineer. Ana is new to streaming. In nine parts she will meet nine problems. Each article starts with a problem that looks like a bug: a crash after three quiet weeks, a cluster that will not scale, a number that is slightly too small, a bill that is charged twice. Each article ends with the solution, using the mechanisms we just learned. The solutions are not clever patches. They follow from one fact, and that fact is the main idea of this whole mechanism:

( means a job that reads a fixed amount of input, produces an output and ends. State means the data a program must remember between events.)

How this mechanism is organized

After that: a summary, labs, interview questions and a glossary.

One request: read the "Rule" boxes at the end of many sections. Each one is the section in a single sentence.

What do I do, and what does each option cost?

Can I see it myself?

Can I reason about it under questioning?

Trade-offs

The tensions this mechanism takes a position on. Each recurs across mechanisms.

Show all 6 trade-offs
Recurring principles

Ideas this mechanism meets that keep coming back, mechanism after mechanism.

Show all 11 principles