Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the best strategy for using Windows Azure as a file storage system - with http download capabilities

I need to store multiple files that users upload, and then provide these users with the capability of accessing their files via http. There are two key considerations: - Storage (which is my primary concern here) - Security (which let's leave aside for now)

The question is: What is the most cost efficient and performant way of storing all these files and giving access to them later? I believe the answer is: - Store files within Azure Storage Account, and have a key that references them in an SQL Azure database.

I am correct on this?

Is a blob storage flat? Or can I create something like folders inside it to better organize my files?

like image 296
xmorera Avatar asked Apr 21 '12 05:04

xmorera


People also ask

What is the advantage of using transaction optimized storage for Azure file storage?

Transaction optimized file shares enable transaction heavy workloads that don't need the latency offered by premium file shares with consistent latency. Transaction optimized file shares are a great fit for applications that require file storage or for backend storage.

Which Azure storage option is better for storing data for backup and restore disaster recovery and archiving?

Blob Storage provides backup and disaster recovery capabilities. For more information, see Backup and disaster recovery for Azure IaaS disks. You can also use Blob Storage to back up other resources, like on-premises or IaaS virtual machine-hosted SQL Server data.


2 Answers

The idea of using SQL Azure to store metadata for your blobs is a pretty common scenario, which allows you to take advantage of SQL for searching, and blobs for storage.

Blobs are organized by container. So you'd have something like:

http://mystorage.blob.core.windows.net/mycontainer/myfile.doc

You can also simulate a hierarchy using a delimiter, but in reality there's just container plus blob.

If you keep the container or blob private, the user would either have to go through your web front end (or web service), or you'd have to provide them with a special URL with a Shared Access Signature appended, which is a time-limited URL.

like image 123
David Makogon Avatar answered Sep 27 '22 16:09

David Makogon


I would recommend you to take a look at BlobShare Sample which is a simple file sharing application that demonstrates the storage services of the Windows Azure Platform, together with the authentication and authorization capabilities of Access Control Service (ACS). The full sample code is located at following link:

http://blobshare.codeplex.com/

You can use this sample code immediately, just by adding proper reference to your Windows Azure Account credentials. The best thing with this sample is that you can provide blob access directly through Access Control Services. You can also modify the code to add SAS support as well as blob download from public containers. Once you have it working and understood the concept you can tweak to make it the way you would want.

like image 42
AvkashChauhan Avatar answered Sep 27 '22 15:09

AvkashChauhan