none
C# App storing small data sets in the cloud RRS feed

  • Question

  • I have a C# app that generates data sets in the region of 250kb per session, I'd like to upload this Azure, in my first prototype I wrote it directly to Azure Blob storage, however this left me uncomfortable as it was a bit too closely coupled, it also meant I needed to encode the connection string directly into the app which seemed a bit of a risk.

    I've recently started to look at some Azure Functions to provide some logging features and began to wonder if the same would be a suitable technology to use for the data upload interface? I see that the default time out is 5 minutes however is it a good idea to do this sort of thing through a function? What if my users are on the end of a slow connection? When does the counter/billing start? Is it from the first byte uploaded or the last?

    If not functions what would be the best solution to get this data from a client app into Azure, at this point I'm not to bothered where it ends up but I'd like the maximum flexibility to change the back end process without having to reissue the client app?

    Tuesday, June 25, 2019 7:51 PM

Answers

  • While using a function would work, you are likely to hit one of the timeout limits - either the function execution time or the HTTP connection limit of 230 seconds.

    I believe the best approach would be to use Shared Access Signature (SAS) based authentication for direct uploading to blob storage.

    You would still have a function (or integrate it into your existing API) that would generate the SAS URL for upload. This SAS token would be valid for just for some time depending on your use case. The doc also have some sample code for C# on how you can generate these SAS URLs.

    Here is (a bit old) sample for doing this using a C# function.


    Wednesday, June 26, 2019 6:22 AM
    Moderator