If all the function calls are unary, then It seems to me, it would be 
probably easier to use some existing publish-subscribe system, rather than 
a bare gRPC.
In such a setup, each function would  have its "requests topic", to which a 
caller (PC in your case) would publish request messages and subscribed 
devices would process it. Replies from the devices could be either sent to 
function's corresponding "replies topic' (actually for replies a queue may 
be better than a topic) to which the caller was subscribed, OR directly to 
the caller via an unary call (gRPC or other) with void return type.
Alternatively there could be just 1 topic for all the functions and each 
request message would contain a function id and a "polymorphic" list of 
arguments specific to the given function.

If some of the calls are streaming, then gRPC is probably still your best 
option, but it may depend how tightly request and reply streams are related 
(for example whether replies from devices will have an impact on the 
content of subsequent request messages and whether reply messages from a 
given device impact subsequent requests messages for this device only or 
for all devices).

Cheers!

On Monday, October 18, 2021 at 11:09:45 PM UTC+7 Fabiano Ferronato wrote:

> I have a problem to solve: one computer (PC) will send requests to many 
> devices (e.g. RPi). The devices will execute the request and respond.
>
> Is it possible to use gRPC ? 
>
> From the documentation (Introduction) it shows the opposite: clients 
> sending requests to a server. So maybe I'm going the wrong way choosing 
> gRPC.
>
> Any help is much appreciated.
>
>
>  
>

-- 
You received this message because you are subscribed to the Google Groups 
"grpc.io" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to grpc-io+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/grpc-io/03c30d92-5b0a-46eb-9d4a-01e6cb3d8e8an%40googlegroups.com.

Reply via email to