-
Notifications
You must be signed in to change notification settings - Fork 29
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
Pagination support #193
Comments
Strongly agree with this. The current pagination is really only useful for limiting the number of tasks returned by Perhaps we could look at the GA4GH pagination style guide that is currently being drafted up by TASC in repsonse to this issue: ga4gh/TASC#29). It lists a couple of solutions and discusses pros and cons. |
It'd be nice to see pagination where user can:
Maybe setting up an extra cursor |
@andrewyatz: Do you think these use cases are covered in the TASC pagination guide? |
Pagination guide would suggest not using tokens for exactly these reasons and instead paging using counts/offsets. Tokens have been written up to prefer streaming & not that you cannot replay paginated streams (like in Kafka) it is implementation specific. I'd like to know if this is a "good" solution to the above |
Thanks @andrewyatz. @JaeAeich: Would either of the two solutions described in the GA4GH pagination guide draft address your use case? If not, please leave feedback 🙏 |
How would client be tolerant to the data its unaware of, ie, lets say I fetched page n, and while fetching page n + 1, the data set changes and an entry gets added to page n, this means I'll have a redundant entry which my client has already seen in page n. Page based
Client typically show the range of "pages" a specific user will have, ie if I request 5 items per page, I will expect 100/5 = 20 (say total 100) "pages", ie when on page n, pagination will show something like
I understand this might not be a problem for GUI, as result Token basedResponse doesn't have Use case visualizationPS: I think page_based would be preferred but would require breaking changes in cloud-component. |
Thanks for the insights here. It might be better to move some of these to the TASC repo but from the first points here Data tolerance Pages available
Do you think this is an issue? |
I agree that the first point should be left to implementers and that the second point is unusual and can easily be calculated by the client from the total number of records and the page size. I also agree that a token for the previous page may or may not be useful, sensible, possible for a given recommendation and so should not be recommneded as required. It could, however, be mentioned in a note or as an optional extension (it would be cool that all the implementations that make use of it use it in the same manner). |
This is great thank you. I've added these suggestions. Please see what you think especially as your comments are with respect to promoting consistency. Really appreciate this |
The current implementation of the
API
responses lacks adequate support for comprehensive pagination. The API solely offers anext_page_token
as a cursor to navigate to the next page. However, to access the previous page, it necessitatesclient-side
caching of the cursors. Additionally, essential pagination elements such as the total number of tasks and pages, are crucial for effective pagination.The text was updated successfully, but these errors were encountered: