Closed Ari24-cb24 closed 1 year ago
Couldn't you use a port of DataInputStream to JS for metadata?
To improve ws performance, the following approach should be considered:
* A chunk of Packets should be collected, compressed and then send via websocket * Packet data should be reduced by a lot (e.g.) * Do not include packet metadata (such as packet name), only the packet id * Field names should be reduced to a single character * When connecting, a mapping is being send via websocket which includes the actual names of the variables * Maybe considering a shorter format than json
Packets could be sent to the frontend using the original protocol form prepended with the packet state (s>c/c>s) and some other metadata (received at, ...) encoded into a header.
Websockets should be able to handle this stream of binary data
Implemented at #19
I still use json data but in a more convenient way and with much less data at all. Might switch over to a stream of binary data but this should be sufficient for now as I need to develop some other things in the meantime.
To improve ws performance, the following approach should be considered: