Skip to content
BENIBIX Learn

Windowing (Stream Processing)

Data⚙️ ProcessingEvent Time and Windows

Also known as Windowing, Stream Window, Time Window

Cutting an endless stream into pieces of time, so you can count.

Think of it like

It is like counting cars that pass your house, five minutes at a time. Each five minutes gets its own count.

Example

A shop counts page views per page in 1-minute windows. The live chart shows a new bar each minute.

Why it matters

Nearly every total on a stream is a window. Clicks a minute and sales an hour are both windows.

Definition

Windowing cuts an endless stream into finite pieces of time, so totals can be worked out. Each window has a start and an end, and events fall into windows by their time. There are three main kinds: tumbling, sliding and session windows. A window's result is sent when the watermark passes its end. Without windows, a count over a stream would never finish.
The same events, grouped three ways: tumbling, sliding and session windows.

Common mistake

Picking a window by habit. The size should match the question, such as one minute for alerts or one day for sales.

Key takeaways

  1. 1
    Finite pieces. Of an endless stream.
  2. 2
    Three main kinds. Tumbling, sliding, session.
  3. 3
    Closed by the watermark. Then the result is sent.