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

Test vehicle-positions.pb #107

Open
owades opened this issue Feb 22, 2022 · 7 comments
Open

Test vehicle-positions.pb #107

owades opened this issue Feb 22, 2022 · 7 comments
Labels
enhancement New feature or request

Comments

@owades
Copy link
Member

owades commented Feb 22, 2022

We need to create regular tests to run on our vehicle-positions RT feed to ensure they're working as expected. Create logic to check each live agency's RT feed every X minutes, and report on the results. We should be able to compare this report in some way with the nightly GRaaS report.

  1. Set up the gtfs-realtime-bindings python classes. 2. Create a script that checks the PB and reports a summary of what it sees (# agencies, # vehicles per agency)
  2. Create logic that runs the above script once per X minutes, and logs the results. This should likely be another google datastore entity.
  3. Create a way to summarize the results.
@owades owades added the enhancement New feature or request label Feb 22, 2022
@unreasonableman
Copy link
Collaborator

unreasonableman commented Feb 22, 2022

@owades I would suggest the following (some of this was discussed in our triage meeting today):

  • the pb test script runs on an "always-on" machine, like a raspberry pi
  • the script connects to the position-update feed for each onboarded agency and logs how many vehicles are present in the feed at that time. Logs are kept local
  • once a day, the script sends an update to the DB. The update could be a JSON array with an element for each agency that lists:
    • total number of vehicles present in the agency's feed that day. This could include both a "raw" update count that just says how many vehicle records were present, and a unique vehicle count that shows how many distinct vehicles were tracked
    • minimum, average and maximum number of vehicles present in an update

That is probably enough for the MVP. We can get fancier later with keeping track of consecutive updates show a particular vehicle, etc.

@evansiroky
Copy link
Member

Hello GRaaS team. The data-services team is working on building out a GTFS-RT data consumption pipeline. Is this something that could be used here in a similar way as was done with cal-itp/data-infra#997?

@owades
Copy link
Member Author

owades commented Feb 23, 2022

Thanks @evansiroky, we're absolutely interested. What would be a good way to stay in the loop and/or make our needs known?

@evansiroky
Copy link
Member

Right now, we're working on a number of items, but the one issue that y'all would probably be most interested in is that we're planning on running all RT feeds that get downloaded through the gtfs-realtime-validator tool to check for errors. It's a decent lift, but we're tracking the buildout of the pipeline in cal-itp/data-infra#1009 and then having the ability to analyze in metabase which is tracked in cal-itp/data-infra#570.

@unreasonableman
Copy link
Collaborator

unreasonableman commented Feb 23, 2022 via email

@evansiroky
Copy link
Member

Checking for errors is an important aspect, but we're also very interested in tracking stats such as overall volume of position updates, number of tracked vehicles per day, etc.

Actually, we could probably answer those questions with our existing infrastructure since we have a pipeline built out for the vehicle positions in particular. We would just need to add the GRaaS feeds to the https://github.com/cal-itp/data-infra/blob/main/airflow/data/agencies.yml file to begin consuming that data. If we're looking to match that with information from the static feed, that might be a little more effort

@unreasonableman
Copy link
Collaborator

unreasonableman commented Feb 23, 2022 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants