Skip to main content

Module session_window

Module session_window 

Source
Expand description

Session window processing for geospatial event streams.

A session window groups events that occur within gap_duration of each other. When a gap larger than gap_duration is detected between consecutive events, the current session closes and a new one starts automatically.

Additional v2 features:

  • Configurable minimum session size (sessions with fewer than min_events events are silently discarded).
  • Maximum session duration guard: a session that exceeds max_session_duration is force-closed even if no time-gap has been detected.
  • flush() to close the currently open session at end of stream.

Structsยง

SessionWindow
A closed session window containing all events that fell within the session.
SessionWindowConfig
Configuration for the session window processor.
SessionWindowProcessor
Stateful processor that groups a time-ordered event stream into session windows.
StreamEvent
A single typed event in the stream, carrying a wall-clock timestamp and a monotonically increasing sequence number.