lemmy
lemmy copied to clipboard
Use jsonrpc protocol for websocket
The protocol we currently use for websocket is extremely basic. I believe that the code could be simplified by switching to jsonrpc or similar.
This would also allow to unify the interface in lemmy-js-client for http and websocket. In other words, it would be easy to switch between http and websocket backends at runtime. That could be used to add a user setting for live mode (websocket) or slow mode (http). It would also allow to run Lemmy with websocket disabled on the server (might improve performance).
More details in https://github.com/LemmyNet/lemmy-js-client/issues/59