-
Notifications
You must be signed in to change notification settings - Fork 2
Azure Storage
I would like to suggest we use the following 2 items :
#1 Cosmos DB for indexing/storing the JSON objects with pointers to the book files (audio, jpeg, text) #2 Blob storage for storing the actual audio, jpeg and text files.
The reasoning behind this is that by using the Serverless (Azure functions) model we are excluding any 3rd party DB vendor that would otherwise run in a VM or Container, leaving us Azure databases which are NoSQL (CosmosDB) and SQL (Azure SQL DB + Azure MySQL + etc…).
Azure SQL DB’s are expensive ($184.10 / month -> https://azure.microsoft.com/en-us/pricing/details/sql-database/single/), so let’s go with CosmosDB ( $20 / month -> https://azure.microsoft.com/en-us/pricing/details/cosmos-db/). Then we already decided the best way to store the files associated with our JSON is via a BLOB, so we can also add Blob storage.
According to the link above the total cost of CosmosDB would be ~$17.52 + $0.25 / gb / month. However I found a link that says “Currently the minimum price for both database and the container-based throughput is $24/month” and Scale increment costs are $6 /month -> https://docs.microsoft.com/en-us/azure/cosmos-db/how-pricing-works
- Pricing is difficult to calculate precisely
Uploaded Maria’s JSON file format in blob storage at -> access books
Considerations: Currently using a public Blob container accessible to anyone, not sure how OAuth or security measures tie-in to this, however for production use we can create a "private" container. Also this JSON will be in CosmosDB instead of a blob, which allows for index/search functionality.
References:
- https://github.com/Azure-Samples/storage-blobs-dotnet-quickstart
- https://docs.microsoft.com/en-us/rest/api/storageservices/blob-service-rest-api
- https://docs.microsoft.com/en-us/rest/api/storageservices/put-blob
- https://alexandrebrisebois.wordpress.com/2012/06/24/uploading-an-object-as-json-to-windows-azure-blob-storage/