issues
search
rlay-project
/
rlay-client
Reference implementation of the Rlay client
https://rlay-project.github.io/rlay-client/
Apache License 2.0
4
stars
0
forks
source link
Websocket RPC pitfalls
#13
Open
hobofan
opened
5 years ago
hobofan
commented
5 years ago
12 added the websocket RPC, but there are some caveats with it:
Only one subscription per connection right now. Not sure how much impact that actually has with most clients, but should be resolved sooner or later.
Doubt if the way we consume the stream is the proper way to do it:
https://github.com/rlay-project/rlay-client/blob/93b7670decf015c7304868bae4ad6e472759405a/src/rpc/mod.rs#L96
For now it works well enough as it consumes all outstanding entities as fast as it can, but it introduces a delay of up to 100ms for any incoming entities
hobofan
commented
5 years ago
I think the websocket future streams also don't finish correctly when a websocket connection is closed.
12 added the websocket RPC, but there are some caveats with it: