-
Notifications
You must be signed in to change notification settings - Fork 224
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
rpc: Further improvements #582
Comments
I thought this was only for ABCI? Much of the RPC client is factored in such a way that supporting both sync and async shouldn't be that difficult, so I think it'd be weird to write an async wrapper for a sync client. As it were, the KMS transaction signer makes pretty extensive use of async RPC already... |
My understanding, given conversations with @ebuchman recently and issues like #318, is that we need to eventually settle on a broad approach to I/O that facilitates both async and sync access (beyond just ABCI and the RPC). If we eventually want to facilitate both, it seems like the easiest way right now to do so is to write mostly synchronous code and wrap it in async code. Not sure how that plays out with the use of event-driven networking though. The tickbox in this issue, however, relates purely to discussing and making architectural decisions along these lines. |
I left more or less the same comment about async RPC on #318. See this one in particular:
That makes sense for ABCI, where you can expose a synchronous API for running 3 threads, and then wrap each thread in channels. That's particularly advantageous given there are a number of different channel types to choose from depending on needs, and multiple ways to wrap up those channel-based APIs (tokio, tower, async-std). I don't think doing something like that for the RPC client makes sense. All of the high-quality HTTP clients (namely If you want to support both, |
Totally agreed here.
The WebSocket client is significantly more code, is intended to grow in functionality, and is deeply async. It may be useful in future sometime to do a spike where we build a non-async WebSocket client (with The core of what we're concerned about here is probably maintaining clear separation between "business logic" and the networking stack. It'd be great if we could somehow build common business logic throughout tendermint.rs that makes no prescriptions on whether to use async or not, and that can be plugged into async or non-async transport layers (which will need to be implemented separately, as you say). |
For the RPC client, much of that is already provided by |
I think the only thing left here on this issue at this point in time is to implement support for additional event types other than Additionally, we're keeping the RPC fully |
Building on #568, I'd like to recommend we implement the following improvements over time (this is a placeholder issue to keep track of what still needs improvement, from what I can currently see):
NewBlock
andTx
.Client
trait for theWebSocketClient
.The text was updated successfully, but these errors were encountered: