Enable providers to bucket data by fixed time windows #354
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.
Background
We've seen requests from Providers to have an easier to implement Provider API.
#268
According to @johnpena:
If Providers are able to bucket data into files of fixed time windows, and Provider API queries only touch a single bucket at a time, we can make our response times super fast! 💨
Proposal
This PR adds some restrictions/clarifications into MDS querying behavior that will allow Providers to bucket data into fixed time windows, and have efficient "single file" lookups under the hood.
Remove ability to query by
vehicle_id
ordevice_id
It's difficult to search using these fields if our data is solely indexed by time window. From the discussion in #268 it sounds like it isn't really used.
Add clarifying language that the number of results per page may vary, or even be zero.
This isn't technically a breaking change, but I thought it would be valuable to indicate that if providers bucket data by time window then certain buckets may not contain data, or the amount of data may vary.
Is this a breaking change
Yes, but hopefully with limited impact given my understanding of current Provider API usage.
Provider
oragency
Which API(s) will this pull request impact:
provider
Additional context
Add any other context or screenshots about the feature request here.