RFC: WebSockets support in Massa API #3273
aoudiamoncef
started this conversation in
Ideas
Replies: 1 comment 8 replies
-
I think you can add some explanations on how you will fetch the datas from the differents modules. I think using channels could be great. Also I checked a bit how |
Beta Was this translation helpful? Give feedback.
8 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Problem
Actually, in order to explore Massa blockchain, ours consumers are using short pooling HTTP requests
which imply some drawbacks:
Proposition
Massa node tends to produce a consequent amount of data in real time which could be efficiently served over WebSockets.
The first proposed subscriptions tend to share the state of the Blockchain which was the most common usage from consumers feedbacks.
We'll implement a new JSON-RPC API which supports HTTP + WS. It'll unify the actual private and public API's. It'll be available as an experimental feature in the next release, new ports will be dedicated to it.
Websocket subscriptions
To be implemented:
Candidats:
Technical stack:
We'll use jsonrpsee crate as a server which supports both HTTP/WebSockets. It offers a bunch of features and tweaks as it’s based on tokio-tower and hyper crates. It’s already used in production ready project as substrate.
Beta Was this translation helpful? Give feedback.
All reactions