Skip to the workspace
Pebellslearn by building
Ingestion and Pipelines  ›  Lesson

Realtime and Hybrid Ingestion

Realtime 12 minStreaming handles each event within seconds for decisions that cannot wait, micro-batching offers a cheaper middle ground, and hybrid designs pair a fast path with an accurate batch path.

data engineer / Realtime and Hybrid Ingestion

Explore each scene at your own pace.

01 · The rule

The rule

Realtime and Hybrid Ingestion

A rider opens the PedalCity map at 08:03 and walks to a dock that showed four bikes. It is empty: the map was built from last night's batch. Some data loses its value within seconds. For that data you need streaming, and usually you keep batch running alongside it.

The rule

Stream when a decision can't wait; batch when it can; hybrid when both.

Realtime (streaming) ingestion handles each event as it arrives. Dock sensors publish readings to a message broker, a system such as Apache Kafka, RabbitMQ or a cloud queue, which holds the events in order. A stream processor reads them continuously and updates results within seconds.

dock sensor ──► broker topic "dock-readings" ──► stream processor ──► live availability table ──► map

Streaming earns its place when someone acts on the data straight away: the rider choosing a dock, or a van driver sent to an empty station. It costs more. The processor runs all day, and late or duplicate events must be handled without the luxury of a finished window.

A middle ground is micro-batching: tiny batches every 30 seconds to a few minutes. Many "realtime" systems actually work this way, and it is often fresh enough.

Hybrid ingestion runs both paths on the same events:

  • A fast path streams readings to the live map. It is quick and may be slightly off.
  • A batch path lands the same readings in the lake and recomputes accurate hourly counts each night, after all late and duplicate events have settled.

The fast path serves decisions right now. The batch path is the record of truth for reports and model training. When the two disagree, the batch result wins for history.

Scene 1 of 5
Hover to wake the cannons. Drag to move, or use arrow keys when focused. Press Enter to fire a shot.