Yeah, sorry.
By server, I mean a grpc server running inside a co-routine.
I have a number of IoT devices connecting to a go grpc server. For each IoT device I want to offer a set of APIs for internal consumption.
The two solutions that came into mind are:
a. As soon as an IoT device connect, spawn a goroutine and run a proxy grpc server for the specific device. Any internal user that wants to use the APIs for the specific IoT device can connect to the proxy grpc server that will forward the requests to the IoT device.
b. Have just one grpc proxy server per go application and multiplex the requests and forward them to the IoT go-routines.
A feels a bit more distributed and requires less synchronization, but I don't know how well it will scale. Hence my question... Does it make sense?