The Window Aggregator turns the raw event stream from the Kafka Consumer into compact, query-ready summaries. It maintains per-device windowed state and emits aggregates that feed both the query API and the Anomaly Detector.
Event time, not wall-clock
Aggregation is keyed on the event timestamp carried by each reading. A bounded watermark tolerates late and out-of-order arrivals so a slow device does not corrupt an already-closed window.
Fixed, non-overlapping 1-minute buckets. Used for the metrics surface where each point represents a discrete interval.
count, min, max and avg per metric per window.