python – Push a file to multiple devices at once

I am interested in how larger companies push updates/files to devices all over the nation so easily. I have contemplated running a periodic repo update but that is not efficient. I would like to setup an instant file push instead of a time based one. Is there a way to:

  1. Send a file to all devices from a master device
  2. All devices check a master file for changes and update the local file when it changes
  3. Any alternate automatic file update method

I am using a Raspberry Pi so my programming options are currently: Python or Shell scripting