-
Notifications
You must be signed in to change notification settings - Fork 795
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
Extensions to the websocket API #1901
Comments
Thanks for testing the WebSockets feature and initiating the discussion! The possibility of using it as an RPC came up earlier. Given the full duplex nature of WS we'd need a common request/reply correlation system, or look into something like the WAMP sub protocol. |
For reference, I have the vote subscription here: guilhermelawless@5a40e4e Surprisingly easy to set it up; can PR whenever. |
The vote subscription only provides a subset of the votes in the node, and does not separate by vote type (e.g. a replay, a locally generated vote, etc). One idea would be to have multiple subscriptions to votes, possibly using the same options for each one. |
Further ideas:
|
PoW-related notifications: #2289 |
This adds the idea of incremental filter updates: #2566 |
The socket replacing HTTP callback is well built and can immediately support extensions with little development effort.
One way to extend will likely be to add account filters in order to minimize the number of unnecessary messages broadcasted to clients.
I would like to discuss if it is possible to add other kinds of extensions. One example I have already built is broadcasting all vote messages received:
Other extensions in mind:
In my opinion, having the power of getting notifications of any kind from the node to any service is quite powerful.
The discussion falls into the usual "Should we have addons in the node?". I would argue that developers have enjoyed the benefits of having a thorough RPC and by extension, this could help people analyze data by not requiring them to build a packet sniffer (and keep it updated with the protocol).
It is inherently optional as I have to actually subscribe to it through the websocket, specifying a topic.
The text was updated successfully, but these errors were encountered: