A fake version of Amazon's SimpleDB. Local, in-memory, consistent, deployed as a war.
The entire REST API (Query, Select, etc.) is implemented in ~750 lines of Scala.
The easiest way is to get the fakesdb-version.jar from github and run:
java -jar fakesdb-version.jar
This will start up an embedded instance of Jetty on port 8080. You can pass -Dport=X to specify a different port.
If you're already running a J2EE container and want to deploy fakesdb there, you can download fakesdb-version.war also from github. You'll probably have to mount it in the root context with a virtual host, e.g. http://fakesdb.mycompany.com.
-
To facilitate testing, issuing a
CreateDomaincommand withDomainName=_flushwill reset all of the data -
The
SelectParserprobably has some bugs in it--the grammar is fairly off-the-cuff.QueryParsershould be pretty solid. -
Typica is used for unit testing the server's responses
-
If you're using the
typicaJava SimpleDB client, versions through 1.it only use port 80, even when given a non-80 setting. So you'll either have to runfakesdbon port 80 or else redirect port 80 traffic to 8080 with a firewall rule.
- Convert
build.xmlhack over tosbt - Hook up the test suite to
sbtso that it is scripted - Loading the SDB URL in a browser (e.g. without a REST action) should display all of the current data
- Release It talks about having "fake" (better term?) versions of systems like
fakesdbpurposefully lock up, fail, etc., to test how your real application responds--it would be cool to flipfakesdbinto several error modes either via a web UI or meta-domains (like the current_flushdomain)