The Devver Blog

A Boulder startup improving the way developers work.

Announcing DataMapper/SimpleDB Adapter 1.0.0

Today we are pleased to announce the release of dm-adapter-simpledb 1.0.0.

The big new feature is compatibility with DataMapper 0.10.*. The DataMapper adapter API changed significantly in 0.10, necessitating a broad rewrite. This release breaks backwards compatibility with DataMapper 0.9.*.

In addition, the way nils are stored has changed, so datasets created with the 0.9.* adapter may need to be updated. Previously nils were stored in the form of a special nil value (by default, the string “nil”). Starting with version 1.0.0, any attributes set to nil will be removed from the SimpleDB record. This is more in line with the SimpleDB concept of NULL, and enables


predicates to work as expected.

New and existing SimpleDB adapter features include:

  • NEW: Supports all DataMapper query predicates.
  • NEW: DataMapper identity map support for record caching
  • NEW: Lazy-loaded attributes
  • NEW: DataMapper Serial property support via UUIDs.
  • Uses the RightAWS gem for efficient SimpleDB operations.
  • Full set of CRUD operations
  • Can translate many queries into efficient native SELECT operations.
  • Migrations
  • Array properties
  • Basic aggregation support (Model.count(“…”))
  • String “chunking” permits attributes to exceed the 1024-byte limit

If you have Gemcutter in your Gem sources, you can install the gem immediately:

gem install dm-adapter-simpledb

Check out the code at You can see metrics for the code here. Give it a try, and feel free to send us any feedback, patches, and suggestions. The project’s issue tracker is on GitHub, or you can always email us.


Written by avdi

November 16, 2009 at 12:45 pm

Posted in Uncategorized

Tagged with ,

4 Responses

Subscribe to comments with RSS.

  1. […] 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 […]

  2. The examples on github are a bit dated, as well as the example merb app seems out of sync. I had to put the following in dependendy.rb

    dependency "dm-adapter-simpledb", "1.0.0", :require_as => nil

    Your example model quoting the "storage_name" value required a symbol, and including "storage_name" in your model at all seems to create issues, also my secret key had a "/" in it and Addressable::URI was unable to deal with it in the example form you used in the example:

    DataMapper.setup(:default, 'simpledb://ACCESS_KEY:SECR/')

    Pushing it into a hash and feeding it to setup worked, not sure if there is an easy fix other than this.

    mysetup = {:adapter => 'simpledb',:access_key => key,:secret_key => skey,:domain => 'sdb_test'}
    DataMapper.setup(:default, mysetup)


    November 17, 2009 at 1:02 pm

  3. The example app is indeed out of date. Until it's updated I may just take the reference out of the README.

    That's an interesting point about secret key; mine has a slash in it as well. I suspect URLencoding the slash would work; but iI'll probably be updating the README to only refer to the long-form options.

    Thanks for the feedback!


    November 23, 2009 at 7:27 am

Comments are closed.

%d bloggers like this: