I read a lot on Stackoverflow, but after a week of reflection and research, I'm stuck ...
So I really need to ask :)
I hope I explain the problem correctly, if not, tell me!
The problem is simplicity. I need 2 servers ... Server A is nothing more than filling the database every 15 minutes, and server B, which makes material with data from server A.
It's easy to let server B execute an HTTP data request, but I really want server B to receive a βsocket updateβ from server A whenever it updates the database data.
Problem: Server B is not always located on the same URL ... Thus, the database server cannot just execute the get / post request because it will not always know its URL.
That is why I hope server B can start socket.io connecting to the database server. Saving a string on server A so that server A can respond with new database data over an already established socket connection ....
So, in principle ... Is it possible to have a normal socket.io connection between 2 servers. Like a server between a client?
Thanks actually !!!
UPDATE: clean it up a bit.
I have a stock database. It gets all the data every 15 minutes from the trading API. This server should never stop! It might, but its annoying, the reasons for the data would be inconsistent ...
I have another script that will be constantly evolving. This makes calculations on data from the database server. This way it will have (dev) errors, etc. Occasionally. This script should not stop the "database ticker" script ... Therefore, I want to separate them from each other. This is why I need to have 2 servers connecting to each other.
My database works with a fixed url. But my development script depends on where I am developing from at the moment.
Maybe there is a better solution for what I'm trying to achieve.