Author: Tom McClean
Updated: 13 Oct 2017 17:52
If you are familiar with hosting websites, you will know that SQL Azure can get quite expensive, every individual database is billed seperately. While you can host additional websites at no extra cost using the Azure Web App Service, each website tends to need a database which costs more money every time.
I wanted to cut down my Microsoft Azure costs, I found the easiest way to do this was to stop using SQL Azure in cases where I was only using the database for small tasks, such as configuration storage and logging. So I decided to write a new package that allows you to pass List<Object> and have it automatically store the data inside the list as a file on the File System.
My new package is called XContext, it allows you to read and write xml files, when writing it serialises your data into XML and when you read it deserialises it back into the native type. The package also employs a way of reducing the amount of IO needed by keeping in memory changes you make and writing them out periodically.
This project was also a good opportunity to learn a bit more about generic types and writing functions that use Lambda for quering. Check it out on my GitHub page if you are interested in learning more!
I intend to work on this project every now and again, the main feature I will be adding in future is the ability to store the data files on the Azure Blob Storage service which is a very economical and reliable way to store data on Microsoft Azure, it also helps when using the package on load balanced websites.