node-mole-rpc icon indicating copy to clipboard operation
node-mole-rpc copied to clipboard

Implement ping/pong mechanism

Open artemtrush opened this issue 2 years ago • 0 comments

Problem: we need to handle server availability for some transports (ws,mqtt) that don't support transport-level pings. WS actually support pings, but this API is not available in browser.

Solution: Create app-level ping/pong mechanism via exposing internal methods.

There is also an idea to return SERVICE_UNAVAILABLE error for callMethod until our ping succeeds. In this case, it also requires implementing some Fast-Recovery approach to increase ping frequency in case of error. But it seems a bit over-engineering for this task.

Autotests passed New tests added

artemtrush avatar Oct 10 '22 14:10 artemtrush