Why I’m So Happy About MongoDB

Tuesday, December 13, 2011I’ve been building web apps with SQL databases for over a decade. I love SQL and the things it has enabled us to create.
But, managing SQL schemas is a huge pain in the ass.
SQL schema migrations are generally feared by the team. Not overtly, but any time a feature comes up that requires a schema change, people try to find a way around it. I’m sure everyone has a different process and for some, SQL migrations are painless, but not for most environments and teams.
The NoSQL movement in general is going to blow this pain away for the most common case web apps. That’s not to say SQL won’t always have a special place in our system, I believe it will remain in common use for a long time and continue to evolve.
But, as I’ve been tinkering with MongoDB over the last few weeks, I felt a paradigm shift.
Suddenly I can write applications that are smart enough to migrate their own schema changes.
Suddenly I can save and query trees and reduce complex application logic.
Holy crap, this makes my code much simpler. I’m in love.
Could I have done all this with SQL? No doubt, but not without pain. It’s the reduced friction I am so fucking excited about. Less friction means more iterations, more productivity, faster learning, good times.
So why call out MongoDB specifically?
It’s open source done right. Few open source products reach a level of ubiquity comparable to WordPress, MySQL, PHP, Rails, etc… but I can see 10gen is doing things right with Mongo, and it’s going that way. This is why I mostly hear MongoDB when people talk about NoSQL products in general.
You don’t have to be the first to market to dominate it, and I’d bet 10gen is going to prove that. Of course there’s room for a lot of competition, and competition is important. I’m also excited about Cassandra, CouchDB, Redis, and others.
Now, I will say I don’t have any experience with scaling MongoDB yet. I am excited mostly for the patterns it makes possible, but I feel confident that the product is evolving and over time it will be as stable and scalable as any other top tier solution.
So if you haven’t started tinkering with NoSQL yet, get to it, and be ready for a total change of mindset. It’s not supposed to be a direct drop-in for MySQL, so the queries and techniques are a little different.
I will start publishing my own NoSQL techniques on this blog soon, so subscribe for updates!
Discuss it on Hacker News
Hide comments

Add New Comment


  • Post as …
  • Image

Showing 5 of 6 comments

  • Kurtis Rainbolt-Greene, Hacker, Writer, Minimalist, & Father.
    I would love to say “I really like MongoDB” and for many of the same reasons as you are happy about it, but I realize I don’t like it.Not that it’s bad, or doesn’t work for me, it’s that while I use it on 90% of my personal projects (most that require a DDB) it’s only because of the Ruby library “Mongoid”. The Mongoid ruby gem makes using MongoDB excellent and there’s really no substitute. Not having to generate migrations, being able to look at one file in a rails project to understand a model, the subclassing brilliance. It’s all too good to be true.But then I read posts like these and it makes me realize that I could shift the underlying database and *still be happy*. Which got me looking for alternatives and one of those I found that keeps hitting me as a “Better DDB” is Riak.

    If Riak had an ODM like Mongoid and an easy install process like MongoDB (In that Mongo has just about 0 hurdles) then I would never look back at MongoDB.

  • Eric Ingram, Entrepreneur, software architect, designer, blogger
    Happiness with the tools is really what makes me happy about NoSQL in general. The libraries are more modern, useful, elegant, and my software will become simpler by convention with it.

  • Mansour
    I’m working on a website (still designing stage) and when I went onto research about what technologies are used on the backend side of things that scale well, I found a whole set of things I had never heard of. MongoDB, Tornado web server, nginx as load balancer, rabbitMQ, memcached, … . And having merely read the featureset and the concepts behind NoSQL and MongoDB manual, I was drooling all over. I share your love for these stuff. They’re irresistible.

  • Khuram Malik
    I feel the same way – Look forward to seeing your techniques in the near future. Im not a veteran in SQL, i’ve only used it on and off for the last year or so, but i can still see the advantages where MongoDB is concerned, and it was the same reasons that excited me too. I’ve only been using MongoDB for about 2 weeks!