node-mole-rpc
node-mole-rpc copied to clipboard
Implement ping/pong mechanism
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