# Amazon SimpleDB ang Ruby

**URL:** <https://www.ruby-forum.com/t/amazon-simpledb-ang-ruby/123810>\
**Category:** Rails\
**Created:** [December 20, 2007, 10:16pm UTC](https://www.ruby-forum.com/t/amazon-simpledb-ang-ruby/123810 "2007-12-20T22:16:55Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![kublai](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/a3d4f5/32.png) [@kublai](https://www.ruby-forum.com/u/kublai)\
**Post date:** [December 20, 2007, 10:16pm UTC](https://www.ruby-forum.com/t/amazon-simpledb-ang-ruby/123810/1 "2007-12-20T22:16:55Z")

</div>

Amazon SimpleDB satisfies the hosting model I need for a project.  
Unfortunately, looks like it only supports  
PHP, C#, Java, Perl, and [VB.NET](http://VB.NET). Does anyone know of any work to make  
it work with Ruby on Rails.  
Thanks,  
gk

---

<div class="post-metadata">

**Author:** ![kublai](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/a3d4f5/32.png) [@kublai](https://www.ruby-forum.com/u/kublai)\
**Post date:** [December 20, 2007, 10:34pm UTC](https://www.ruby-forum.com/t/amazon-simpledb-ang-ruby/123810/2 "2007-12-20T22:34:28Z")

</div>

The first question is whether there’s even a valid and sufficiently  
complete  
mapping between ActiveRecord and SimpleDB:

- GET, PUT or DELETE _items_ in your domain, along with the  
attribute-value pairs that you associate with each item. Amazon  
SimpleDB  
automatically indexes data as it is added to your domain so that it  
can be  
quickly retrieved; there is no need to pre-define a schema or change  
a  
schema if new data is added later. Each item can have up to 256  
attribute  
values. Each attribute value can range from 1 to 1,024 bytes.

- QUERY your data set using this simple set of operators: =, !=, \<, \>  
\<=, \>=, STARTS-WITH, AND, OR, NOT, INTERSECTION AND UNION. Query  
execution  
time is currently limited to 5 seconds. Amazon SimpleDB is designed  
for  
real-time applications and is optimized for those use cases.

If there is such a mapping, I for one would like to understand the  
limitations in RoR terminology. And if there is hope for being able to  
use  
SimpleDB with my current controllers, I for one would be very interested  
in  
contributing to the cause, whether that be coding or testing or docs or  
possibly even donations.

BTW, I’m working on a related concept: service-oriented memcached for  
Rails  
(big memcached in the sky).

Cheers,

m

---

<div class="post-metadata">

**Author:** ![kublai](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/a3d4f5/32.png) [@kublai](https://www.ruby-forum.com/u/kublai)\
**Post date:** [December 20, 2007, 10:36pm UTC](https://www.ruby-forum.com/t/amazon-simpledb-ang-ruby/123810/3 "2007-12-20T22:36:13Z")

</div>

There are several projects listed on sourceforge (or was it rubyforge?),  
but all seem to be in the  
early stages.

What are your requirements? S3, SimpleDB or both?

– Long

----- Original Message -----  
From: “kublai” [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
To: “Ruby on Rails: Talk” [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
Sent: Thursday, December 20, 2007 4:16 PM  
Subject: [Rails] Amazon SimpleDB ang Ruby

---

<div class="post-metadata">

**Author:** ![kublai](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/a3d4f5/32.png) [@kublai](https://www.ruby-forum.com/u/kublai)\
**Post date:** [December 20, 2007, 10:47pm UTC](https://www.ruby-forum.com/t/amazon-simpledb-ang-ruby/123810/4 "2007-12-20T22:47:55Z")

</div>

Well, it’s the combination of pay-what-you-use hosting plan and the  
structured data storage system. Any such hosting plan offered for  
Postgres or MySQL, or SQLite3?

---

<div class="post-metadata">

**Author:** ![kublai](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/a3d4f5/32.png) [@kublai](https://www.ruby-forum.com/u/kublai)\
**Post date:** [January 21, 2008, 12:26am UTC](https://www.ruby-forum.com/t/amazon-simpledb-ang-ruby/123810/5 "2008-01-21T00:26:40Z")

</div>

I recently completed work an a proxy server, allowing you to use  
Simple DB as a backend with Rails ActiveResource framework. Find the  
results here:

[http://inside.glnetworks.de/2008/01/20/bridging-rails-to-amazon-simpledb-using-activeresource/](http://inside.glnetworks.de/2008/01/20/bridging-rails-to-amazon-simpledb-using-activeresource/)

Cheers,  
Martin
