grpc-web icon indicating copy to clipboard operation
grpc-web copied to clipboard

Add support of bufbuild/protobuf-es

Open euskadi31 opened this issue 1 year ago • 3 comments

Hello,

Can you look at the possibility of using bufbuild/protobuf-es ?

See: https://github.com/bufbuild/protobuf-es

Thank You

euskadi31 avatar Jan 13 '23 08:01 euskadi31

I'd love to see this contributed, but if you're using protobuf-es, why not use https://buf.build/blog/connect-web-protobuf-grpc-in-the-browser too?

johanbrandhorst avatar Jan 13 '23 17:01 johanbrandhorst

I'd love to see this contributed, but if you're using protobuf-es, why not use https://buf.build/blog/connect-web-protobuf-grpc-in-the-browser too?

If I'm not mistaken, it doesn't support bidirectional streams.

euskadi31 avatar Jan 14 '23 22:01 euskadi31

I'd love to see this contributed, but if you're using protobuf-es, why not use https://buf.build/blog/connect-web-protobuf-grpc-in-the-browser too?

Connect-go forces to implement a custom interface which doesn't conform with the pure grpc. Like this

func (ps *PingServer) Ping(
  ctx context.Context,
  req *connect.Request[pingv1.PingRequest],
) (*connect.Response[pingv1.PingResponse], error) {

instead of

func (ps *PingServer) Ping(
  ctx context.Context,
  req *pingv1.PingRequest,
) (*pingv1.PingResponse, error) {

This is a blocker for my project were we can reuse grpc servers with 3 different transports: pure grpc, grpc-web and grtc (grpc over web-rtc data channel)

yurifedoseev avatar Nov 09 '23 02:11 yurifedoseev