feat: don't send updates for which newer info was sent#32
Merged
optionsome merged 4 commits intoHSLdevcom:masterfrom Dec 8, 2025
Merged
feat: don't send updates for which newer info was sent#32optionsome merged 4 commits intoHSLdevcom:masterfrom
optionsome merged 4 commits intoHSLdevcom:masterfrom
Conversation
Member
|
I wonder if it would be enough to maintain the latest feed timestamp and compare a new message against it instead of doing it on a per trip level? I guess then some messages that you should get have slightly older timestamp than the "newest" message? I'm just slightly worried how much this increases the memory consumption. |
Contributor
Author
|
You are right. I reverted the former approach and just skip feed processing, if the feed is older than the one seen before. |
Contributor
Author
|
@optionsome WDYT? |
optionsome
approved these changes
Dec 8, 2025
Member
optionsome
left a comment
There was a problem hiding this comment.
We can at least try how this works.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR stores the message-timestamp of the latest sent message per tripId and skips messages older than this timestamp.
Background of this addition: our local transit agency apparently uses multiple load balancing servers to serve gtfsrt feeds, which sadly are not in sync. This results in vehicles jumping back and forth on the map, as for subsequent calls older positions are sent after the vehicle already has moved forward.
Please let me know, if you are willing to accept this workaround for a misbehaving gtfsrt producer as upstream contribution. Otherwise, we'll consider running a custom fork.