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

Pagination of Porter responses #3

Open
derekpierre opened this issue May 20, 2021 · 5 comments
Open

Pagination of Porter responses #3

derekpierre opened this issue May 20, 2021 · 5 comments
Labels
enhancement New feature or request

Comments

@derekpierre
Copy link
Member

Related to nucypher/nucypher#2703.

If the responses for Alice endpoints /get_ursulas and potentially /revoke can be too large, we can think about paginating the response. See nucypher/nucypher#2666 (comment) for some context.

@cygnusv
Copy link
Member

cygnusv commented Aug 7, 2021

@derekpierre is this done in nucypher/nucypher@f384c7e?

@derekpierre
Copy link
Member Author

@derekpierre is this done in f384c7e?

This issue is still outstanding. The referenced commit is related to pagination of the list of stakers obtained from the smart contract i.e. the back end call. However, this issue is specific to the front end side (endpoint response to the request) i.e. if the user's request asks for something like 500 ursulas, do we return all 500 in a single large response result (as we do now), or do we limit the number that can be returned in a single response and allow for follow-on requests to obtain the remainder of ursulas. One of the concerns here is having to cache sampling results for a period of time as opposed to being totally stateless - see nucypher/nucypher#2666 (comment).

@derekpierre
Copy link
Member Author

To clarify, this didn't seem absolutely necessary for an MVP. Do you feel differently?

@cygnusv
Copy link
Member

cygnusv commented Apr 4, 2022

@derekpierre is this done?

@derekpierre
Copy link
Member Author

derekpierre commented Apr 4, 2022

No.

This issue is around the question of what if someone wants to sample for a large quantity of nodes - do we return all the information in one response (which is what we do now), or split the response into paginated responses.

For example, if someone called getI_ursulas and wanted 200 ursulas, does the response contain all information for the 200 ursulas, or do we paginate the response in batches of 50. Note Porter would still have to sample for the full 200 nodes , and then save state, to respond to requests for subsequent response pages by the user. The issue here being that Porter has to save some state for subsequent responses to the original request.

@KPrasch KPrasch transferred this issue from nucypher/nucypher Oct 28, 2022
@KPrasch KPrasch changed the title Potential pagination of Porter responses for Alice Pagination of Porter responses for Alice Oct 18, 2023
@KPrasch KPrasch added the enhancement New feature or request label Oct 18, 2023
@KPrasch KPrasch changed the title Pagination of Porter responses for Alice Pagination of Porter responses Aug 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants