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

Clarifying pagination for GBFS free bikes #145

Closed
black-tea opened this issue Oct 17, 2018 · 7 comments
Closed

Clarifying pagination for GBFS free bikes #145

black-tea opened this issue Oct 17, 2018 · 7 comments

Comments

@black-tea
Copy link
Contributor

Issue
We haven't yet clarified how pagination should work for real time free bikes feed, and I've now seen a couple different ways that providers have either added/not added that information to get all the data.

Proposed Fix
Adding the same pagination requirements for the free bike status as we require for the status_changes and trips endpoints. Specifically, the free bike status output format should include a links dict, if the provider decides to paginate the results.

Thoughts? I can go ahead with a PR if people think this is a good idea. I don't see any other guidance on GBFS, but please let me know if I am missing something.

@thekaveman
Copy link
Collaborator

Hmmm... this is tricky, but it sounds like this amounts to tweaking the GBFS spec for the needs of MDS.

Might it be appropriate to raise this issue with GBFS, and see what that community thinks about a solution?

On the other hand, the GBFS wording almost seems to indicate that paging is not allowed (emphasis mine):

free_bike_status.json

Describes bikes that are not at a station and are not currently in the middle of an active ride.

Field Name Required
bikes Yes Array that contains one object per bike that is currently docked/stopped outside of the system as defined below

Maybe we can clarify in MDS our interpretation? Or see if GBFS can clarify?

@asadowns
Copy link
Contributor

Given the intention of the GBFS feed is to provide truly public information about realtime availability. I would lean towards not allowing pagination. Pagination would also be strange given the resutls also have a TTL which indicates the intention is to have a single periodically refreshed stream.

@black-tea
Copy link
Contributor Author

I like that rationale. My only question is as someone not providing data through an API, and thinking about something that is designed to scale upward (I'm guessing why some providers have decided to paginate on their own), will we reach a point that the number of free bikes just becomes too large to serve without paginating?

Would a better approach to restrict pagination, and if the queries get too large in the future we could think about some sort of geographic-based filtering?

@thekaveman
Copy link
Collaborator

I would again suggest taking those future-looking questions to the GBFS community vs. trying to define (or potentially re-define) something here in MDS.

@black-tea
Copy link
Contributor Author

Will do.

@hunterowens
Copy link
Collaborator

Thanks for opening that issue up in GBFS. I'm gonna close this here and hope that we get clarification from the NABSA folks. If we don't have a good answer before 0.3.0 I'll consider some sort of inclusion in MDS.

@heidiguenin
Copy link

GBFS has been updated to explicitly disallow pagination.

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

No branches or pull requests

5 participants