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

implements request batching #70

Merged
merged 2 commits into from
Dec 31, 2024
Merged

Conversation

stopfstedt
Copy link
Member

@stopfstedt stopfstedt commented Dec 28, 2024

fixes #69

i decided to apply chunking/batching on all requests if applicable, not just for users requests.

note on the reduced request params limit - 250 is on the safe side, 1000 was not.

for context - the previous, cURL-based HTTP client in use was not encoding request parameters, whereas the new, Guzzle-based HTTP client does. which makes for much more verbose URLs.

for example, see these logged requests on the server-side:

Moodle 4.3, cURL client (ignore the limit query param)
GET /api/v3/users?limit=1000&filters[id][]=4520&filters[id][]=7572&filters[id][]=7584&filters[id][]=7616&filters[id][]=7634&filters[id][]=7655&filters[id][]=7674&filters[id][]=7794...

vs Moodle 4.4, Guzzle client

GET /api/v3/users?filters%5Bid%5D%5B%5D=4520&filters%5Bid%5D%5B%5D=7572&filters%5Bid%5D%5B%5D=7584&filters%5Bid%5D%5B%5D=7616&filters%5Bid%5D%5B%5D=7634&filters%5Bid%5D%5B%5D=7655&filters%5Bid%5D%5B%5D=7674&filters%5Bid%5D%5B%5D=7794...

prep-work to implement request batching.
@stopfstedt stopfstedt force-pushed the batch_requests_by_ids branch 2 times, most recently from 93eb8e1 to 09fe869 Compare December 28, 2024 00:47
@stopfstedt stopfstedt force-pushed the batch_requests_by_ids branch from 09fe869 to e7dffd7 Compare December 28, 2024 01:28
@stopfstedt stopfstedt requested a review from jrjohnson December 28, 2024 01:28
@stopfstedt stopfstedt marked this pull request as ready for review December 28, 2024 01:28
Copy link
Member

@jrjohnson jrjohnson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks solid and thorough. Approved.

@jrjohnson jrjohnson merged commit 86d30e5 into ilios:main Dec 31, 2024
4 checks passed
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

Successfully merging this pull request may close these issues.

batch requests on user endpoint
2 participants