Update table rows in a non-sequential way using the output of a php script Update table rows in a non-sequential way using the output of a php script wordpress wordpress

Update table rows in a non-sequential way using the output of a php script


You have two problems here: The server queries to your monitored service and the request between the front user page and your server.

The first one you need to solve is the monitoring between your server and the different service. You shouldn't call every single service upon user request. The server should queries the services by itself every x seconds or minutes at your choice and keep this data in its own database. Then, to send the data to the client, this server only need to query its own database which should be done almost instantly. This technique gives you the possibility to keep a history or to send email when it diagnostic a failure.

The second problem is to update your front end page you have many possibilities, but you should keep the number of request low. I'd suggest that you create a notification like request: your ajax request ask for all updated value since the last request (you send the timestamp in your request) then the server answer with all the data that was update since that time. When the response is received you can then update the received data in your table by mapping the ids.

This is mostly the track I'd go, but you still have some decisions to take, comment back if you need precision on my suggestion.