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

[cli] Fix benchmarks by implementing proper subscription management in our client #1626

Open
clangenb opened this issue Oct 27, 2024 · 2 comments

Comments

@clangenb
Copy link
Contributor

clangenb commented Oct 27, 2024

The benchmarks have been relying on the fact that we are not JSON RPC 2.0 compliant, but they have been broken with #1623.

In order to fix them, we need our client to be able to handle multiple requests/subscriptions in one websocket connection. Before, the benchmarks were just lucky to have been able to handle multiple requests on one connection.

This essentially means that we need to implement this code for the client: https://github.com/encointer/encointer-js/blob/master/packages/worker-api/src/rpc-provider/src/ws/index.ts.

@clangenb clangenb changed the title Fix benchmarks by implementing proper subscription management in our client [cli] Fix benchmarks by implementing proper subscription management in our client Oct 27, 2024
@brenzi
Copy link
Collaborator

brenzi commented Nov 2, 2024

.....or use node for benchmarking? (I can't beleive I'm proposing this)

@clangenb
Copy link
Contributor Author

clangenb commented Nov 2, 2024

Hahah, not sure if node will hit performance limits before our worker.

But it might be beneficial anyhow to implement a better client. I mean, on the typescript side, we can use now parity's WS-provider without any changes, so we might be able to use parity's jsonrpsee client too instead of the low level inplementation we have here?

If we are lucky this can be done in a day, as it only affects the client, not the worker.

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