views:

213

answers:

5

Our website needs a content management type system. For example, admins want to create promotion pages on the fly. They'll supply some text and images for the page and the url that the page needs to be on. We need a data store for this. The criteria for the data store are simple and defined below. I am not familiar with CouchDB or MongoDB, but think that they may be a better fit for this than MySQL, but am looking for someone with more knowledge of MongoDB and CouchDB to chime in.

On a scale of 1 to 10 how would you rate MongoDB, CouchDB, and MySQL for the following:

  • Java client
  • Track web clicks
  • CMS like system
  • Store uploaded files
  • Easy to setup failover
  • Support
  • Documentation

Which would you choose under these circumstances?

A: 

I think there are plenty of other posts related to this topic. However, I'll chime in since I've moved off mysql and onto mongodb. It's fast, very fast but that doesn't mean it's perfect. My advice, use what you're comfortable with. If it takes you longer to refactor code in order to make it fit with mongo or couch, then stick to mysql if that's what you're familiar with. If this is something you want to pick up as a skillset then by all means learn mongodb or couchdb.

For me, I went with mongodb for couple of reasons, file storage via gridfs and geolocation. Yea I could've used mysql but I wanted to see what all the fuss was about. I must say, I'm impress and I still have ways to go before I can say I'm comfortable with mongo.

With what you've listed, I can tell you that mongo will fit most of your needs.

luckytaxi
+3  A: 

Here are some quick answers based on my experience with Mongo.

Java client

Not sure, but it does exist and it is well supported. Lots of docs, even several POJO wrappers to make it easy.

Track web clicks

8 or 9. It's really easy to do both inserts and updates thanks to "fire and forget". MongoDB has built-in tools to map-reduce the data and easy tools to export the data to SQL for analysis (if Mongo isn't good enough).

CMS like system

8 or 9. It's easy to store the whole web page content. It's really easy to "hook on" extra columns. This is really Mongo's "bread and butter".

Store uploaded files

There's a learning curve here, but Mongo has a GridFS system designed specifically for both saving and serving binary data.

Easy to set up failover

Start your primary server: ./mongo --bindip 1.2.3.4 --dbpath /my/data/files --master Start your slave: ./mongo --bindip 1.2.3.5 --dbpath /my/data/files --slave --source 1.2.3.4

Support

10gen has a mailing list: http://groups.google.com/group/mongodb-user. They also have paid support.

Their response time generally ranks somewhere between excellent and awesome.

Documentation

Average. It's all there, but it is still a little dis-organized. Chock it up to a lot of new development in the last.

Gates VP
+2  A: 

Hi,

Each one is suitable for different usecases. But in low traffic sites mysql/postgresql is better.

Java client: all of them have clients

Track web clicks : mongo and cassandra is more suitable for this high write situation

Store uploaded files : mongo with gridfs is suitable. cassandra can store up to 2gb by each column splitted into 1 mb. mysql is not suitable. storing only file location and store the file in the filesystem is preffered for cassandra and mysql.

Easy to setup failover : cassandra is the best, mongo second

Support : all have good support, mysql has the largest community, mongo is second

Documentation : 1st mysql, 2nd mongo

I prefer MongoDB for analytics (web clicks, counters, logs) (you need a 64 bit system) and mysql or postgresql for main data. on the companies using mongo page in the mongo website, you can see most of them are using mongo for analytics. mongo can be suitable for main data after version 1.8. the problem with cassandra is it's poor querying capabilities (not suitable for a cms). and the problem with mysql is not as easy scalable & HA as cassandra & mongo and also mysql is slower especially on writes. I don't recommend couchdb, it's the slowest one.

my best

Serdar Irmak

sirmak
A: 

I don't see anything here like "must handle millions of req/s" that would indicate rolling your own would be better than using something off the shelf like Drupal.

jbellis
My website currently communicates with the backend via SOAP interface. The CMS part of the website will need some of this information. It also needs to be able to share session data with the main part of the site. Is there a Java solution for this with a fair license?
Bradford
A: 

My take on CouchDB:

Java Client: Is great, use ektorp which is pretty easy and complete object mapping. Anyway all the API is just Json over HTTP so it is all easy.

Track web clicks: Maybe redis is a better tool for this. CouchDB is not the better option here.

CMS like system: It is great as you can easly combine templates, dynamic forms, data and etc and collate them using views.

Store uploaded files: Any document in couchdb can have arbitary attachments so it's a natural fit.

Easy to setup failover: Master/master replication make sure you are always read to go, database never gets corrupts so in case of failure it's only a matter of start couch again and it will take over where it stop (minimal downtime) and replication will catch the changes.

Support: Have a mailing list and paid support.

Documentation: use the open book http://guide.couchdb.org and wiki.

diogok