Reference architecture
The logic lives on site. The cloud is remote access.
This is how we connect the field to your screen: the devices report to a local gateway that decides and automates, and the cloud replicates the data so it can be consulted from anywhere. If the internet goes down, the operation never notices.