I hate relational databases! In a high traffic scenario they become painful to scale. Data segmentation, replication, asynchronous updates…you can only go so far. Schema changes alone require site outages and careful planning. That is why I was excited when Amazon announced their SimpleDB service.
Scales with you
No need to worry about schema
Has a free tier for low traffic uses
I am working on two social networking sites (tool-assisted, beerpassport) that I plan to use SDB for. The basic idea is to have several cheap web servers talking to a pool of memcached instances that act as a caching mechanism for my object graph which is stored in SDB. The first step towards implementing this solution is to come up with a way to persist objects into the SDB.
Object to be persisted
First lets look at the object I want to save to the database. I want as little actual db code in this object as possible.
Now I am going to define my base class. I want this class to be generic enough to load any object from the database. I have defined two methods called LoadOne and LoadMany which will be used to do this. I have not implemented a save mechanism yet.
Finally here is the code that glues it together.
I will release more details as I finish writing the code. Once the code is in a pretty good state I will throw it up on codeplex incase anyone else wants to use it (or improve it).
This is the portfolio / blog / space on the internet of Jeffery Yeary, a software architect with a passion for music, coding, fitness and art.