Search code examples
.netazurearchitecturemicroservicesazure-blob-storage

File Storage Solution Architecture - Azure Blob Storage


I have 3 application dev teams that all need to store/retrieve files from azure blob storage in their apps. I want them all to implement this in a simple, standardized way. I have been asked to implement a common solution for this problem.

I will point out that there is also a need to retrieve config information from a different service when accessing ABS.

File sizes will range from a few kb to several gbs.

I have several options, should I:

  1. Create a file service rest api that accepts requests from these clients over http and then handles the interaction with ABS (upload/download/query). To me this introduces an unnecessary middle man and increased overhead for file requests. One advantage is isolation, another is abstraction away of any complexity for the devs.

  2. Create an SDK wrapper for the clients to consume that interacts with ABS. Advantage is this is a simple solution and is a unified implementation across all teams. Disadvantage is I would need to support .net standard 2.0 as 1 client is .NET Framework 4.8.

  3. Let the teams call ABS directly using the official ABS SDK, as I think it is fairly straightforward already? Disadvantage is that they'd also need to call the config service themselves, and they also might consume the ABS sdk differently = not standardized iomplementation for business.

  4. Something else

Our chief architect is unsure which is the best route to go down. I think option 2 is the best for our needs.

I would love to hear your thoughts on this problem.

Thanks.


Solution

  • Both implementing a file service or creating an SDK wrapper will hardly add any value. More likely, it increases complexity, restricts the features and reduces the performance. Microsoft already has people working on good SDKs. Do you plan to match that investment in the short and long term to come up with something better?

    Instead, I would focus on integrating it in your specific environment:

    • You could provide templates or a small amount of code that get the correct storage container depending on the environment (local, test, production etc.)
    • You can provide templates, code or instructions to solve the authentication (e.g. by fetching a securely stored credential).
    • You can enhance the CI/CD pipeline and test environments such that each environment has its own storage containers, possibly with relevant test data.