Friday, February 24, 2023

Optimized database layout for Underscore Backup

Tonight I spent a few hours optimizing the storage of objects in the back end of Underscore Backup. I expect more than 99% of the DynamoDB storage for this application to be a single table that contains every object that any source has stored with the service. Each source is identified by a unique UUID and each object contains a field depicting which source it belongs to. The optimization I realized is that I was storing the UUID as a string, including the '-' characters of the UUID which is 36 bytes long instead of the 16 bytes it would take to store the UUID in binary form. Based on my estimates, this will likely reduce the overall storage requirements in DynamoDB for the service by over 20%. Not to mention the smaller size will also mean it consumes fewer read units when querying and scanning the table.

This was a breaking change that required migration of old data so I am glad I did this now instead of later when the data volume would have made this a much harder problem to solve.

Improved security option for private key recover in Underscore Backup

Yesterday night I came up with a new way of handling subscriptions in Underscore Backup that now gives the option of not storing the email of an account anywhere in the service as long as you are ok with not receiving billing emails. This will improve the security for private key recovery since the service will now not have the information required to decrypt the key stored anywhere in the service as long as you disable billing emails about charges (You can still see your invoices on the website). By default this is disabled because I think most people will prefer the billing emails over the increased security this provides.

Strarting up this little micro blog

Going to start a dev diary planning to do smaller posts with just minor updates compared to my main blog at my normal website.