Event Time vs Processing Time

Event Time vs Processing Time

Event time and processing time narrated tour

Play silently with captions on provisional storyboard timing; narration audio is pending. Production pacing is independent of model time. Choose Reduced motion for a complete still at each beat.

Play the tour to open the workbench. Pause, replay a beat, or read the full transcript below. Situations the model cannot show use captions only and keep the existing frame.

Full transcript — Event time and processing time (8 beats)

B1 — Buffered factory reading
You are the engineer keeping a factory's sensor status useful when a buffered reading arrives late. Before someone acts on that status, the reading needs to belong to the time it describes. Receiving it now does not mean the sensor measured it now.

Model caption: Factory sensor status depends on when a reading was measured, even when it arrives later.

B2 — Measurement and receipt
Event time means when the sensor measured. Processing time, in our model, means when the processor received the reading. A window groups readings into a time interval. When the question concerns when a condition happened, event time determines which window gets the reading.

Model caption: Event time: measurement. Processing time: receipt. Event-time windows group readings by measurement time.

B3 — Watermark and lateness
A watermark estimates how far event time has progressed, helping the processor decide when results can close. Allowed lateness gives a window extra time to accept older readings. Together, those settings determine whether a delayed reading can still change its window's result.

Model caption: A watermark estimates event-time progress. Allowed lateness permits older readings to update a window for a limited time.

B4 — Seven second arrival lag
Take the factory's buffered reading. Its event time is three point two seconds, and its processing time is ten point two seconds. Subtract three point two from ten point two: the reading waited seven seconds. It still describes the earlier moment, even though newer measurements arrived first.

Model caption: E: measured at 3.2 s; received at 10.2 s. Arrival lag: 10.2 − 3.2 = 7 s.

B5 — Assign the earlier window
Use five second windows. Divide three point two by five to get zero point six four. Round down to zero, then multiply by five: the window starts at zero. Add five: it ends at five seconds, excluding five itself. The delayed reading belongs in that earlier window.

Model caption: 3.2 ÷ 5 = 0.64; round down to 0; 0 × 5 = 0; 0 + 5 = 5. E belongs in [0, 5) s.

B6 — Late accepted reading
Before it arrives, the greatest event time received is eight seconds. Subtract the two second watermark delay to get six. Keep the larger of zero and six: the watermark is six seconds. Add three seconds of allowed lateness to the window's five second end: eight. Six has not passed eight, so the reading is accepted late. That window now contains four accepted readings.

Model caption: Watermark: max(0, 8 − 2) = 6 s. Grace limit: 5 + 3 = 8 s. E is late accepted; [0, 5) s contains four accepted readings.

B7 — Older than the watermark
The misconception is that every reading older than the watermark must be left out. Our reading's three point two seconds is older than six, but its window still allows an update. The watermark has passed the window's end, while the extra allowance keeps the result open to correction.

Model caption: Older than the watermark does not automatically mean excluded: 3.2 < 6, and 6 is still within the window's 8 s grace limit.

B8 — Delay and window closure
A longer watermark delay means waiting longer to close windows and keeping more state, the information held for those calculations. For your factory, the trade is speed against room for delayed readings. Let measurement time choose the window, and let the lateness rule decide whether it can still change.

Model caption: More delay keeps the window open longer. Let measurement time choose the window, and let the lateness rule decide whether it can still change.

Back to the chapter