Take the 2-minute tour ×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.

I am trying to compare and contrast MongoDB vs Cassandra. Our project is Java based. Some of the differences i found out are

Cassandra is highly available and partition supportive vs MongoDb is consistent and highly available(not so good with partitions).

MongoDb is document based.Cassandra gives more flexibility in terms of modelling the data and also storing JSON like structures directly into it.

But another difference someone told me is that Cassandra is Java stack based while MongoDB is Javascript based.

From a third party users(developers) perspective, how does the stack matter? Considering that i work on a Java project, would a product build on Java stack provide me additional benefits? If so what are those?

share|improve this question
1  
Can you give a link to that mongo is js based claim? –  fvu Oct 2 '14 at 0:33
    
One of my team mate told me so. –  user892871 Oct 2 '14 at 0:52

1 Answer 1

up vote 3 down vote accepted

This isn't really about Cassandra or MongoDB but rather about the maturity of the languages the systems are written in and the languages of the various supporting APIs.

Cassandra itself is written in Java whilst mongo is in cpp, when thinking about their ecosystems (or as you call it their stack) and the various langs that play a part you need to just think back to what makes a particular programming language advantageous. Below is my highly minimalistic take on the matter since there are many books and blogs covering this exact topic.

  • Popularity and community support. Hipster languages are really cool, until you don't understand what's going on and there's no one to help. Both c++ and java are very mature languages with a big user base. Both systems have various APIs that are implemented in popular languages.
  • Efficiency - I'm not going to get into a which lang is faster or more feature rich argument but we can safely say both dbs are again using very efficient languages that are continuously getting better.Plus at the end of the day, if the developer doesn't do their job properly, a lang's performance might be their last concern when it comes to optimisations.

At the end of the day Cassandra is well known for its massive scale [1] and Mongo has been pointed out to have scaling out issues, but this isn't because C++ has problems (lookup the magic that Facebook does with c++ and php) or because Java is some king of amazing big-scale language. It's just to do with how the systems have been implemented.

[1] From https://cassandra.apache.org/ (There was also a presentation by Apple at the 2014 C* summit)

One of the largest production deployments is Apple's, with over 75,000 nodes storing over 10 PB of data. Other large Cassandra installations include Netflix (2,500 nodes, 420 TB, over 1 trillion requests per day), Chinese search engine Easou (270 nodes, 300 TB, over 800 million reqests per day), and eBay (over 100 nodes, 250 TB).

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.