-
Notifications
You must be signed in to change notification settings - Fork 829
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Expose SDK Sidecar GRPC Server as HTTP+JSON #240
Comments
@Kuqd I believe you've got some experience with grpc-gateway. What are your thoughts? |
My thoughts regarding grpc-gateway:
On our project we've stopped using it because we've dropped grpc and not vise-versa. I don't have any experience with envoy so I can't give feedback, but I've I would start with grpc-gateway and if required improve via a POC using envoy. If we have more time I'm happy to see someone take a shot at envoy to compare the end result before taking the decision. As @EricFortin would say:
For me the client gen is neat, and I feel like with grpc-gateway we keep that. |
@Kuqd I think you have basically 100% echoed my thoughts. It's also far better documented than Envoy in this regard as well. grpc-gateway it is! |
Copy pasted from discussion on chat for posterity:
|
Work happening over here: https://github.com/markmandel/agones/tree/feature/http+json |
Reviewed your code and I have 2 points. 1- Some directions for swagger scheme: 2- there is no graceful shutdown on sigterm sigkill, which happens if kubernetes wants to kill or reschedule a pod, in our case if we are unhealthy it will happen, not a biggie but it’s good practice to not leave dangling goroutine. May be for later. One side effect could be that code after serve grpc or http won’t be reached if forcefully killed. Right now it’s just log but even that is helping developers to understand what happens, later it could be resources cleanup or signaling controller or sending to events sink. 👏 PS: typo here https://github.com/markmandel/agones/blob/6af84cef36ebba2f4e7a3518485e992fe27eb7f8/sdk.proto#L31 |
Also I doubt swagger will generate a client that support the stream in health GRPC method, you could
|
There is a PR for go swagger-api/swagger-codegen#8199 |
This also replaces the C++ build image we have from the gRPC docker hub, with one that we manage ourselves, since getting updates in a timely matter was getting difficult. The C++ base will likely go away once the transition to REST based SDK, so the base may end up going away. This is prerequisite for googleforgames#240
This also replaces the C++ build image we have from the gRPC docker hub, with one that we manage ourselves, since getting updates in a timely matter was getting difficult. The C++ base will likely go away once the transition to REST based SDK, so the base may end up going away. This is prerequisite for googleforgames#240
This also replaces the C++ build image we have from the gRPC docker hub, with one that we manage ourselves, since getting updates in a timely matter was getting difficult. The C++ base will likely go away once the transition to REST based SDK, so the base may end up going away. This is prerequisite for #240
Implement grpc-gateway in front of the gRPC based sdk-server, so that it can be access via HTTP+JSON. This includes documentation and a swagger/openapi specificiation. This also has been implemented such that the sdk-server is still a single binary, and as such, the HTTP+JSON interface can still be used for local development. Closes googleforgames#240
Implement grpc-gateway in front of the gRPC based sdk-server, so that it can be access via HTTP+JSON. This includes documentation and a swagger/openapi specificiation. This also has been implemented such that the sdk-server is still a single binary, and as such, the HTTP+JSON interface can still be used for local development. Closes googleforgames#240
Implement grpc-gateway in front of the gRPC based sdk-server, so that it can be access via HTTP+JSON. This includes documentation and a swagger/openapi specificiation. This also has been implemented such that the sdk-server is still a single binary, and as such, the HTTP+JSON interface can still be used for local development. Closes googleforgames#240
Implement grpc-gateway in front of the gRPC based sdk-server, so that it can be access via HTTP+JSON. This includes documentation and a swagger/openapi specificiation. This also has been implemented such that the sdk-server is still a single binary, and as such, the HTTP+JSON interface can still be used for local development. Closes googleforgames#240
Implement grpc-gateway in front of the gRPC based sdk-server, so that it can be access via HTTP+JSON. This includes documentation and a swagger/openapi specificiation. This also has been implemented such that the sdk-server is still a single binary, and as such, the HTTP+JSON interface can still be used for local development. Closes googleforgames#240
This also replaces the C++ build image we have from the gRPC docker hub, with one that we manage ourselves, since getting updates in a timely matter was getting difficult. The C++ base will likely go away once the transition to REST based SDK, so the base may end up going away. This is prerequisite for googleforgames#240
Implement grpc-gateway in front of the gRPC based sdk-server, so that it can be access via HTTP+JSON. This includes documentation and a swagger/openapi specificiation. This also has been implemented such that the sdk-server is still a single binary, and as such, the HTTP+JSON interface can still be used for local development. Closes googleforgames#240
Implement grpc-gateway in front of the gRPC based sdk-server, so that it can be access via HTTP+JSON. This includes documentation and a swagger/openapi specificiation. This also has been implemented such that the sdk-server is still a single binary, and as such, the HTTP+JSON interface can still be used for local development. Closes #240
Overview
Provide a REST / HTTP+JSON interface to the SDK gRPC Sidecar service.
Motivation
Design
I see that there are two options, each with it's own pros and cons:
Envoy Proxy
We could do local development with a
docker run
command that runs both Envoy and the SDK in local mode.gRPC Gateway
(but looks like releases are fairly frequent)
Research
Envoy
grpc-gateway
The text was updated successfully, but these errors were encountered: