Mongo chicago

973 views
918 views

Published on

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

  • Be the first to like this

No Downloads
Views
Total views
973
On SlideShare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
9
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Mongo chicago

  1. 1. Our Adventure With MongoDB, Rails & Friends Mongo Chicago October 2010
  2. 2. Ethan Gunderson http://ethangunderson.com Twitter & Github: ethangunderson
  3. 3. http://gathers.us
  4. 4. Our Agenda 1) gathers.us 2) Why Mongo 3) Choosing an ODM 4) Data modeling 5) Takeaways 6) Q & A
  5. 5. Manage events
  6. 6. Manage your groups (coming soon)
  7. 7. Aggregate your social content (coming soon)
  8. 8. Data needs High Value Low Value Groups Social Events Events RSVPs
  9. 9. Our Agenda 1) gathers.us 2) Why Mongo 3) Choosing an ODM 4) Data modeling 5) Takeaways 6) Q & A
  10. 10. Document data model
  11. 11. Read heavy Writes Reads Scaling With MongoDB - 2:45
  12. 12. The real reason I won an argument
  13. 13. Our Agenda 1) gathers.us 2) Why Mongo? 3) Choosing an ODM 4) Data modeling 5) Takeaways 6) Q & A
  14. 14. Rails loves
  15. 15. Lotʼs of options for Rails integration MongoMapper Mongoid MogoDoc Mongomatic Candy
  16. 16. We chose ... The strait Mongo Ruby driver!
  17. 17. ORMs are worthless if you donʼt understand what theyʼre doing.
  18. 18. Simple to use
  19. 19. Learn your tools
  20. 20. We avoided one until it became too painful not to use one.
  21. 21. In the end, we chose Mongoid
  22. 22. Rails 3 support
  23. 23. Nice query syntax
  24. 24. Safe mode
  25. 25. Master / Slave
  26. 26. Rapid development
  27. 27. Our Agenda 1) gathers.us 2) Why Mongo 3) Choosing an ODM 4) Data modeling 5) Takeaways 6) Q & A
  28. 28. Our data model
  29. 29. Introducing groups
  30. 30. Option 1
  31. 31. Option 2
  32. 32. YEAH!!
  33. 33. This idea actually sucks
  34. 34. Mongoʼs 4MB 8MB document limit Among other things, it keeps people like us, from doing things like that.
  35. 35. In reality, documents shouldnʼt be bigger than ~250kb Inefficient when... 1) updating on the server 2) transferring across the network 3) serializing to and from BSON
  36. 36. Querying for single events Can’t pull back a single event
  37. 37. Option 3 single collection inheritance
  38. 38. Mongoid Support
  39. 39. Mongoid Support
  40. 40. Easy querying
  41. 41. Top level objects are still top level objects
  42. 42. Moral of the story is, data modeling is still hard
  43. 43. Our Agenda 1) gathers.us 2) Why Mongo 3) Choosing an ODM 4) Data modeling 5) Takeaways 6) Q & A
  44. 44. Takeaways 1) Analyze your data needs 2) Learn the API 3) Data modeling is (still) hard
  45. 45. Our Agenda 1) gathers.us 2) Why Mongo 3) Choosing an ODM(?) 4) Data modeling 5) Takeaways 6) Q & A
  46. 46. Q&A http://spkr8.com/t/4864

×