Hacker News new | past | comments | ask | show | jobs | submit login

I don't understand why GRPC would use HTTP2 as a default instead of WebSockets. HTTP was designed for transferring documents and resources in a way which maintains file types. When you're just transferring raw data, HTTP adds unnecessary overhead and complexity. WebSockets, on the other hand, was designed precisely for raw data transfers.



And the first thing that people do when they start using websockets is to define a message layer.

HTTP is designed for transferring media types. It can transfer the application/octet-stream if you want to transfer "raw" binary.

If want you want to do is stream binary data, there are better protocols than TCP or UDP for the purpose. The use of Websockets is a way to get binary streams through the HTTP "firewall hole" on port 80/443, not because it is more efficient.


There are bridge/tunnels out there. I use this with Unity client -> C# server (non-Unity): https://github.com/Cysharp/GrpcWebSocketBridge




Consider applying for YC's W25 batch! Applications are open till Nov 12.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: