Over the past couple weeks I’ve been updating the DataMapper SimpleDB adapter for DataMapper 0.10, an effort which yesterday culminated in the release of version 1.0.0. Testing against Amazon SimpleDB can be an excruciatingly slow process – not only can the connections take a long time to set up, but SimpleDB’s “eventual consistency” model means that after a write you often have to wait a second or more until the data you just wrote is available for reading.
I began to wonder if there was any way I could accelerate the tests by running them against a local SimpleDB clone. I surveyed the field of projects which mimic the SimpleDB API and found two which seemed promising. Unforunately neither one panned out.
The first I tried was simpledb-dev, a Python script which claims to fully implement the SimpleDB API. I had high hopes for this one because it had been used to test a previous version of the DataMapper SimpleDB adapter.
Unfortunately, simpledb-dev only supports an outdated version of the SimpleDB API. Specifically, it does not implement the
SELECT operation. Since the adapter uses
SELECT for database reads, simpledb-dev was out of the running. Which was a pity, because I found trivially easy to get simpledb-dev up and running.
The same cannot be said of the second solution I tried, M/DB. M/DB is an ambitious project to provide a production-level drop-in replacement for SimpleDB. It is distributed only as a .deb package for Debian/Ubuntu systems – Mac users are out of luck. Apparently it used to be distributed as a VMWare virtual appliance, but no longer.
When I installed the package, M/DB took over port 80 on my development machine. Configuring it involves editing a configuration file in a non-standard location, and then hitting a special path on the local web server it starts up. After that you can start using it as a SimpleDB-like service.
However, M/DB requires that all SimpleDB API calls be made against the URL
http://localhost/mdb/request.mgwsi. The RightAWS library used in the adapter, while it accepts a configurable host and port for the service, expects to be able to hit the host root directly, and provides no way to specify a base path other than
So the upshot is that while there are some promising attempts at SimpleDB-alikes out there, I couldn’t find one that quite met my needs for local testing. If you know of a an alternative SimpleDB clone that I missed, please clue me in.