I have a web application in PHP on remote hosting. The application is connected to a MySQL database, from which it reads states, draws graphs from the data that Arduino sends to the database.
The problem arises when I want to use the buttons to switch the status of the LEDs from the web application. The current solution is that the web application writes the status to the database at the touch of a button and the Arduino looks at the database every 3-5 seconds and changes the status of the LEDs. This method is not very dynamic and there is a large time delay, and if I go to lower time intervals then it will be a burden on the network ...
I can't handle how fast, dynamically Arduino can respond to database changes without having to open the network for incoming connections from the web to address security (port-forwarding).
How IoT systems solve this, I know that Google and Amazon IoT applications have this solved in some way even without port-forwarding and I don't see that they would ping the server every second
push notifications