Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Turning off the LAMP Hunter Loftis, Skookum Digital Works

mongodb
August 16, 2012
1.4k

Turning off the LAMP Hunter Loftis, Skookum Digital Works

When Skookum Digital Works investigated the massive project of re-architecting a large social media site, a common theme arose: their client wanted to experiment, but its LAMP stack was getting in the way. Too big, too heavy, too rigid. Manipulating one variable caused cascading effects, and broke something else. SDW proposed an uncommon, but increasingly popular, solution: a document-oriented database. Dozens of tightly-coupled relational entities could be decoupled into documents. Business logic could grow more flexible and less error-prone. This is the story of moving a large user-driven website from a LAMP stack to a node-mongodb stack: what went right, what went wrong, and everything in-between.

Speaker Bio: Hunter Loftis is the Director of Technology at Skookum Digital Works. At SDW, his team trains early in emerging technologies to provide experienced leadership when new tech is adopted. Today, SDW specializes in HTML5, responsive design, heavy JavaScript, node.js and other dynamic platforms.

mongodb

August 16, 2012
Tweet

Transcript

  1. Turning off the LAMP
    Hunter Loftis
    Director of Technology
    Skookum Digital Works
    Wednesday, August 15, 12

    View full-size slide

  2. Skookum who?
    Wednesday, August 15, 12

    View full-size slide

  3. Wednesday, August 15, 12

    View full-size slide

  4. Wednesday, August 15, 12

    View full-size slide

  5. Project X
    Wednesday, August 15, 12

    View full-size slide

  6. The Issues
    • 250 tables
    • $2,800/month to host
    • 5+ second page loads
    • “schema paralysis”
    Wednesday, August 15, 12

    View full-size slide

  7. Wednesday, August 15, 12

    View full-size slide

  8. Our Hypothesis
    Wednesday, August 15, 12

    View full-size slide

  9. Documents
    • Faster
    • ...for cheaper hosting.
    • ...and shorter loadtimes.
    • Simpler
    • ...and easier to change.
    • ...without breaking stuff.
    Wednesday, August 15, 12

    View full-size slide

  10. Results
    Wednesday, August 15, 12

    View full-size slide

  11. (onload: 774ms, DOMContentLoaded: 694ms)
    Wednesday, August 15, 12

    View full-size slide

  12. $24k/year (71%)
    projected hosting savings
    Wednesday, August 15, 12

    View full-size slide

  13. Wednesday, August 15, 12

    View full-size slide

  14. But...
    Wednesday, August 15, 12

    View full-size slide

  15. “... they basically had no idea what
    MongoDB was and do not support it at
    all.”
    Wednesday, August 15, 12

    View full-size slide

  16. “They've advised me that with MongoDB,
    the entire DB goes into RAM.”
    Wednesday, August 15, 12

    View full-size slide

  17. Developers will try to use
    mongo like SQL (at first).
    Wednesday, August 15, 12

    View full-size slide

  18. You will miss JOINs
    (sometimes).
    Wednesday, August 15, 12

    View full-size slide

  19. Not all data makes sense as
    documents.
    Wednesday, August 15, 12

    View full-size slide

  20. Keep it simple, and mongo
    will rock your world.
    Wednesday, August 15, 12

    View full-size slide

  21. Thank you.
    • skookum.com
    • @skookum
    • @hunterloftis
    • github.com/Skookum
    Wednesday, August 15, 12

    View full-size slide