Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

MongoDB: Built for Speed

8,393 views

Published on

Presentation from CMSExpo in Chicago, May 2010. This was an intro to MongoDB and a bit of a repeat performance from the MongoSF presentation "MongoDB and CMS."

Published in: Technology
  • Be the first to comment

MongoDB: Built for Speed

  1. 1. MongoDB: Built For Speed Mitch Pirtle CMSExpo May 4, 2010
  2. 2. Before we begin Coffee? Breakfast?
  3. 3. NERDS! Are you ready to get your nerd on?
  4. 4. About this presentation Databases from a CMS perspective How we got to where we are now What MongoDB brings to the equation Where we are going
  5. 5. About me
  6. 6. About me Nothing but web since 1995
  7. 7. About me Nothing but web since 1995 Joomla founder, MongoDB contributor
  8. 8. About me Nothing but web since 1995 Joomla founder, MongoDB contributor Budding author
  9. 9. About me Nothing but web since 1995 Joomla founder, MongoDB contributor Budding author MongoDB for Web Development
  10. 10. About me Nothing but web since 1995 Joomla founder, MongoDB contributor Budding author MongoDB for Web Development Extreme Joomla! Performance
  11. 11. About me Nothing but web since 1995 Joomla founder, MongoDB contributor Budding author MongoDB for Web Development Extreme Joomla! Performance High-traffic projects (Jetsetter, MTV, Food Networks)
  12. 12. About me Nothing but web since 1995 Joomla founder, MongoDB contributor Budding author MongoDB for Web Development Extreme Joomla! Performance High-traffic projects (Jetsetter, MTV, Food Networks) Husband, dad, skate punk, metalcore bassist
  13. 13. How it all started
  14. 14. “I need a website, and want to be able to manage it on my own.”
  15. 15. We got that, we’ll just use a CMS.
  16. 16. Purpose of a CMS Manage content Organize navigation Dynamic search Self-service management of content
  17. 17. The result?
  18. 18. LAMP Linux, Apache, MySQL, PHP
  19. 19. Challenges of a CMS One size fits all Based on ubiquitous platforms Lowest common denominator
  20. 20. Nothing against MySQL, but...
  21. 21. Nothing against MySQL, but... Brittle, inflexible
  22. 22. Nothing against MySQL, but... Brittle, inflexible Difficult for scale
  23. 23. Nothing against MySQL, but... Brittle, inflexible Difficult for scale Difficult for speed
  24. 24. Nothing against MySQL, but... Brittle, inflexible Difficult for scale Difficult for speed Difficult to code with
  25. 25. Nothing against MySQL, but... Brittle, inflexible Difficult for scale Difficult for speed Difficult to code with Lack of relational features pushed relational logic into applications
  26. 26. Nothing against MySQL, but... Brittle, inflexible Difficult for scale Difficult for speed Difficult to code with Lack of relational features pushed relational logic into applications Zero portability as a result
  27. 27. Where that leaves us
  28. 28. Where that leaves us Everybody ran out and installed without asking
  29. 29. Where that leaves us Everybody ran out and installed without asking ISPs happily slashed choice
  30. 30. Where that leaves us Everybody ran out and installed without asking ISPs happily slashed choice End users and developers obsequiously took LAMP for granted as the Right Tool for the Right Job™
  31. 31. Where that leaves us Everybody ran out and installed without asking ISPs happily slashed choice End users and developers obsequiously took LAMP for granted as the Right Tool for the Right Job™ Managing content, from a relational database perspective, SUCKS
  32. 32. Where that leaves us Everybody ran out and installed without asking ISPs happily slashed choice End users and developers obsequiously took LAMP for granted as the Right Tool for the Right Job™ Managing content, from a relational database perspective, SUCKS Building CMS apps is not much better either!
  33. 33. Article with comments & tags Tags Articles Comments id id id tag title date_created slug author_id excerpt parent_id author_id subject ArticleTags date_created content id date_published article_id date_modified tag_id content
  34. 34. Then the trouble starts “Hey, can we add social media to our website?”
  35. 35. Websites aren’t just content
  36. 36. Websites aren’t just content Interactivity
  37. 37. Websites aren’t just content Interactivity Rich media
  38. 38. Websites aren’t just content Interactivity Rich media Social media
  39. 39. Websites aren’t just content Interactivity Rich media Social media Web services integration
  40. 40. Websites aren’t just content Interactivity Rich media Social media Web services integration Crazy, whack-daddy scale
  41. 41. “How long can this go on?”
  42. 42. Why develop in an object language, just to stuff mismatched chunks of your objects in a non- object data store?
  43. 43. Introducing:
  44. 44. What MongoDB can do
  45. 45. What MongoDB can do Simplifies development
  46. 46. What MongoDB can do Simplifies development Stores in binary JSON objects
  47. 47. What MongoDB can do Simplifies development Stores in binary JSON objects Return data directly to browser in JSON
  48. 48. What MongoDB can do Simplifies development Stores in binary JSON objects Return data directly to browser in JSON Store data, binary objects, whatevah!
  49. 49. CODE. Examples of MongoDB on the console, baby.
  50. 50. MySQL
  51. 51. MongoDB
  52. 52. MySQL
  53. 53. MongoDB
  54. 54. MySQL
  55. 55. MongoDB
  56. 56. Where that leaves us now
  57. 57. Article with comments, tags, categories id Articles title slug excerpt author_id date_created date_published date_modified content comments -- comment1 -- comment2 -- comment3 tags -- tag1 -- tag2 -- tag3 categories -- category1 -- category2 -- category3
  58. 58. Article with comments, tags, categories id Articles title slug excerpt author_id date_created Atomic date_published date_modified content comments -- comment1 -- comment2 -- comment3 tags -- tag1 -- tag2 -- tag3 categories -- category1 -- category2 -- category3
  59. 59. Article with comments, tags, categories id Articles title slug excerpt author_id date_created Atomic date_published date_modified content Simple comments -- comment1 -- comment2 -- comment3 tags -- tag1 -- tag2 -- tag3 categories -- category1 -- category2 -- category3
  60. 60. Article with comments, tags, categories id Articles title slug excerpt author_id date_created Atomic date_published date_modified content Simple comments -- comment1 -- comment2 Fast -- comment3 tags -- tag1 -- tag2 -- tag3 categories -- category1 -- category2 -- category3
  61. 61. Article with comments, tags, categories id Articles title slug excerpt author_id date_created Atomic date_published date_modified content Simple comments -- comment1 -- comment2 Fast -- comment3 tags -- tag1 Complete -- tag2 -- tag3 categories -- category1 -- category2 -- category3
  62. 62. What I’ve learned implementing CMS platforms with MongoDB under the hood
  63. 63. Lessons learned
  64. 64. Lessons learned Simplicity of code
  65. 65. Lessons learned Simplicity of code Performance
  66. 66. Lessons learned Simplicity of code Performance Simplicity of scale
  67. 67. Lessons learned Simplicity of code Performance Simplicity of scale Rich media storage
  68. 68. Lessons learned Simplicity of code Performance Simplicity of scale Rich media storage Amazing concurrency
  69. 69. Coming to a CMS near you
  70. 70. Drupal for MongoDB http://drupal.org/project/mongodb D7: mongodb_cache: Store cache items in mongodb D7: mongodb_field_storage: Store the fields in mongodb D7: mongodb_session: Store sessions in mongodb D6/D7: mongodb_watchdog: Store the watchdog messages in mongodb D6/D7: mongodb: support library for the other modules D7: mongodb_block: Store block information in mongodb. Very close to the core block API D7: mongodb_queue: DrupalQueueInterface implementation using mongodb http://sf2010.drupal.org/conference/sessions/mongodb-humongous-drupal
  71. 71. Even MORE Drupal Work to get listing API into core: http://drupal.org/node/780154 Experimental goodies to play with: http://drupalcode.org/viewvc/drupal/contributions/ sandbox/chx/dbtng_mongo_experimental/
  72. 72. Joomla! MongoDB helper library for Joomla! (come see me after the talk for access) Branch of 1.6 development for alternative query builder Full MongoDB support most likely in 2.0
  73. 73. Not CMS, but still relevant
  74. 74. Ruby & Rails MongoMapper http://github.com/jnunemaker/mongomapper/ Brings MongoDB to many RoR platforms RadiantCMS Typo Mephisto
  75. 75. Lithium PHP framework http://rad-dev.org/lithium/wiki MongoDB native support Projects demonstrating MongoDB support: http://rad-dev.org/lithium_mongo/source http://rad-dev.org/lithium_blog/source
  76. 76. CakePHP framework MongoDB datasource http://github.com/ichikaway/mongoDB-Datasource Example article http://mark-story.com/posts/view/using-mongodb- with-cakephp
  77. 77. PHP framework http://kohanaframework.org/ MangoDB http://github.com/Wouterrr/MangoDB
  78. 78. MongoDB Language Center http://www.mongodb.org/display/DOCS/Drivers
  79. 79. Community Resources http://www.mongodb.org/display/DOCS/ Community
  80. 80. Development Tracker http://jira.mongodb.org
  81. 81. MongoDB Cookbook http://cookbook.mongodb.org/
  82. 82. Explore MongoDB @Github http://github.com/search?q=mongo
  83. 83. Time for my favorite game Stump the Nerd™
  84. 84. Thanks! Email: mitch@spacemonkeylabs.com Skype: mitch.pirtle Web: http://www.spacemonkeylabs.com Slides: http://www.slideshare.net/ spacemonkeylabs
  85. 85. Photo credits business man 1, by Larissa Kanno A big goose, by Andrea http://www.sxc.hu/photo/877661 Kratzenberg http://www.sxc.hu/photo/1148702 Orient Lamp, by Greg Griffin http://www.sxc.hu/photo/964807 Steppe eagle, by Gabor Szakacs http://www.sxc.hu/photo/1044948 Binary code 1, by Flavio Takemoto http://www.sxc.hu/photo/1159613 Blue sportscar, by Jean Scheijen http://www.sxc.hu/photo/794992 Cats, by (anonymous) http://www.sxc.hu/photo/1273828 EW_PKB, by daniel wildman http://www.sxc.hu/photo/845589 Cougar on the prowl, by (anonymous) http://www.sxc.hu/photo/1253662

×