So, I think I should create a script specifically to query the server, call is, say, query_server.js. This is called everytime the user does something that requires the server to be queried.
query_server.js will then change some global data in another script, hopefully updating the solar data, but also communicating errors such as server timeouts, etc.