Client streaming from the web browser #254
-
Looking into "connect" currently - it's very nice, with clean generated code. Just one question regarding client-side streams: This page: https://connect.build/docs/go/streaming - says that:
This implies that https://github.com/grpc/grpc-web/blob/master/doc/streaming-roadmap.md
This indicates that client-streaming is not implemented in grpc-web yet. So I am having trouble understanding how connect implements the client-streaming with grpc-web. Is it actually not implemented? If not, that above sentence in the docs may be a bit confusing to others looking for client-streaming implementations (like me). |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
Great question :) To me, that document is confusing because it uses "gRPC-Web" to refer to two different things: a protocol and a specific Javascript implementation. The gRPC-Web protocol supports unary, client streaming, and server streaming RPCs with HTTP/1.1 or HTTP/2. If you have an HTTP/2 connection, it also supports bidirectional streaming. The The (Also, I'm going to convert this issue to a discussion. I haven't used discussions before, but we're giving them a try in this repo and this is a really good question!) |
Beta Was this translation helpful? Give feedback.
Great question :) To me, that document is confusing because it uses "gRPC-Web" to refer to two different things: a protocol and a specific Javascript implementation.
The gRPC-Web protocol supports unary, client streaming, and server streaming RPCs with HTTP/1.1 or HTTP/2. If you have an HTTP/2 connection, it also supports bidirectional streaming.
The
connect-go
implementation usesnet/http
, which has all the capabilities needed for all four RPC types. Soconnect-go
servers and clients will happily handle any RPC type using the gRPC-Web protocol.The
grpc/grpc-web
implementation runs in web browsers, which buffer request bodies and therefore can't do client or bidirectional streaming. The …