Key takeaway
- Apache Beam architecture for enterprise leaders: the unified batch and streaming model, how runners differ on Flink, Spark and Dataflow, and when to use it
What is Apache Beam and what does it do for an enterprise data platform?
Apache Beam is an open source, unified model for defining both batch and streaming data-parallel processing pipelines. You write a pipeline once with a Beam SDK, then hand it to a runner that executes it on an engine such as Apache Flink, Apache Spark or Google Cloud Dataflow. The decision for a CTO or data platform lead is therefore less about a processing engine and more about how much pipeline code you want to keep portable between engines.
This guide takes the Beam angle only: the unified model and the runners. For the history of the field, read how stream processing has evolved. For platform choice, see data streaming platforms and how to choose. For the engine itself, see data processing with Apache Flink. The current release is Beam 2.77.0, dated 7 October 2026, and every runner claim below was checked against beam.apache.org on 12 November 2026.
How is the Apache Beam unified model built?
Beam began in early 2016, when Google and other partners moved the Google Cloud Dataflow SDKs and runners into the Apache Beam Incubator, as the project describes. Its SDKs use the same classes for bounded and unbounded data, so one pipeline definition can serve a nightly batch job and a live stream. The SDKs cover Java, Python, Go, SQL and TypeScript, with Scala available through the third-party Scio interface.
What are the core building blocks?
The Beam programming basics define a small set of concepts that every runner must honour.
| Concept | What it is | Why a leader should care |
|---|---|---|
| Pipeline | A directed acyclic graph of reading, transforming and writing steps | The unit you version, test and review |
| PCollection | A distributed, unordered set of elements, bounded or unbounded; each element has a timestamp and belongs to one window | One abstraction for batch tables and event streams |
| PTransform | One processing step that takes zero or more PCollections and produces zero or more | Composable steps keep code modular |
| ParDo and DoFn | The general per-element transform with user-defined logic | Where business rules live |
| GroupByKey | Collects all elements sharing a key and window | The basis of aggregation and joins |
| Windowing | Splits a PCollection into finite windows by timestamp: fixed, sliding, session or global | Makes aggregation possible on unbounded data |
| Watermark | Beam's estimate of how complete the data is for a window; data after it passes the window end is late | Governs how long you wait for late events |
| Triggers | Rules that decide when a window emits results, including early panes and re-firing for late data | Trades latency against completeness |
| State and timers | Per-key state in a DoFn, with callbacks at a set event or processing time | Enables fine-grained, delayed logic |
| Splittable DoFn | A DoFn whose work on one element can be checkpointed and split by the runner | Adds parallelism for large inputs such as big files |
How does a pipeline run from start to finish?
- Create a pipeline object and set its options, including which runner to use.
- Read data with a source transform into a PCollection.
- Apply transforms such as ParDo, GroupByKey, Combine and Flatten.
- Write the result to a sink.
- Run the pipeline on a runner. Use the Direct Runner locally to test before moving to a distributed engine.
Which Apache Beam runner should you choose?
The runner is the part of Beam that decides cost, operations and feature coverage. The current runner list on the Beam overview page is Direct, Apache Flink, Apache Spark, Google Cloud Dataflow and Hazelcast Jet. The Samza runner is listed as supported until Beam 2.74.0, and the Twister2 and Nemo runners appear only under older versions. Apache Apex, which the earlier version of this post listed, has retired as a project, so do not plan on it.
| Runner | Where it fits | Current status (checked 12 Nov 2026) |
|---|---|---|
| Direct Runner | Local development and unit tests | Runs pipelines locally for testing |
| Apache Flink | Self-managed streaming and batch on your own clusters | Streaming-first, also runs batch; the Flink cluster minor version must match the runner. Supports Flink 2.2.x and 2.1.x from Beam 2.75.0 and 2.0.x from 2.72.0 |
| Apache Spark | Teams already standardised on Spark | Classic runner supports the Spark 3.2.x branch; the Structured Streaming runner is experimental and batch only; the portable runner does not yet support streaming |
| Google Cloud Dataflow | Managed execution on Google Cloud | Fully managed service with autoscaling and dynamic work rebalancing |
| Prism | Local testing with Beam portability | Default runner for the Go SDK; suited to small scale local testing |
| Hazelcast Jet | In-memory execution where it is already in use | Listed as a current runner; check its row in the capability matrix before committing |
Beam publishes a capability matrix that grades each runner on four questions: what results are computed, where in event time, when in processing time results are emitted, and how refinements relate. Treat that matrix, not general claims, as the source of truth for a given runner.
What is Beam portability and why does it matter?
The portability framework puts language-neutral protocols between the SDK and the runner. The Runner API describes the pipeline, the Job API manages execution, and the Fn API governs how SDK harness containers exchange work and data with the runner. This is what lets Python and Go pipelines run on Flink or Spark, and it enables cross-language transforms, where one SDK reuses I/O or transforms written for another. For non-Java SDKs, Flink and Spark run portable pipelines by default. Flink can run Python in batch and streaming modes, whereas Spark supports Python in batch mode only.
Beam, Flink or Spark: which one do you actually need?
This is a layering question, not a rivalry. Beam is the programming model; Flink and Spark are engines that Beam can target. The earlier version of this post carried a feature table claiming that Spark did not support GroupByKey or triggers. We could not confirm those statements against current Beam documentation, so they have been removed. Use the table below as a decision aid instead.
| Your situation | Likely choice | Reason |
|---|---|---|
| You need one codebase for batch and streaming, and may change engines later | Beam | One model and one set of classes for bounded and unbounded data |
| You already run Flink and need low-latency stateful streaming | Flink directly, or Beam on the Flink runner | Beam adds portability; native Flink gives full access to engine features |
| Your estate is Spark and the work is mostly batch | Spark directly | The Spark runner for Beam is limited in streaming today |
| You want managed operations on Google Cloud | Beam on Dataflow | Fully managed service with autoscaling |
| Your team writes Python or Go | Beam portable runners on Flink | Portable runner covers Java, Python and Go on Flink |
See Apache Spark architecture for the Spark side of this choice. When pipeline outputs feed business questions, AgentAnalyst lets teams ask questions of enterprise data sources in plain language and get live answers without waiting for a reporting cycle.
What should governance, security and cost cover for Beam pipelines?
- Version control and review: treat each pipeline as code, and pin the Beam SDK and the runner versions together. Flink runner artefacts are tied to a Flink minor version.
- Testing before scale: run unit tests and a Direct Runner or Prism pass before a distributed run.
- Checkpointing: the Flink runner logs a warning for unbounded sources without checkpointing, and sources such as Pub/Sub need checkpoints to acknowledge messages.
- Data lateness policy: decide watermark, trigger and allowed-lateness settings with the business owner, because they define when a number is final.
- Decision lineage: for pipelines whose output drives automated actions, ElixirData Context OS keeps governed context, versioned policy and decision traces in one decision layer above AI agents.
When should you not use Apache Beam?
- A single engine will do and you need every engine-specific feature: use that engine directly.
- The work is small, one-off SQL on a warehouse: a pipeline framework is unnecessary.
- You depend on a runner feature that its capability matrix marks as partial or unverified.
- You need Spark streaming from Python through the portable runner: the Spark documentation says this is not yet supported.
What is a sensible adoption sequence?
- Pick one batch pipeline and rebuild it in Beam with the Direct Runner.
- Add a bounded source and an unbounded source to the same pipeline to prove the unified model.
- Choose one production runner against the capability matrix and your operating model.
- Define windows, watermarks and triggers with the business owner.
- Add checkpointing, monitoring and version pinning before go-live.
To map one data pipeline decision your agents should make, and the context and policy it depends on, book a Context Workshop. See what happens in the workshop.
Frequently asked questions
Is Apache Beam a processing engine?
No. Beam is a unified programming model. Pipelines run on a runner such as Apache Flink, Apache Spark or Google Cloud Dataflow.
Which languages does Apache Beam support?
Beam lists SDKs for Java, Python, Go, SQL and TypeScript, with Scala available through the third-party Scio interface.
Does Apache Beam support Apache Apex?
Apache Apex has retired as an Apache project and is not on the current Beam runner list.
Can Beam run Python pipelines on Spark streaming?
Not today through the portable runner. The Beam documentation says Python streaming is not yet supported on Spark, while Flink can run Python in batch and streaming modes.
What is a watermark in Beam?
It is Beam's estimate of how complete the data is for a window. Data that arrives after the watermark passes the end of a window is considered late.
What is the latest Apache Beam release?
Beam 2.77.0, dated 7 October 2026, was the latest release on the downloads page when we checked on 12 November 2026.
Follow XenonStack on LinkedIn: XenonStack on LinkedIn for new guides on agentic AI, data and platform engineering.
Ready to put AI agents to work? Explore ElixirClaw, the agentic OS platform to build, orchestrate and govern AI agents.
Explore the XenonStack platform family: ElixirData · ElixirClaw · ElixirHub · NexaStack · MetaSecure · Neural AI · AgentGRC · AgentSRE · AgentAnalyst · AgentInstruct · AgentRAI · AgentScrum · AgentSearch · AgentForce · AI Aviator · SAIF Aviator · CohortIQ · XenonStack AI · XenonStack UAE