We're working on a project which requires the following:
- One web server to create user interface for end user;
- Many Raspberry devices, all have internet access;
- One intermediate server for an always-on service, which keep connections with RPi devices.
[1] Web server <=> [1] Intermediate server <=> [0..*] Raspberry Pi
We want the web server to communicate with RPi devices in the request/response manner via the intermediate server using ZeroMQ. The program running in RPi has its own Id string. The requests from the web server also carry the Id of the RPi program it wants to talk with. The intermediate server will see the Id of the RPi and forward the request to that connection. When receiving the response from RPi, the intermediate server will send the message back to the web server. Please recommend a suited pattern in ZeroMQ to this problem. Thank you very much!