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

Add pagination to the get all operation #7

Open
jwalcorn opened this issue Apr 21, 2022 · 2 comments
Open

Add pagination to the get all operation #7

jwalcorn opened this issue Apr 21, 2022 · 2 comments

Comments

@jwalcorn
Copy link
Member

Right now, the GET operation that takes no ID path param, used by the Summary JSP in the UI, does an open-ended query of all accounts in the CouchDB database. If you had thousands, this would obviously be very expensive. Need to add a way to ask for the first 20 or whatever, with some explicit "order by", ensuring we get the same 20 that Portfolio would get from its PostgreSQL (or whatever relational database you picked), and then a way to advance to the next page of output, and so on. @rtclauss's performance tests in Istio/CloudWatch/Kiali suggest this "get all" to CouchDB is the current bottleneck in Looper stress runs.

@jwalcorn
Copy link
Member Author

related to IBMStockTrader/broker#5

@rtclauss
Copy link
Contributor

This could also be a new API. Then the "getAll" would still be in the app but be deprecated and eventually removed.

Note we may also need to do this in portfolio, too.

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

2 participants