I would like to manually push updates/files to devices located on different networks. I know I can run a periodic repository pull command but that is not efficient and based on fixed time intervals. I would like to setup an instant file push instead of a time based one. For example, when I upload a new file all the devices detect this OR are notified by the master an update is ready. How can I make a new file upload detected by my devices as close to instant as possible?
I'm not sure the scale of the project you're trying to accomplish, but I've set up a sort of auto-update checker in Python before. The basic idea is that you'd have a location to host the file and some way to determine if the file has been changed (I used a version number). This can be a basic web server located on the Pi. Then, each client checks the web server whenever you think it's appropriate to do an update, for example at the start of the program. If there is a version number mismatch, you can automatically pull the file from the web server, or direct the user to download it manually.
Push a file to multiple devices at once