Skip to content
forked from stephenh/fakesdb

a fake version of Amazon's SimpleDB for local/integration testing

Notifications You must be signed in to change notification settings

yunglin/fakesdb

 
 

Repository files navigation

Overview

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.

Install

The easiest way is to get the fakesdb-standalone-1.5.jar from github and run:

  • java -jar fakesdb-standalone-1.5.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-1.5.war also from github.

Notes

  • To facilitate testing, issuing a CreateDomain command with DomainName=_flush will reset all of the data

  • The SelectParser probably has some bugs in it--the grammar is fairly off-the-cuff. QueryParser should be pretty solid.

  • Typica is used for unit testing the server's responses

  • If you're using the typica Java SimpleDB client, versions through 1.6 only use port 80, even when given a non-80 setting. So you'll either have to run fakesdb on port 80 or else redirect port 80 traffic to 8080 with a firewall rule.

Changelog

  • 2.4 - 23 Aug 2011
    • Upgrade to Scala 2.9.0-1 and Jetty 8.0.0.RC0
    • Make new fakesdb-testing.jar which has jetty but not scala-library
  • 2.3 - 23 Aug 2011
    • Remove Jetty bootstrap classes from fakesdb-servlet.jar
  • 2.2 - 25 Apr 2011
    • BatchDeleteAttributes support (Alexander Gorkunov)
    • Partial Select support (Alexander Gorkunov)
  • Pre-2.2 various releases

Todo

  • Convert build.xml hack over to sbt
  • Hook up the test suite to sbt so 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 fakesdb purposefully lock up, fail, etc., to test how your real application responds--it would be cool to flip fakesdb into several error modes either via a web UI or meta-domains (like the current _flush domain)

About

a fake version of Amazon's SimpleDB for local/integration testing

Resources

Stars

Watchers

Forks

Packages

No packages published