Sinchronize blob files from cloud to IoT Edge Blob (local)

Jaime Olivares 26 Reputation points
2021-12-29T22:35:38.567+00:00

Please refer to the following hypothetical diagram for an IoT Edge device implementation. We want to know if there is an automated mechanism for it using the Azure IoT infrastructure.
An admin application will write several JSON configurations files associated with a specific device. Each device has a different config, and the config files are large (1Mb).
We want those files stored in the cloud to be sent automatically to the target device, for it to store them in its local blob storage. The local files shall always reflect what is in the cloud, almost like a OneDrive.
Is there any facility for this? How we can isolate the information for each device without exposing other configurations stored in the cloud blob?

161228-image.png

Azure IoT Edge
Azure IoT Edge
An Azure service that is used to deploy cloud workloads to run on internet of things (IoT) edge devices via standard containers.
580 questions
{count} votes

3 answers

Sort by: Most helpful
  1. chbeier 1,871 Reputation points
    2022-01-27T13:38:15.657+00:00

    @Jaime Olivares I see the following options to trigger a synchronization

    • Implement a direct method on the device what is called when the file is updated to instruct the device to refetch the file, requires the device to be online
    • Keep versioning information in the file name and update the desired property of the targeted device twins. This twin update will be a available whenever the device is connected and an appropriate handler function can fetch the new config file.
    1 person found this answer helpful.
    0 comments No comments

  2. António Sérgio Azevedo 7,671 Reputation points Microsoft Employee
    2022-01-06T00:09:17.72+00:00

    Hi @Jaime Olivares ,

    Thanks for confirming in comments that Device\Module twins is not an option because of the limit of 32kb. For this scenario I would recommend to use Azure SQL Edge as an alternative to Azure Blob Storage on IoT Edge.

    Azure Blob Storage on IoT Edge is great on scenarios:

    -where data needs to be stored locally until it can be processed or transferred to the cloud. This data can be videos, images, finance data, hospital data, or any other unstructured data.
    -when devices are located in a place with limited connectivity.
    -when you want to efficiently process the data locally to get low latency access to the data, such that you can respond to emergencies as quickly as possible.
    -when you want to reduce bandwidth costs and avoid transferring terabytes of data to the cloud. You can process the data locally and send only the processed data to the cloud.

    On the other side, Azure SQL Edge is built on the same engine as SQL Server and Azure SQL, enabling you to use sync tools like SQL Data Sync . Take a look at the following tutorial: Sync data from SQL Edge to Azure SQL Database by using SQL Data Sync

    Thank you!

    Remember:

    • Please accept an answer if correct. Original posters help the community find answers faster by identifying the correct answer. Here is how.
    • Want a reminder to come back and check responses? Here is how to subscribe to a notification.

  3. Stefan Szomraky 1 Reputation point
    2022-01-31T11:37:05.733+00:00

    Upload the BLOB to Azure storage (or anywhere, really), and set a properties.desired property containing the link+SAS token (or if you want: a hash of the contents if you want to keep the URL always the same). Your edge module will get a callback (during startup, and during runtime) that the property value has changed, and can connect to the cloud do download the configuration. No need to use LocalBlobStorage module, the config can be cached in the edge modules /tmp directory.

    Alternatively you can store the whole configuration in properties.desired for that module, but the whole "module twin" is limited to 32kB which might quickly be exceeded by complex configuration.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.