WebSocket is a low-level transport protocol which provides bidirectional communication channel between client and server. HTTP is only used for establishing the connection.
gRPC is a higher-level RPC framework which builds on top of HTTP/2. Bidirectional communication channel is provided by HTTP/2.
So the comparison here should be either between WebSocket and HTTP/2, or gRPC and some WebSocket framework, for example Socket.IO. WebSocket can be seen as obsolete technology compared to HTTP/2 for majority of use cases (exception being handling of binary data on JavaScript client). With emergence of HTTP/3 (aka QUIC) there's also a new web technology WebTransport.
0 views0

