Now i have added a second data sink to this blog system based on miniblog.core. The first and primary works with plain XML file for every post. But if the azure web app will crash, or lost complete, I need a backup.

So I decided to use LiteDB,  a simple, serverless, fast and lightweight embedded noSQL .NET single file library, written in C# managed code.

I save on init all posts content and also the linked one from 'files' into this DB, and the same on add, update and deleteing (flag).

The DB file resides outside of the blog web app.

First I have tried to do this with a CosmosDB Collection, but for this case the costs were a little too high ;)

So for the worst scenario I have one DB file with all data in it and two software projects to rebuild - allfine.

Azure Meetup / FFM at Daenet, azure functions etc.

On cosmos dB put all your data in one collection. It's not relational - think different!

For example:

  • we have created a Cosmos DB named AllCosmosDb,
  • there we have created a collection
    • named allDataInDb
    • Storage Unlimited
    • Throughput 1000 RU/s (Estimated spend (USD): $0.080 hourly / $1.92 daily)
    • Partition key set to /TheDescriptor

Now if we save there from a student object our first document, where we set the attribute TheDescriptor automaticly to Student we get this from the Data Explorer:


if we go bak in our relational DB thinking, we are now able to save all our tables in only one big collection.
And if we are creazy, we are also able to put all our applications DB'tables in this one collection ;)