Your SlideShare is downloading. ×
0
MongoDB SF Ruby
MongoDB SF Ruby
MongoDB SF Ruby
MongoDB SF Ruby
MongoDB SF Ruby
MongoDB SF Ruby
MongoDB SF Ruby
MongoDB SF Ruby
MongoDB SF Ruby
MongoDB SF Ruby
MongoDB SF Ruby
MongoDB SF Ruby
MongoDB SF Ruby
MongoDB SF Ruby
MongoDB SF Ruby
MongoDB SF Ruby
MongoDB SF Ruby
MongoDB SF Ruby
MongoDB SF Ruby
MongoDB SF Ruby
MongoDB SF Ruby
MongoDB SF Ruby
MongoDB SF Ruby
MongoDB SF Ruby
MongoDB SF Ruby
MongoDB SF Ruby
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

MongoDB SF Ruby

2,773

Published on

MongoDB presentation for SF Ruby's June meetup. Review of non-relational databases for the first half, focus on MongoDB for the second.

MongoDB presentation for SF Ruby's June meetup. Review of non-relational databases for the first half, focus on MongoDB for the second.

Published in: Technology, Education
0 Comments
10 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
2,773
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
87
Comments
0
Likes
10
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. open-source, high-performance, schema-free, document-oriented database
  • 2. RDBMS • Great for many applications • Shortcomings • Scalability • Flexibility
  • 3. CAP Theorem • Consistency • Availability • Tolerance to network Partitions • Pick two http://www.cs.berkeley.edu/~brewer/cs262b-2004/PODC-keynote.pdf
  • 4. ACID vs BASE • Atomicity • Basically Available • Consistency • Soft state • Isolation • Eventually consistent • Durability
  • 5. Schema-free • Loosening constraints - added flexibility • Dynamically typed languages • Migrations
  • 6. BigTable • Single master node • Row / Column hybrid • Versioned
  • 7. BigTable • Open-source clones: • HBase • Hypertable
  • 8. Dynamo • Simple Key/Value store • No master node • Write to any (many) nodes • Read from one or more nodes (balance speed vs. consistency) • Read repair
  • 9. Dynamo • Open-source clones • Project Voldemort • Cassandra - data model more like BigTable • Dynomite
  • 10. memcached • Used as a caching layer • Essentially a key/value store • RAM only - fast • Does away with ACID
  • 11. Redis • Like memcached • Different • Values can be strings, lists, sets • Non-volatile
  • 12. Tokyo Cabinet + Tyrant • Key/value store with focus on speed • Some more advanced queries • Sorting, range or prefix matching • Multiple storage engines • Hash, B-Tree, Fixed length and Table
  • 13. • A lot in common with MongoDB: • Document-oriented • Schema-free • JSON-style documents
  • 14. • Differences • MVCC based • Replication as path to scalability • Query through predefined views • ACID • REST
  • 15. • Focus on performance • Rich dynamic queries • Secondary indexes • Replication / failover • Auto-sharding • Many platforms / languages supported
  • 16. Good at • The web • Caching • High volume / low value • Scalability
  • 17. Less good at • Highly transactional • Ad-hoc business intelligence • Problems that require SQL
  • 18. Ruby support • mongo-ruby-driver • Pure Ruby, with optional C extension • MongoRecord • ORM like functionality • Other mappers
  • 19. Basics • Connect: • db = Mongo.new.db(‘my-database’) • coll = db.collection(‘players’) • Insert: • coll.insert (“name” => “mike”, “age” => ... • Query: • coll.find (“age” => 35)
  • 20. Advanced queries • Sorting • Limit • $gt, $lt, $gte, $lte, $ne, $all, $in, $nin • where() • count() • group()
  • 21. GridFS • File storage in MongoDB • IO-like API for Ruby
  • 22. Other cool stuff • Capped collections • Upserts • Multikeys
  • 23. Demo
  • 24. • Download MongoDB http://www.mongodb.org • Install the Ruby driver • Try it out!
  • 25. • http://www.mongodb.org • irc.freenode.net#mongodb • mongodb-user on google groups • @mongodb • mike@10gen.com

×