Implement a binary protocol instead of sending JSON over WebSockets #103

Open
opened 2024-09-20 21:03:03 +02:00 by liquidex · 0 comments
Owner

With how frequently rkgk sends out events, using JSON is extremely inefficient. It would be healthier to implement a binary protocol that doesn't repeat names as often.

I say "implement" and not "use" because I'd like a lightweight, holistic solution that works well for our use case. For instance we don't need version compatibility, as the app refreshes for everyone once we upgrade the server, and then clients download the updated version.

On the Rust side, we'll probably implement a custom serializer/deserializer, and we'll also generate code to handle the binary magic on the JavaScript side.

With how frequently rkgk sends out events, using JSON is extremely inefficient. It would be healthier to implement a binary protocol that doesn't repeat names as often. I say "implement" and not "use" because I'd like a lightweight, holistic solution that works well for our use case. For instance we don't need version compatibility, as the app refreshes for everyone once we upgrade the server, and then clients download the updated version. On the Rust side, we'll probably implement a custom serializer/deserializer, and we'll also generate code to handle the binary magic on the JavaScript side.
liquidex added the
c:rkgk backend
c:rkgk frontend
labels 2024-09-20 21:03:11 +02:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: liquidex/rkgk#103
No description provided.