Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Event Aggregation #124

Merged
merged 1 commit into from
Jan 7, 2025
Merged

Event Aggregation #124

merged 1 commit into from
Jan 7, 2025

Conversation

iyourshaw
Copy link
Collaborator

@iyourshaw iyourshaw commented Dec 2, 2024

Adds event aggregation as specified in the Preliminary Design Details document.

Adds aggregation for the following events:

  • Intersection Reference Alignment Event
  • Signal Group Alignment Event
  • SPaT Minimum Data Event
  • MAP Minimum Data Event
  • Signal State Conflict Event
  • Time Change Details Event
  • Event State Progression Event
  • Message Count Progression Event (BSM, MAP, and SPaT)

Configuration

Each event that can be aggregated has a configuration setting to enable or disable aggregation, for eample bsm.message.count.progression.aggregateEvents. Aggregation is enabled by default. When aggregation is enabled, only aggregated events are written to Kafka topics.

Key config settings:

  • aggregation.interval: The aggregation interval, default 60
  • aggregation.intervalUnits: Default SECONDS

Implementation Details

The key classes that implement the aggregation algorithm are:

All the aggregation topologies inherit from BaseAggregationTopology

The aggregated events all inherit from the EventAggregation class.

Each event that produced notifications also has a corresponding NotificationAggregation added.

See also the related PR for ode-utils that adds new topics for the aggregated events and notifications:
usdot-jpo-ode/jpo-utils#15

Testing

Adds unit tests for each of the new aggregation topologies.

Ran the following integration tests scripts:

  • Script-SPAT-MAP-unaligned.csv
  • SPAT_TimeChangeDetails.csv
  • SignalGroupAlignment-unaligned.csv
  • Script-SignalStateConflict-Protected.csv
  • MAP_MinData.csv
  • SPAT_MinData.csv
  • SPAT_EventStateProgression.csv
  • BSM_Revisions.csv
  • ProcessedSpat_Revisions.csv
  • ProcessedMap_Revisions.csv

@iyourshaw iyourshaw marked this pull request as ready for review December 5, 2024 21:31
@iyourshaw iyourshaw requested a review from John-Wiens December 5, 2024 21:31
@John-Wiens John-Wiens closed this Jan 7, 2025
@John-Wiens John-Wiens force-pushed the data-management-event-aggregation branch from 4b10e55 to e9af9b8 Compare January 7, 2025 23:02
@John-Wiens John-Wiens reopened this Jan 7, 2025
@John-Wiens John-Wiens merged commit 7eba108 into develop Jan 7, 2025
6 checks passed
@John-Wiens John-Wiens deleted the data-management-event-aggregation branch January 7, 2025 23:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants