My project is to read an image in a server, do some processing and then pass the whole image to the client. Client takes up the image and do some more processing and returns some output values to the server. The image being used between both the server and client is of size [640x480x3].
Following are the various techniques that came in my mind to implement this problem:
variable recognised by gRPC in both server and client. In other words have the image in a shared memory of gRPC, which could be accessed by both the server and client (assuming both server and client to be in the same system).
gRPC doesn't (at the current time) support any kind of shared-memory transport between different processes on the same system in any of the language APIs. A close variant is the in-process transport that is supported by C++ and Java. This is used for sending messages between a client and a server in the same process (for example, if you want to run a proxy in the same address space as a server that might also have a direct external interface), and the only difference between this and traditional gRPC operations is at channel creation in both languages and when building the server in Java. The Java documentation for this is at https://grpc.io/grpc-java/javadoc/io/grpc/inprocess/InProcessServerBuilder.html . For C++, you just call Server::InProcessChannel on the server rather than grpc::CreateChannel since all servers automatically have an in-process capability in C++ as long as you have their pointer.
Hope that helps!
@vjpai
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