Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
[RPC] Add RPC long poll notifications #7949
Conversation
|
I like the concept of being able to listen for events through http, however I think this is severely limited by having server-side state, limiting the number of listeners to only one. What I'd personally prefer is, instead of longpolling, to subscribe to a 'stream' of events (e.g. websocket or just chunked encoding), where the set of events to listen to is in the request. This avoids having to store any client-state in the server - at least for longer than the request lasts. |
Right. The current implementation limits to only one listener. Extending this PR so it would support a client chosen UUID would not be very complicated (a set of queues and a set of registered notification types). Clients could register notification types along with a client-chosen UUID. |
jonasschnelli
added the
RPC/REST/ZMQ
label
Apr 26, 2016
|
Added a commit that allows multiple clients at the same time. The new RPC commands require now a There is currently not max client limit and no way to remove clients (though you can unregister all notification types but not empty the current queue). |
|
Rebased. |
MarcoFalke
and 1 other
commented on an outdated diff
May 6, 2016
|
Rebased. |
jonasschnelli
added some commits
Apr 26, 2016
This was referenced Jul 12, 2016
|
Gah we need to take a look at this again after 0.14 is released. |
|
Yes. Sure. I'll try to re-base and overhaul this soon. |
jonasschnelli commentedApr 26, 2016
Reasons for another notification interface
How does it work
pollnotificationRPC command.pollnotificationcommand will immediately response.Downsides
New RPC calls
setregisterednotifications [<notificationtype>](possible types arehashtxandhashblock)getregisterednotificationspollnotificationsMissing
I'd like to use a such interface to work on a remote GUI (use case: GUI on your local desktop, node on a VPS).