3 ms·
On the server I use WebSockets between peers. I use my own WebSocket implementation but I try to stay within RFC6455 even when not talking to browser just so t
by austin-cheney 4y ago
On the server I use WebSockets between peers. I use my own WebSocket implementation but I try to stay within RFC6455 even when not talking to browser just so that I have a uniform format processing.
I can see how protobuf would be handy if you are just talking only to a database or directly transmitting a binary BLOB, but I rarely do any of that. Most of my messaging are microservices used by the application so I just use JSON.stringify for each message. I know there is overhead to that, but it works well for me. I should probably find a way to pull my application data directly into a binary format and back out without string handling, but I have not figured this out yet. Instead of 7x faster than HTTP my message handling would be 10-11x faster than HTTP.