helloworldyuhaiyang / grpc-gateway

Implementing a grpc gateway based on traefik. There is no need proto file, just turn on reflection of GRPC server.
0 stars 0 forks source link

Server streaming #1

Open notnooblord opened 7 months ago

notnooblord commented 7 months ago

Hi!

This is very cool project! 👍
I got it mostly working with my grpc backend, is it possible to implement server streaming buffer?

My backend has some methods with server streaming, but methods are always called with InvokeRpc. https://github.com/traefik/traefik/compare/master...helloworldyuhaiyang:traefik:feature-grpc#diff-4d68bff2a2e710f5f89e077108b48acec0be496e17e9a7bf209b1f4f206f44c5R143, so I'm getting error: "InvokeRpc is for unary methods; "..." is server-streaming".

I think server-streamed response should be buffered then marshalled as JSON.

helloworldyuhaiyang commented 6 months ago

I've never used a streaming server in gRPC, but I think it's a great idea. I'll find some time to implement it, or you could do it first and then share it with me.

notnooblord commented 6 months ago

Sadly I lack proper experience in golang to implement this properly.

I could try, but I also see couple of libs used are replaced now and traefik proxy also had some releases, so this will be very difficult for me 🥲

I'm willing to test if you have the time to implement this.

Currently using your work to make a dynamic proxy for http-to-grpc since we are having troubles with envoy and its grpc proxy. Only streaming is not working.