Bringing MongoDB into your organization

2,314 views

Published on

My talk at MongoBoston on bringing MongoDB into your organization. Covers what it is, why you use it, how you get your feet wet, and how you dive in.

Published in: Technology
  • Be the first to comment

Bringing MongoDB into your organization

  1. 1. Introducing MongoDB into your organization From Punchbowl.com to YOU Ryan Angilly @angilly Tuesday, September 21, 2010
  2. 2. • “Bringing MongoDB into your organization” ? • MongoDB • What? • Why? • Get your feet wet • Dive in Tuesday, September 21, 2010
  3. 3. Punchbowl.com Tuesday, September 21, 2010
  4. 4. Punchbowl.com • Online invitation & party planning Tuesday, September 21, 2010
  5. 5. Punchbowl.com • Online invitation & party planning • Think e-Vite, but better everywhere Tuesday, September 21, 2010
  6. 6. Punchbowl.com • Online invitation & party planning • Think e-Vite, but better everywhere • More tools for planning your party, not just the online invites Tuesday, September 21, 2010
  7. 7. Punchbowl.com • Online invitation & party planning • Think e-Vite, but better everywhere • More tools for planning your party, not just the online invites • Been around since 2007 Tuesday, September 21, 2010
  8. 8. Punchbowl.com • Online invitation & party planning • Think e-Vite, but better everywhere • More tools for planning your party, not just the online invites • Been around since 2007 • Raised $2.5M+ -- Angels, Intel Capital, Contour Ventures Tuesday, September 21, 2010
  9. 9. Punchbowl.com • Online invitation & party planning • Think e-Vite, but better everywhere • More tools for planning your party, not just the online invites • Been around since 2007 • Raised $2.5M+ -- Angels, Intel Capital, Contour Ventures • Deals w/ Oriental Trading, others.... Tuesday, September 21, 2010
  10. 10. Punchbowl.com • Online invitation & party planning • Think e-Vite, but better everywhere • More tools for planning your party, not just the online invites • Been around since 2007 • Raised $2.5M+ -- Angels, Intel Capital, Contour Ventures • Deals w/ Oriental Trading, others.... • Just rebranded from MyPunchbowl.com Tuesday, September 21, 2010
  11. 11. Punchbowl.com • Online invitation & party planning • Think e-Vite, but better everywhere • More tools for planning your party, not just the online invites • Been around since 2007 • Raised $2.5M+ -- Angels, Intel Capital, Contour Ventures • Deals w/ Oriental Trading, others.... • Just rebranded from MyPunchbowl.com • Just announced 1M users Tuesday, September 21, 2010
  12. 12. Punchbowl.com • Online invitation & party planning • Think e-Vite, but better everywhere • More tools for planning your party, not just the online invites • Been around since 2007 • Raised $2.5M+ -- Angels, Intel Capital, Contour Ventures • Deals w/ Oriental Trading, others.... • Just rebranded from MyPunchbowl.com • Just announced 1M users • Recently previewed Digital Invitation Studio, the 3rd generation of our invite design software Tuesday, September 21, 2010
  13. 13. You. Tuesday, September 21, 2010
  14. 14. You. • Who here has used MongoDB? Tuesday, September 21, 2010
  15. 15. You. • Who here has used MongoDB? • Why are you here? Tuesday, September 21, 2010
  16. 16. What is MongoDB? A database Tuesday, September 21, 2010
  17. 17. What is MongoDB? Schema-less Tuesday, September 21, 2010
  18. 18. What is MongoDB? • Document based { name: 'Ryan', email: 'ryan@angilly.com', likes: ['mongodb', 'skiing', 'twitter', 'Boulder chicks'], dislikes: ['humidity', 'Sarah Palin', 'bigotry', 'The Yankees'], current_outfit: { pants: 'blue shorts', shirt: false, shoes: 'flip-flops', undies: 'wouldn't you like to know' } } Tuesday, September 21, 2010
  19. 19. What is MongoDB? • NoSQL Tuesday, September 21, 2010
  20. 20. What is MongoDB? • NoSQL SELECT * FROM `events` WHERE (`events`.`event_key` = ‘c76c876c675c8976cc`) AND (events.deleted_at IS NULL) LIMIT 1 SELECT `designs`.* FROM `designs` WHERE (`designs`.event_id = 206039) AND (designs.deleted_at IS NULL) SELECT `design_assets`.* FROM `design_assets` WHERE (`design_assets`.`element_id` = 1096 and `design_assets`.`element_type` = 'Design') AND ( (`design_assets`.`type` = 'DesignImage' )) SELECT * FROM `save_events` WHERE (`save_events`.event_id = 206039) AND (save_events.deleted_at IS NULL) LIMIT 1 SELECT * FROM `event_questions` WHERE (`event_questions`.event_id = 206039) LIMIT 1 SELECT * FROM `classifications` WHERE (`classifications`.`id` = 8) ORDER BY classifications.position ASC SELECT * FROM `memberships` WHERE (`memberships`.user_id = 57) LIMIT 1 SELECT * FROM `papers` WHERE (`papers`.`id` = 28) AND ( (`papers`.`type` = 'DIYPaper' ) ) SELECT * FROM `design_assets` WHERE (`design_assets`.element_id = 28 AND `design_assets`.element_type = 'Paper') SELECT * FROM `design_assets` WHERE (`design_assets`.`id` = 435) AND ( (`design_assets`.`type` = 'DesignPhoto' ) ) SELECT * FROM `ribbons` WHERE (`ribbons`.`id` = 4) AND ( (`ribbons`.`type` = 'DIYRibbon' ) ) SELECT * FROM `design_assets` WHERE (`design_assets`.element_id = 4 AND `design_assets`.element_type = 'Ribbon') Tuesday, September 21, 2010
  21. 21. What is MongoDB? • NoSQL SELECT * FROM `events` WHERE (`events`.`event_key` = ‘c76c876c675c8976cc`) AND (events.deleted_at IS NULL) LIMIT 1 SELECT `designs`.* FROM `designs` WHERE (`designs`.event_id = 206039) AND (designs.deleted_at IS NULL) SELECT `design_assets`.* FROM `design_assets` WHERE (`design_assets`.`element_id` = 1096 and `design_assets`.`element_type` = 'Design') AND ( (`design_assets`.`type` = 'DesignImage' )) SELECT * FROM `save_events` WHERE (`save_events`.event_id = 206039) AND (save_events.deleted_at IS NULL) LIMIT 1 SELECT * FROM `event_questions` WHERE (`event_questions`.event_id = 206039) LIMIT 1 SELECT * FROM `classifications` WHERE (`classifications`.`id` = 8) ORDER BY classifications.position ASC SELECT * FROM `memberships` WHERE (`memberships`.user_id = 57) LIMIT 1 SELECT * FROM `papers` WHERE (`papers`.`id` = 28) AND ( (`papers`.`type` = 'DIYPaper' ) ) SELECT * FROM `design_assets` WHERE (`design_assets`.element_id = 28 AND `design_assets`.element_type = 'Paper') SELECT * FROM `design_assets` WHERE (`design_assets`.`id` = 435) AND ( (`design_assets`.`type` = 'DesignPhoto' ) ) SELECT * FROM `ribbons` WHERE (`ribbons`.`id` = 4) AND ( (`ribbons`.`type` = 'DIYRibbon' ) ) SELECT * FROM `design_assets` WHERE (`design_assets`.element_id = 4 AND `design_assets`.element_type = 'Ribbon') vs. db.events.findOne({event_key: ‘c76c876c675c8976cc’}) Tuesday, September 21, 2010
  22. 22. What is MongoDB? Tuesday, September 21, 2010
  23. 23. What is MongoDB? • Different (downsides) Tuesday, September 21, 2010
  24. 24. What is MongoDB? • Different (downsides) • Async writes Tuesday, September 21, 2010
  25. 25. What is MongoDB? • Different (downsides) • Async writes • No transactions Tuesday, September 21, 2010
  26. 26. What is MongoDB? • Different (downsides) • Async writes • No transactions • Cannot get you dates Tuesday, September 21, 2010
  27. 27. Why use it? • Simple query syntax • Write hashes, not SQL. Tuesday, September 21, 2010
  28. 28. Why use it? • Sharding Tuesday, September 21, 2010
  29. 29. Why use it? • GridFS Tuesday, September 21, 2010
  30. 30. Get your feet wet. Tuesday, September 21, 2010
  31. 31. Pick something low risk • Logging • Statistics • Data mining Tuesday, September 21, 2010
  32. 32. Punchbowl Vendor Portal Tuesday, September 21, 2010
  33. 33. Punchbowl Vendor Portal • http://www.punchbowl.com/vendors • Track searches • Track impressions • Use data to entice vendors to purchase listings Tuesday, September 21, 2010
  34. 34. Dive In. Tuesday, September 21, 2010
  35. 35. Go all out • Don’t just use MongoDB “relationally” • Embrace embedded documents • Rethink your data schema Tuesday, September 21, 2010
  36. 36. Digital Invitation Studio Tuesday, September 21, 2010
  37. 37. Digital Invitation Studio Design Tuesday, September 21, 2010
  38. 38. Digital Invitation Studio Tags Design Tuesday, September 21, 2010
  39. 39. Digital Invitation Studio Tags Photos Design Tuesday, September 21, 2010
  40. 40. Digital Invitation Studio Tags Photos Design Envelope Tuesday, September 21, 2010
  41. 41. Digital Invitation Studio Tags Postage Photos Design Envelope Tuesday, September 21, 2010
  42. 42. Digital Invitation Studio Tags Postage Photos Design Envelope Package Tuesday, September 21, 2010
  43. 43. Digital Invitation Studio Tags Postage Liner Photos Design Envelope Package Tuesday, September 21, 2010
  44. 44. Digital Invitation Studio Tags Postage Liner Photos Design Paper Envelope Package Tuesday, September 21, 2010
  45. 45. Digital Invitation Studio Tags Postage Liner Photos Design Paper Envelope Package Greeting Tuesday, September 21, 2010
  46. 46. Digital Invitation Studio Design Tags Postage Liner Photos Paper Envelope Package Greeting Tuesday, September 21, 2010
  47. 47. Digital Invitation Studio Tuesday, September 21, 2010
  48. 48. Digital Invitation Studio • Completely rethought how we create designs Tuesday, September 21, 2010
  49. 49. Digital Invitation Studio • Completely rethought how we create designs • Brand new UI Tuesday, September 21, 2010
  50. 50. Digital Invitation Studio • Completely rethought how we create designs • Brand new UI • Uses MongoDB for everything design- related Tuesday, September 21, 2010
  51. 51. Digital Invitation Studio • Completely rethought how we create designs • Brand new UI • Uses MongoDB for everything design- related • We didn’t touch our invite/event system, because we didn’t need to Tuesday, September 21, 2010
  52. 52. Digital Invitation Studio • Completely rethought how we create designs • Brand new UI • Uses MongoDB for everything design- related • We didn’t touch our invite/event system, because we didn’t need to • http://www.punchbowl.com/digital- invitations Tuesday, September 21, 2010
  53. 53. Where’s my stuff?! Tuesday, September 21, 2010
  54. 54. Open Source is not scary. Tuesday, September 21, 2010
  55. 55. Open Source is not scary. Libraries you are used to using may not be available. Don’t be afraid. Needed Paperclip Didn’t have it Created Roachclip Tuesday, September 21, 2010
  56. 56. Open Source is not scary. Libraries you are used to using may not be available. Don’t be afraid. Needed Paperclip Didn’t have it Created Roachclip Tuesday, September 21, 2010
  57. 57. Open Source is not scary. Libraries you are used to using may not be available. Don’t be afraid. 75 lines of code. Needed Paperclip Didn’t have it Created Roachclip Tuesday, September 21, 2010
  58. 58. Open Source is not scary. Libraries you are used to using may not be available. Don’t be afraid. 75 lines of code. Needed Paperclip Didn’t have it Created Roachclip 104 lines of test Tuesday, September 21, 2010
  59. 59. Questions? Tuesday, September 21, 2010
  60. 60. Links • www.punchbowl.com • www.punchbowl.com/digital- invitations • www.punchbowl.com/vendors • www.mongodb.org • @angilly Tuesday, September 21, 2010
  61. 61. Credits • Images • http://www.flickr.com/photos/felipeskroski/2566713455/sizes/l/in/photostream/ • http://www.flickr.com/photos/zesmerelda/3500706849/ • http://www.flickr.com/photos/galactic/2963937719/sizes/l/in/photostream/ • http://www.flickr.com/photos/oberazzi/318947873/sizes/l/in/photostream/ Tuesday, September 21, 2010

×