Yes, the DynamoDB managed data service is a very big deal
Just announced today: DynamoDB solves several problems for developers:
- No administration except for creating database tables (including some decisions like using simple lookup keys or keys with range indices and whether reads should be consistent or not)
- Fast and predictable performance at any scale (but see comment below on the requirement for provisioning)
- Fault tolerance
- Efficient atomic counters
The lastest AWS Java SDK handles DynamoDB. For Ruby, the latest aws-sdk (gem install aws-sdk) supports DynamoDB. I signed up for DynamoDB, looked at the Java example, and wrote a little bit of working Ruby code using documentation - I had to slightly change the example code to get it to work for me:
require 'aws-sdk' dynamo_db = AWS::DynamoDB.new( :access_key_id => ENV['AMAZON_ACCESS_KEY_ID'], :secret_access_key => ENV['AMAZON_SECRET_ACCESS_KEY']) table = dynamo_db.tables.create('my-table', 10, 5) begin sleep 3 puts "Waiting on status change #{table.status}" end while table.status == :creating # add an item item = table.items.create('id' => '12345', 'foo' => 'bar') # add attributes to an item item.attributes.add 'category' => %w(demo), 'tags' => %w(sample item) p item # update an item with mixed add, delete, update item.attributes.update do |u| u.add 'colors' => %w(red) u.set 'category' => 'demo-category' u.delete 'foo' end p item.attributes.to_h # delete attributes item.attributes.delete 'colors', 'category' # get attributes p item.attributes.to_h # delete an item and all of its attributes item.deleteI used the AWS web console to then delete the test table to avoid charges.
DynamoDB is a big deal because while it is easy enough to horizontally scale out web applications and back end business applications, it is a real pain to scale out data storage for session handling and application data. Except for paying for the service, Amazon is trying to remove these hassles for developers.
I think that in addition to deployments to EC2s, DynamoDB will be a very big deal for Heroku users because it gives them another data store option in addition to Heroku's excellent managed PostgreSQL service, MongoHQ, Cloudant, and other 3rd party data service providers.
Comments
Post a Comment