JSON-RPC provides a means of exposing a user interface for the solar node. This means that MUXRPC is only used for node-to-node interactions (primarily replication).
Why websockets?
Can be queried natively and in-browser without much hassle.
jsonrpsee is based on the tokio runtime. Since solar is based on async_std, this means we would have to run two async runtimes during the execution of solar. I deem this to be an unacceptable resource burden. jsonrpc-ws-server is synchronous and lightweight.
This PR introduces a new JSON-RPC actor with two endpoints: ping and whoami. It shuts down gracefully when a termination signal is received from the broker. More endpoints to follow.
JSON-RPC provides a means of exposing a user interface for the
solar
node. This means that MUXRPC is only used for node-to-node interactions (primarily replication).Why websockets?
Can be queried natively and in-browser without much hassle.
Why https://crates.io/crates/jsonrpc-ws-server and not https://crates.io/crates/jsonrpsee-ws-server?
jsonrpsee
is based on thetokio
runtime. Sincesolar
is based onasync_std
, this means we would have to run two async runtimes during the execution ofsolar
. I deem this to be an unacceptable resource burden.jsonrpc-ws-server
is synchronous and lightweight.This PR introduces a new JSON-RPC actor with two endpoints:
ping
andwhoami
. It shuts down gracefully when a termination signal is received from the broker. More endpoints to follow.