Last weekend at the AT&T Mobile Hackathon I had a pleasure of checking out the MongoLab’s MongoDB service. In short: it was a delight to work with. I fell in love with that technology. It worked exactly the way I thought–MongoDB architects got it right. After spending a good part of the day fighting my hibernate configuration in JUnit I was pleasantly surprised when I saw that Mongo keeps their documentation and design accessible with plan old object and simple REST calls to its MongoLab API.
MongoLab makes creating a MongoDB super easy. You can sign up for a dev account and within minutes get an instance that will hold up to 240MB of data. It’s perfect for a prototype. In 15 minutes I was up and running and had my unit test executing flawlessly. It took a couple of more hours to refactor the application to move my serialization from MySQL + Hibernate to MongoDB. In a total of three hours the port was complete.
The web interface on MongoDB made it easy to see if my app was serializing data correctly. I created one collection for Unit Test and another collection for my production data. Collections can be limited in the number of records so they wouldn’t flood my account with test data.

Working with Mongo right after working with Hibernate and MySQL made me realize something. In 2000-2007 we built up some complicated protocols and frameworks. The last couple of year the simplicity seems to have taken off. A lot of people wrote off Java because of the complexities, but I can tell you that Spring+Annotations and MongoDB brings the joy back to Java web development again.





©ProgrammableWeb.com 2012. All rights reserved.
Terms of Service | Privacy Policy
7 Responses to “How I Scrapped MySQL for MongoDB in Three Hours”
at 11:32 pm
I want to love MongoDB, but there are several issues I have with it.
1.) Security. You can password protect against writes, but you can read with out having authed against it.
2.) No built in joins, you have to do this external. You can do with CouchDB.
3.) No Master/Master replication. Only Master/Slave.
at 12:50 pm
are you sure you can read without a password? It seems like there is a password on connection in my tests. I assumed that prevents reads and writes.
Have you tested the version deployed by MongoLab?
at 10:38 pm
You need to authenticate to read or write.
at 10:52 am
[...] databases are all the rage these days. We recently discussed moving from MySQL to MongoDB within hours. The rise of NoSQL is often associated with the need to not just store large amounts [...]
at 6:57 pm
[...] How I Scrapped MySQL for MongoDB in Three Hours – I can tell you that Spring+Annotations and MongoDB brings the joy back to Java web development again [...]
at 8:01 am
[...] week we had 45 new APIs added to our API directory including a hosted MongoDB database, live chat platform, fact sharing service, podcast retrieval service, distributed graph database, [...]
at 7:49 am
[...] How I Scrapped MySQL for MongoDB in Three Hours (programmableweb.com) [...]