linera-protocol icon indicating copy to clipboard operation
linera-protocol copied to clipboard

Make the Web RPC client respect node timeouts and retries

Open Twey opened this issue 1 year ago • 1 comments

In #1738 we add the ability to connect to the Linera validator RPC service from a Web browser or other JavaScript environment. However, the means of implementation (the Web standard fetch call) does not support timeouts or retries out of the box. These can be implemented on top, but require further wasm-bindgen wizardry to implement a solution based on AbortController and a retry loop. To unify the behaviour of the Web and native interfaces, we should really make sure the Web interface interprets its NodeOptions the same way as the native interface.

Twey avatar Mar 22 '24 13:03 Twey

tonic-web-wasm-client now supports setting the timeout on the request (since this https://github.com/devashishdxt/tonic-web-wasm-client/pull/77) unfortunately this timeout applies to ALL requests, including the ValidatorNode#Subscribe which is a stream-ing response, long-lived. We don't want it canceled but the timeout fires and cancels the request.

deuszx avatar Sep 09 '25 15:09 deuszx