What Stream Processing Is — Computing on Data in Motion

Most software processes data at rest: you store it, then query it. Stream processing flips that — it computes on data in motion, as each event arrives, continuously and forever. This shift from "store then process" to "process as it flows" underpins fraud detection, real-time analytics, monitoring, and the event-driven systems that react to the world as it happens. This series builds stream processing from first principles, starting with why computing on data in motion is a fundamentally different model.

This series complements the blog’s Event-Driven Architecture with Kafka and data-engineering coverage with the processing side: not how events move, but how you compute over them continuously. Post 1 establishes the core mental shift — from bounded, stored data to unbounded, flowing data — and why it changes everything about how you compute.

Batch vs stream: the fundamental divide

The classic way to process data is batch processing: collect a finite, bounded dataset (a day’s transactions, a table), run a computation over all of it, produce a result, done. The data is at rest — complete and unchanging while you process it — and the job has a clear start and end.

Stream processing is the opposite: compute over an unbounded, continuous flow of data (events) as they arrive, with no end. The data is in motion — events keep coming, forever — so the computation is continuous and long-running rather than start-to-finish. You don’t wait for “all the data” because there is no “all”; you process each event (or small groups) as it flows past and continuously update results.

This distinction drives everything: - Batch answers “what happened?” over a complete past dataset, with high latency (you wait for the batch) but simplicity (the data is bounded and stable). - Stream answers “what is happening now?” as events occur, with low latency (react immediately) but at the cost of grappling with unbounded, never-complete, out-of-order data.

The defining challenge of stream processing flows directly from unboundedness: because the data never ends and is never complete, you can’t just “wait for all of it” — you must produce results incrementally and continuously over a flow that has no natural stopping point, while handling the messiness (late, out-of-order events) that real-time data brings. Everything hard about stream processing — windowing, time semantics, state, exactly-once — comes from this one fact: the data is infinite and in motion.

Why process data in motion

Computing on data as it flows, rather than storing it and querying later, matters for a growing class of problems where latency is the point:

The driving force is that the world produces events continuously and increasingly demands immediate response, so the “store everything, query later” model — great for analyzing the past — can’t serve the growing need to act on the present. Stream processing is how software keeps up with a world that happens in real time.

The spectrum and where streaming fits

It’s worth placing stream processing in context rather than as a rival to batch:

The through-line to carry: stream processing is computing on unbounded data in motion, continuously, as events arrive — a fundamentally different model from batch’s bounded, store-then-process approach, driven by the need to act on the present rather than analyze the past. Its difficulty all stems from unboundedness (no “all the data,” never complete, out of order), and its value is low-latency reaction to a world that happens in real time. The rest of the series builds the concepts that tame the unbounded flow — events and time, windowing, state, and fault tolerance — and the systems that implement them.

The throughline: batch processing computes over a bounded, at-rest dataset start-to-finish (answers “what happened?”, high latency, simple), while stream processing computes over an unbounded, in-motion flow of events continuously as they arrive (answers “what is happening now?”, low latency). The divide drives everything, and stream processing’s defining difficulty flows from unboundedness — no “all the data,” never complete, events arrive late and out of order — so you must produce results incrementally and continuously over a flow with no stopping point. You process data in motion when latency is the point (fraud/security/trading/ops where a late response is worthless), for continuous up-to-date results, to react to events (event-driven systems), and for naturally-streaming data (sensors, logs, clicks). Batch and stream are a spectrum (use the latency a problem needs — streaming is harder, so reserve it for when low latency justifies the complexity), and streaming has become core infrastructure as the world increasingly demands real-time reaction.

Key takeaways

Further reading

Sources & References