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

Real-time improvements for MDS Policy #906

Open
schnuerle opened this issue May 31, 2024 · 0 comments
Open

Real-time improvements for MDS Policy #906

schnuerle opened this issue May 31, 2024 · 0 comments
Labels
Policy Specific to the Policy API
Milestone

Comments

@schnuerle
Copy link
Member

schnuerle commented May 31, 2024

Is your feature request related to a problem? Please describe.

While MDS Policy can be real-time if required by the city 1) the spec doesn't explicitly say this and 2) there is not a good way to get the latest policy because the entire policy has to be downloaded to be checked for an update.

Describe the solution you'd like

Language Update

Update the frequency language to state that real-time is possible, and set a recommended minimum threshold (eg, every 1 minute at most).

Last Updated Check

Add a new last_updated boolean query parameter to the /policies endpoint that returns only the version, last_updated, end_date fields, like so:

{
  "version": "2.0.0",
  "last_updated": 1570035222868,
  "end_date": 1570035222868
}

This creates a quick check option and small file size to allow an operator to check for any update in the file easily and regularly.

Only Active Policies

Add a new active_only boolean query parameter to the /policies endpoint that returns only the current active and future policies, not the retired/previous policies.

This would reduce the file size for many use cases where you do not always need to know the previous policies. Any policy that is a prev_policies would not be returned. However, the array of prev_policies still will be returned for reference as part of any relevant active policy.

Examples and Diagram

To help with clarity, examples for emergency response should be added to the spec as well, possibly from Seattle's data feeds as covered in our June 6 working group meeting.

Would also like to add a diagram on the Policy page that shows the hierarchy of policy to rules to rates, and to previous policies. Maybe using something like Mermaid which is built into GitHub now.

Is this a breaking change

  • No, not breaking

Impacted Spec

  • policy

Describe alternatives you've considered

There has also been talk of making this endpoint a push endpoint option, in addition to the existing pull option, like we do with Agency and Provider for operator data. But this complexity may not be needed if the recommended solution above is adequate. May be a consideration for a breaking change in 3.0.

Additional context

This was discussed a few times at OMF member steering committee meetings, and at public working groups, in the context of supporting real-time emergency response using Policy for AV robotaxis to support #905

@schnuerle schnuerle added the Policy Specific to the Policy API label May 31, 2024
@schnuerle schnuerle added this to the 2.1.0 milestone May 31, 2024
@schnuerle schnuerle pinned this issue May 31, 2024
@schnuerle schnuerle changed the title Real-time support for MDS Policy Real-time improvements for MDS Policy Jul 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Policy Specific to the Policy API
Projects
None yet
Development

No branches or pull requests

1 participant