Your SlideShare is downloading. ×
SimpleDb, an introduction
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×

Saving this for later?

Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime - even offline.

Text the download link to your phone

Standard text messaging rates apply

SimpleDb, an introduction

5,007
views

Published on

An introduction to Amazon AWS SimpleDB, I gave this talk at the Ruby on Rails usergroup meeting of june 2009

An introduction to Amazon AWS SimpleDB, I gave this talk at the Ruby on Rails usergroup meeting of june 2009

Published in: Technology, Design

1 Comment
4 Likes
Statistics
Notes
  • Hey, awesome presentation!!

    just one little thing... on slide 14, aren't you missing one '}' after 'square'?

    Thanks for sharing it!!
    Fer
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
No Downloads
Views
Total Views
5,007
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
104
Comments
1
Likes
4
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. Amazon SimpleDB A quick intro Paolo Negri twitter @hungryblank
  • 2. DB
  • 3. DB? •SimpleDB •CouchDB •MongoDB
  • 4. DB? http://www.flickr.com/photos/zheem/3091325244/
  • 5. Key Value store? http://www.flickr.com/photos/wdwbarber/1338954161/
  • 6. A bit like... • BigTable • HyperTable • Redis • TokyoCabinet • ...
  • 7. Different Shades DB > KV > http://www.flickr.com/photos/dey/11717609/
  • 8. Commonalities Schema less N O Just store your data
  • 9. Commonalities • No transactions • No relations • No datatypes (some)
  • 10. 0.7 seconds to store 1 million records Fast (TokyoCabinet) http://www.flickr.com/photos/donsolo/1405885541/
  • 11. Big datasets SimpleDB 1.000.000.000 attributes/domain * 100 domains http://www.flickr.com/photos/digitalart/2101765353/
  • 12. Key Value A D H1 A6 
 < Key data data data data < Value 

  • 13. SimpleDB A T W 






 
 < Key data data } Attribute > Attribute value > < Value
  • 14. SimpleDB Nested hash of strings
  • 15. SimpleDB • Only strings • No schema (no attribute declaration) • up to 256 attributes per item • EVERYTHING INDEXED
  • 16. SimpleDB 






 < 
 Key Attribute > W Attribute value > • 1024 K max length 
 • Any UT8 character that is valid in XML docs can be used
  • 17. SimpleDB • 1.000.000.000 attributes per domain • 100 domains per account • you can have more than one account
  • 18. SimpleDB <wtf>wtf</wtf> SOAP protocol http://www.flickr.com/photos/rescuedog/2242215507
  • 19. SimpleDB Or “REST” http://sdb.amazonaws.com/? AWSAccessKeyId=BLAHBLAH&Action=PutAttributes&Attribute. 0.Name=code&Attribute. 0.Value=31&DomainName=test_domain&ItemName=bar41&Sign atureMethod=HmacSHA256&SignatureVersion=2&Timestamp=20 09-06-07T23%3A15%3A50Z&Version=2007-11-07&Signature=...
  • 20. SimpleDB request REST or XML SimpleDB Host response XML
  • 21. SimpleDB Requests • create/delete domain • put/get/delete (selectively) attributes • and... SELECT
  • 22. SimpleDB Domain: a container of (nested) key value • Up to 10GB big • Up to 1.000.000.000 attributes stored
  • 23. SimpleDB - PUT
  • 24. SimpleDB - GET you pay bandwidth :)
  • 25. Oh yes, $$ • first GB data IN free, 0.10$ after • first GB data OUT free, 0.17$ or less after • first GB stored is free, 0.25GB/month after
  • 26. So, PUT again + =
  • 27. Attribute values are always arrays 






 
 < Key } Attribute > < Value Array Attribute value > Even if there’s only one value!!
  • 28. Select • Sort • Multiple conditions • Understands only strings! • So you need to think when you store your data
  • 29. Gems • hungryblank-aws_sdb_bare (github) very low level one to one mapping with SimpleDB calls • right_aws high level, active recordish api and an hash api • aws-sdb not any more mantained but still working
  • 30. SimpleDB - Cons • Eventual Consistency - Data is not immediately propagated across all nodes… the latency is usually around a second • Latency specially if you’re not on ec2 • Protocol - if compared with json stores • Only strings, lexicographical string only
  • 31. SimpleDB - Pros • Is basically free to try out • Everything is indexed • Distributed • Replicated • Completely hosted on Amazon system
  • 32. Q? Paolo Negri twitter @hungryblank