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

feat: rpc batch requests #1125

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from

Conversation

ugur-eren
Copy link

@ugur-eren ugur-eren commented May 13, 2024

Motivation and Resolution

The BatchClient class allows requests to be batched together, either by the interval amount, or at the end of the callback queue if set to 0. By batching requests, we can reduce the overhead associated with handling individual requests, optimize resource utilization and improve overall performance.

Request:
Screenshot 2024-05-13 184213

Response:
Screenshot 2024-05-13 184236

closes #758

Usage related changes

  • batch option added to RpcProvider options.

Development related changes

  • BatchClient class created to manage batching of requests.

Checklist:

  • Performed a self-review of the code
  • Rebased to the last commit of the target branch (or merged it into my branch)
  • Linked the issues which this PR resolves
  • Documented the changes in code (API docs will be generated automatically)
  • Updated the tests
  • All tests are passing

@ugur-eren ugur-eren marked this pull request as draft May 13, 2024 16:49
@ugur-eren ugur-eren marked this pull request as ready for review May 14, 2024 10:19
@tabaktoni
Copy link
Collaborator

I haven't gone into details yet, on first look, it seems good, but we need tests.
Can you please add tests for new Classes and Batch requests, we must have tests for it before merging.
Can you add a section to www/ documentation about usage? (optional - this can be done in separate PR)

@tabaktoni tabaktoni added the pending need update label Jun 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pending need update
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[V6] Implement RPC Batch
2 participants