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

C++ gRPC-web client ?

Open NikolaiBirolini opened this issue 2 years ago • 1 comments

Hello everyone !

I want to use gRPC-web to print a login page. So I tested the echotest example and all the other examples, but I remarked that all the examples have this architecture :

web browser <-> gRPC javascript client <-> proxy <-> gRPC Backend server (C++, pthon, go ...)

Is it possible to replace this javascript client by a C++ client ?

If it's the case, can you advice me some examples ?

Thank you for your help,

NikolaiBirolini avatar May 27 '22 14:05 NikolaiBirolini

hi!

do you mean you want this instead?

A) web browser <-> c++ client <-> proxy <-> gRPC Backend server (C++, pthon, go ...)

Or this?

B) c++ client <-> proxy <-> gRPC Backend server (C++, pthon, go ...)

For A, i don't really know what that means..

For B, i think you can probably skip the proxy entirely and use the grpc c++ client? like this?

C) c++ client <-> gRPC Backend server (C++, pthon, go ...)

In any case, unless you use the javascript client it's outside of the scope of the grpc-web client since this project is web (browser) focused :)

Not sure if that makes sense.. :)

sampajano avatar May 27 '22 22:05 sampajano

I think what @NikolaiBirolini meant was a c++ implementation of a grpc-web client. I'm looking for that as well. I have a c++ program that is built as wasm using emscripten and runs in the browser. Hence it can only speak HTTPS to the outside and not plain grpc. For go, I successfully used https://github.com/ktr0731/grpc-web-go-client. Any suggestions for c++?

grefab avatar Apr 04 '24 21:04 grefab

Hey ! Yes, you're right but I found a solution for my project. To interface my web client with my gRPC server, I used envoy proxy

Le jeu. 4 avr. 2024, 23:40, Gregor Fabritius @.***> a écrit :

I think what @NikolaiBirolini https://github.com/NikolaiBirolini meant was a c++ implementation of a grpc-web client. I'm looking for that as well. I have a c++ program that is built as wasm using emscripten and runs in the browser. Hence it can only speak HTTPS to the outside and not plain grpc. For go, I successfully used https://github.com/ktr0731/grpc-web-go-client. Any suggestions for c++?

— Reply to this email directly, view it on GitHub https://github.com/grpc/grpc-web/issues/1248#issuecomment-2038278569, or unsubscribe https://github.com/notifications/unsubscribe-auth/AN6BLSLNYNBMOU5N3LFDTDLY3XCE3AVCNFSM5XEKZZFKU5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TEMBTHAZDOOBVGY4Q . You are receiving this because you were mentioned.Message ID: @.***>

NikolaiBirolini avatar Apr 04 '24 21:04 NikolaiBirolini

@grefab Thanks for sharing your understandings! Yeah i'm not quite aware of a C++ implementation of grpc-web. Maybe you could make your wasm library talk to our library using WebAssembly JavaScript API? Other I'm not quite aware of other solutions at the moment maybe you could look around some more :)


@NikolaiBirolini Glad that you have a solution now! I'll close this issue for now in that case. :)

sampajano avatar Apr 04 '24 22:04 sampajano

Thanks for the update! for now I am just using http put/get and that's enough at the moment.

grefab avatar Apr 09 '24 08:04 grefab