I have a client to connect multiple devices. For not paying monthly static IP fee per device. We plan to change the architecture. In this new architecture devices connect to a server. Instead of writing a server. I am looking for an intermediate solution.
Current Architecture:
-------------- ------------
| POLLER APP | ------------------------> | DEVICE 1 |
-------------- ------------
| |
| | ------------
| ---------------------------> | DEVICE 2 |
| ------------
|
| ...
|
| ------------
------------------------------> | DEVICE N |
------------
Poller app sequentially connects to every device with static IP.
Solution 1:
-------------- ------------
| SERVER | <------------------------ | DEVICE 1 |
-------------- ------------
A A
| |
| | ------------
| --------------------------- | DEVICE 2 |
| ------------
|
| ...
|
| ------------
------------------------------ | DEVICE N |
------------
In this solution (Which i don't prefer) I must write a server app for the devices that have dynamic IPs.
Solution 2 (Which I looked for):
------------
-------------- | | ------------
| POLLER APP | ------------------------> | X | <------------ | DEVICE 1 |
-------------- | | ------------
| | | |
| | | | ------------
| ---------------------------> | | <------------ | DEVICE 2 |
| | | ------------
| | |
| ------------
|
| ------------
------------------------------> | DEVICE S |
------------
X Box works as a server. Remote devices can connect to this box and Poller app can connect to this server locally or over Unix domain sockets. X Box repeats the messages that comes from local connection to remote devices.
My question is: Is there any complete or partial solution that can help me to achieve this. May I directly bind two incoming connection easily?