Skip to content
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

Is there any plan to developing a C++ version? #15

Closed
lwmonster opened this issue May 12, 2015 · 7 comments
Closed

Is there any plan to developing a C++ version? #15

lwmonster opened this issue May 12, 2015 · 7 comments

Comments

@lwmonster
Copy link

Is there any plan to develop a C++ version? :)

@yugui
Copy link
Member

yugui commented May 12, 2015

No, I don't have any plan to do.

I wonder why you need C++ version. Since it generates a reverse-proxy, it does not restrict the language in which you implement your gRPC server.
Also I don't think C++ version will significantly improve the performance of the proxy.

They only benefit which comes to my mind is that C++ version would be able to support arbitrary message without rebuilding the proxy because C++ has a support of DynamicMessage.

What do you think?

@yugui
Copy link
Member

yugui commented May 13, 2015

The question seems to be resolved.

https://groups.google.com/d/msg/grpc-io/JnjCYGPMUms/2TSnRPm7E7cJ

@yanivx
Copy link

yanivx commented Apr 18, 2018

Hi All,

Is there any C/C++ api gateway developed as on today if not are there any examples I can refer to understand how I can link this reverse-proxy with my gRPC server written in C++

@yugui
Copy link
Member

yugui commented Apr 22, 2018

Is there any C/C++ api gateway developed as on today

AFAIK, no.

are there any examples I can refer to understand how I can link this reverse-proxy with my gRPC server written in C++

It is probably possible to link the generated go code with C++ server since CGO can generate a shared library.
But can I confirm what you really need in case? For what purpose are you trying to link the reverse-proxy to your gRPC server? For reducing network latency? For simplicity of deployment and monitoring?
If it is for network latency, I don't think linking solves the problem because the reverse proxy still communicates with the gRPC server over TCP or a unix domain socket.

@yanivx
Copy link

yanivx commented Apr 23, 2018

client server

This is what I am looking for.

It is probably possible to link the generated go code with C++ server since CGO can generate a shared library.

But How ? I am new to this and will be really helpful If I find some example to do it.

@yugui
Copy link
Member

yugui commented Apr 25, 2018

untitled drawing

This is how grpc-gateway usually works. So you don't need dive into the complicated world of error handlings, concurrency and garbage collection in CGO.

With CGO, in theory it is still possible to run the reverse-proxy server in the same process as the gRPC server. But usually it is not very beneficial.
https://github.com/yugui/grpc-gateway/tree/example/embed/examples/cmd/example-cxx-server.

@yanivx
Copy link

yanivx commented Apr 25, 2018

Thank you so much @yugui 😃

ithinker1991 referenced this issue in tronprotocol/grpc-gateway Apr 26, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants