Skip to main content
XenonStack

Big Data Engineering

XenonStack Blog Apache Beam Architecture: Unified Model and Runners

and | Published | Updated

Apache Beam Architecture: Unified Model and Runners
10:27

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.

ConceptWhat it isWhy a leader should care
PipelineA directed acyclic graph of reading, transforming and writing stepsThe unit you version, test and review
PCollectionA distributed, unordered set of elements, bounded or unbounded; each element has a timestamp and belongs to one windowOne abstraction for batch tables and event streams
PTransformOne processing step that takes zero or more PCollections and produces zero or moreComposable steps keep code modular
ParDo and DoFnThe general per-element transform with user-defined logicWhere business rules live
GroupByKeyCollects all elements sharing a key and windowThe basis of aggregation and joins
WindowingSplits a PCollection into finite windows by timestamp: fixed, sliding, session or globalMakes aggregation possible on unbounded data
WatermarkBeam's estimate of how complete the data is for a window; data after it passes the window end is lateGoverns how long you wait for late events
TriggersRules that decide when a window emits results, including early panes and re-firing for late dataTrades latency against completeness
State and timersPer-key state in a DoFn, with callbacks at a set event or processing timeEnables fine-grained, delayed logic
Splittable DoFnA DoFn whose work on one element can be checkpointed and split by the runnerAdds 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.

Two-column diagram: Beam pipeline, PCollection, windows and triggers, SDK on the left; Flink, Spark, Dataflow and Direct or Prism runners on the right
RunnerWhere it fitsCurrent status (checked 12 Nov 2026)
Direct RunnerLocal development and unit testsRuns pipelines locally for testing
Apache FlinkSelf-managed streaming and batch on your own clustersStreaming-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 SparkTeams already standardised on SparkClassic 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 DataflowManaged execution on Google CloudFully managed service with autoscaling and dynamic work rebalancing
PrismLocal testing with Beam portabilityDefault runner for the Go SDK; suited to small scale local testing
Hazelcast JetIn-memory execution where it is already in useListed 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 situationLikely choiceReason
You need one codebase for batch and streaming, and may change engines laterBeamOne model and one set of classes for bounded and unbounded data
You already run Flink and need low-latency stateful streamingFlink directly, or Beam on the Flink runnerBeam adds portability; native Flink gives full access to engine features
Your estate is Spark and the work is mostly batchSpark directlyThe Spark runner for Beam is limited in streaming today
You want managed operations on Google CloudBeam on DataflowFully managed service with autoscaling
Your team writes Python or GoBeam portable runners on FlinkPortable 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.

Table of Contents

navdeep-singh-gill

Navdeep Singh Gill

Global CEO and Founder of XenonStack

LinkedIn profile

Navdeep Singh Gill is serving as Chief Executive Officer and Product Architect at XenonStack. He holds expertise in building SaaS Platform for Decentralised Big Data management and Governance, AI Marketplace for Operationalising and Scaling. His incredible experience in AI Technologies and Big Data Engineering thrills him to write about different use cases and its approach to solutions.

Get the latest articles in your inbox

Subscribe Now

Interested in solving your challenges with the XenonStack team?
Get Started

Tell us about you and your priorities so we can prepare the right conversation. It takes about 2 minutes.

Please Select your Industry
Banking
Fintech
Payment Providers
Wealth Management
Discrete Manufacturing
Semiconductor
Machinery Manufacturing / Automation
Appliances / Electrical / Electronics
Elevator Manufacturing
Defense & Space Manufacturing
Computers & Electronics / Industrial Machinery
Motor Vehicle Manufacturing
Food and Beverages
Distillery & Wines
Beverages
Shipping
Logistics
Mobility (EV / Public Transport)
Energy & Utilities
Hospitality
Digital Gaming Platforms
SportsTech with AI
Public Safety - Explosives
Public Safety - Firefighting
Public Safety - Surveillance
Public Safety - Others
Media Platforms
City Operations
Airlines & Aviation
Defense Warfare & Drones
Robotics Engineering
Drones Manufacturing
AI Labs for Colleges
AI MSP / Quantum / AGI Institutes
Retail Apparel and Fashion

Continue