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

Clarify trips and status changes response behavior #563

Merged
merged 1 commit into from
Nov 18, 2020

Conversation

jiffyclub
Copy link
Contributor

@jiffyclub jiffyclub commented Aug 18, 2020

In MDS 0.4.x we request trips and status changes for a given hour. A provider may have no data to report for the requested hour for multiple reasons, including:

  • The hour has not yet fully passed
  • The provider was not operational in the region during the hour
  • The provider has not yet completed processing that hour's data
  • No trips or events occurred during the hour

Differentiating the last two reasons is particularly important because it lets consumers of APIs know whether or not they need to re-request the hour at a later time. A successful 200 response with an empty list of data clearly communicates that the provider has nothing to report for that hour and that it's not necessary to try again later. Having this behavior consistent across providers would help us at Populus spend less time requesting data and reduce the number of requests received by providers.

@jiffyclub jiffyclub requested a review from a team as a code owner August 18, 2020 18:19
@jiffyclub jiffyclub requested a review from a team August 18, 2020 18:19
@schnuerle
Copy link
Member

schnuerle commented Aug 24, 2020

This seems like a good idea and change. Would like some community feedback on it and the wording.

@schnuerle schnuerle added the Provider Specific to the Provider API label Aug 24, 2020
@schnuerle schnuerle added this to the 1.1.0 milestone Aug 24, 2020
@Retzoh
Copy link
Contributor

Retzoh commented Aug 26, 2020

👍 to this. As an agency, it is a real problem to request a time range and not know if we should move on because there are no events there, or retry later because there is an error / the data is incomplete.

In MDS 0.4.x we request trips and status changes for a given hour.
A provider may have no data to report for the requested hour
multiple reasons, including:

- The hour has not yet fully passed
- The provider was not operational in the region during the hour
- The provider has not yet completed processing that hour's data
- No trips or events occurred during the hour

Differentiating the last two reasons is particularly important because
it lets consumers of APIs know whether or not they need to re-request
the hour at a later time. A successful 200 response with an empty
list of data clearly communicates that the provider has nothing to
report for that hour and that it's not necessary to try again later.
Having this behavior consistent across providers would help us at
Populus spend less time requesting data and reduce the number of
requests received by providers.
@jiffyclub
Copy link
Contributor Author

Bumping this to get it included in the 1.1.0 release.

@schnuerle
Copy link
Member

Thanks for the bump this is looking good for 1.1.0 unless there is some opposition to it. Tagging some provider members just in case @bhandzo @dirkdk.

@thekaveman thekaveman changed the base branch from main to dev November 5, 2020 18:33
@thekaveman
Copy link
Collaborator

Updated target branch to dev.

@schnuerle schnuerle merged commit 8dff867 into openmobilityfoundation:dev Nov 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Provider Specific to the Provider API
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants