alank2 5 Posted July 31 I am trying to think about how to set up a server API that would push data down to multiple sites, but I don't want those sites to have to require static IP/domain name/opened ports of any type. The general work flow I am thinking about would be that an API request is made from the Internet to the server and then the server would push that request to one of the multiple sites (again, no static ip, no DNS, no open ports). I don't want polling where the clients hit the API every so many seconds or minutes, but the real time speed of the data being pushed to them. I am just thinking about IP here, and in that context I am presuming that the multiple sites must start a service or program that reaches out to the server API to establish the connection, but keeps that connection open. Then the server, when it wants to push something to them, would already have that open connection to send it over. Would that be a workable plan? Is that the way something like this is being done by others? Are there better ways to do it? Are there service providers that handle some of the tough lifting on this? Is this something that the Windows Communication Foundation does? Is there something better? Share this post Link to post
Kas Ob. 119 Posted August 1 Well, first what comes to mind is MQTT, there is a punch of free and commercial libraries for Delphi/Pascal that provide MQTT. about how to handle no DNS, well if you buy a DNS form anywhere then move it to your free CloudFlare account, then you have very powerful infrastructure to build on, see, you don't need to assign your bought DNS to the server IP, you could use a subdomain, also you could use a subdomain TXT record, the client in this case will not lookup lets say myserver.alank2.com, but will the TXT record for this subdomain (or any domain) where the server IP is stored as plain text value, then connect to it. You can borrow a subdomain form i friend, a trusted one to store your TXT record. CloudFlare has brilliant control over DNS and its records, the slowest changes i witnessed was around 45 seconds over so many years of using their DNS services and thousands of changes and update, (many of these changes were automated using their API), using free CL account. Also just searched for MQTT providers in case you don't want to use your own server at all, and found this https://myqtthub.com/en They looks like have free account to test, it might be enough for you. 1 Share this post Link to post
Angus Robertson 572 Posted August 1 I've just written a similar application using ICS components, a server listens for remote clients to connect, those connections are kept open permanently with a tiny data packet periodically, and the server can send commands back to the clients when required. This application is actually server monitoring locally, if the remote client stop communicating, the server will restart the Windows service. I wrote a similar system 20 years ago using ICS monitoring vehicles using wifi (before 3G) and triggering FTP uploads (CCTV) from them. Angus 1 Share this post Link to post
alank2 5 Posted August 2 Thanks for the ideas; I appreciate them. Will keep thinking through this. Share this post Link to post
David Schwartz 426 Posted August 4 What comes to mind for me is a simple publish/subscribe model with a lightweight notification mechanism like MQTT. It would keep the overhead miminal and could easily be kept out-of-band relative to the actual data channels. Share this post Link to post