Implement retries into WS and HTTP RPC
See original GitHub issueRight now, when we connect to WS(s) or HTTP(s) RPC, it only tries once. We should allow for retries before throwing completely.
Additionally, being able to retry the connection if we lose it would be helpful as well.
- Implement a queueing wrapper around
StreamingSocket
with a non-blocking send function - Implement reconnects that send messages from the queue via the new connection as soon as established
- Expose connected state (connecting, connected, disconnected) as a
ValueAndUpdates
field (Because we can. It is a fair API, but not strictly required for the product) - Make it possible for higher level applications to react to reconnects via a simple
reconnected
callback - Automatically reconnect on error/completion
- Automatically re-subscribe in tendermint-rpc
- Automatically re-subscribe in ethereum
Issue Analytics
- State:
- Created 5 years ago
- Comments:8 (8 by maintainers)
Top Results From Across the Web
WebSocket client - Retry - Ballerina language
Run the WebSocket service given in the Send/Receive message example. Run the client program by executing the command below.
Read more >WebSocketProvider handle ws close and reconnect #1053
I use this code to detect ws close and reconn. ... fork / integrate that into ethers.js with the json-rpc specifics simply built...
Read more >Top 5 async-retry Code Examples - Snyk
To help you get started, we've selected a few async-retry examples, based on popular ways it is used in public projects. Secure your...
Read more >JSON RPC API - Solana Docs
JSON RPC API. Solana nodes accept HTTP requests using the JSON-RPC 2.0 specification. To interact with a Solana node inside a JavaScript application,...
Read more >Comparing SOAP vs REST vs GraphQL vs RPC API - AltexSoft
In fact, some services are RESTful only to a degree. They have RPC style at the core, break down larger services into resources,...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Good point @ethanfrey
To break this down into smaller steps, I suggest
StreamingSocket
with a non-blocking send functionValueAndUpdates
field (Because we can. It is a fair API, but not strictly required for the product)reconnected
callbackI agree with the above list. I think it still has some utility even in smaller chunks, maybe a series of PRs.