Data loses value over time. In real-time streaming, we extract that value in milliseconds, enabling reactive AI that feels alive.
1Time Windows
Since a stream has no 'End', we can't perform global aggregates (like SUM). Instead, we use Windows. A Tumbling Window is a fixed-size, non-overlapping time interval. A Sliding Window overlaps, providing a 'Moving Average'. Finally, Session Windows group events by activity, closing when a user stops interacting for a certain period. These allow us to perform meaningful math on infinite data.
Stream: [P1, P2, P3, P4, P5...]
Window: [P1, P2, P3] -> AVG: 10.5
Next_Window: [P4, P5, P6] -> AVG: 11.2
Status: WINDOWED_AGGREGATION_ACTIVE2Event Time vs Processing Time
A critical challenge in streaming is Latency. If a mobile app generates an event at 10:00 (Event Time) but the network is slow and it arrives at the server at 10:05 (Processing Time), which window does it belong to? Modern streaming engines use Watermarking to handle late-arriving data, ensuring that aggregates remain accurate even when the internet is unreliable.
Window_Start: T=0, End: T=5
Slide: T=1, End: T=6
Mode: CONTINUOUS_OVERLAP
Status: SLIDING_WINDOW_MONITOR