I could successfully run a gRPC client
and gRPC server
in c++
now I wish to establish a communication between node A and gRPC server i.e. node B
as in the attached image.
Are there any examples which I can refer to below is what I am looking for.
I have this node A
with http
message (GET method) which I need to parse i.e extract the message and run the request on node C. What is that I should look for in between Node A and gRPC server.
Thanks in Advance
gRPC benefits gRPC uses HTTP/2 under the covers, but gRPC does not expose any of HTTP/2 to the API designer or API user. gRPC has already made all the decisions on how to layer the RPC model on top of HTTP so you don't have to—those decisions are built into the gRPC software and generated code.
Multiple gRPC clients can be created from a channel, including different types of clients. A channel and clients created from the channel can safely be used by multiple threads. Clients created from the channel can make multiple simultaneous calls.
gRPC users typically call these APIs on the client side and implement the corresponding API on the server side. On the server side, the server implements the methods declared by the service and runs a gRPC server to handle client calls.
Most of the times, if you have to use HTTP to contact a gRPC node, it most likely means that A is in fact a browser or browser-like environment, since you can simply instantiate a gRPC client on pretty much anything else.
If that's your situation, then I'd suggest having a look at grpc-web which aims to address that specific situation.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With