3 ms·
We use jsonrpc over websockets in production for many years in trading services. It works very well. We use lightweight libraries that look like this [0] and th
by mirekrusin 4y ago
We use jsonrpc over websockets in production for many years in trading services. It works very well. We use lightweight libraries that look like this [0] and this [1]. It's lightweight, fast, type safe, easy to maintain and debug etc.
We use (compatible) extension of jsonrpc for async generators - yielding elements individially for longer array responses, transparent to the client, to avoid head of line blocking (haven't open source this yet, but will soon).
Other than allowing error code to be string it's all pure jsonrpc 2.0.
Supporting things like adaptive throttling (that dynamically adapts to client's connection speed) was very easy to implement as well.
[0] https://github.com/preludejs/jsonrpc https://github.com/preludejs/jsonrpc
[1] https://github.com/preludejs/refute https://github.com/preludejs/refute