I am developing an application which must run on up to thousands of client systems that I control (Linux) which are connected behind common NAT devices to public Internet. Each of these client devices must receive infrequent messages from a cloud service (1 or 2 per day) and on average, must receive these messages in less than a 500ms.
I have full control of both server and client systems to install any operating system, programming languages or applications. However I will not have control of the router and network in between. Otherwise, I could just call a web service running on the "client" devices in order to send the messages.
I have considered running Node.js on the cloud service, with javascript sockets on the client kept open 24x7. From what I am told Node can handle tens of thousands of open connections, making it an ideal server for this.
NAT devices will time out open connections, so dummy keep alive data could be sent. And if the connection is dropped, the client just renews the socket.
Other options include Erlang or even a simple c socket with long polling.
However I am having a difficult time researching this problem for other approaches.
What would be the best approach? Given no restrictions on language or programming.