Hacker News new | past | comments | ask | show | jobs | submit login

At this point why would you use CouchDB over something like MongoDB?

Seriously asking...

Over the past 5 years MongoDB has gotten a great storage engine, transactions, distributed transactions, multi master replication, first class change streams and is very very solid as a foundational piece of infrastructure you can rely on while CouchDB has languished. I can’t imagine reaching for it in my tool belt when I need a document store over MongoDB but I’m obviously biased so I’m wondering if there is a lot I’m missing.

Obviously it’s cool from a more open source databases standpoint — I love learning about how things are built and evolve over time.




1. MongoDB is no longer Open Source.

2. MongoDB's design has historically been terrible; and, from my current experience with clients, is still a source of 'WTF's.


The main reason most people use CouchDB is because of the HTTP API and offline support with Couchbase Mobile and PouchDB. Doesn't CouchDB have most of those things already from 2.3?


I don't think couchbase has couchdb in mind for the mobile client anymore


Correct. The newest version of CouchBase mobile no longer supports CouchDB as a replication target. It can still be accomplish with the CouchBase Sync Gateway, but get complicated quickly.


I evaluated Couchbase mobile about a year ago and found although it worked well once setup there was a lot of overhead and the docs seemed a little all over the place and the fact that you can't also use the same DB on the web anymore with PouchDB meant I ultimately dropped it. It's a shame because there isn't really anything open source / self hosted like it for mobile.


MongoDB recently bought Realm which is an amazing mobile database with first class replication, so if I was starting a new project that also needs mobile I would definitely go with MongoDB.


Especially if you, jinjin2, are either a bot, or marketing shim??

I just verified every single post of you on hackers news in last 12 months, and every one, in different DB discussions are doing the some shamefull plug about Realm.

E v e r y o n e.

And not a single disclaimer from you, not to mention some of your posts (like here, what janl pointed) are simply not true.

Disgracefull. I'm leaving this comment for anybody in the future doing check on you to notice this.


last time I looked, realm did “last write wins” “conflict resolution”, which is just marketing speech for “randomly losing customer data”, which is something CouchDB decidedly works very hard to never ever do ;)


CouchDB is licensed under Apache License 2.0, while MongoDB uses SSPL, which was rejected by the OSI https://www.zdnet.com/article/mongodb-open-source-server-sid...


MongoDB has _suspiciously_ amazing SEO and marketing. CouchDB's by contrast is awful.

As silly as that sounds as a reason to choose CouchDB it demonstrates where the respective company's priorities lie.


MongoDB raised $311M in funding and is now a publicly traded US corporation: https://www.crunchbase.com/organization/mongodb-inc#section-...

CouchDB is a community-run Apache Software Foundation project (that has corporate contributors as well as individual contributors) at a much lower scale than MongoDB.

Of course MongoDB’s marketing is better, they are spending a lot of money on it. If you’d like to help out with CouchDB’s marketing, we can always use another helping hand :)


Similar story with RethinkDB which was actually a really nice database. I know it's not dead but I can't imagine starting a new project with it.


MongoDB is a an actual for-profit company, so of course it has marketing. CouchDB is an open source apache project. You are comparing apples to oranges.


Its not just CouchDB, I did a lot of searching a little while back and I generally just don't like how tightly they've wrapped up almost all of the results. If you go by searching alone its overwhelmingly MongoDB positive to such an extent that its hard to believe its organic.

It's definitely impressive marketing but when I'm deciding on which tool to use that arguably works against them as opposed to for them.


So you are choosing software on it's technical merit and not just on popularity and hype!? What if there are no breaking changes every third month, what are you gonna do? Solve actual problems!? :P


It sounds to me like they are choosing their software based off their marketing techniques.


Interesting. So they are catching a ride in the hype train by adopting the hyped technology... So this is why the tech stack is picked by and marketed to the business/directors rather then engineering.


How tightly they wrapped up the results? Perhaps you could give examples?


Mongo reminds me of Tesla - early products were shoddy but had incredible hype.

"It's incredibly fast!" "It's web scale!" "It'll be able to drive itself cross country in a couple of months!"

And I think the unfounded/exaggerated hype bothered a lot of us, but like Tesla, the actual product seems to have improved quite a lot as they've had time and resources to throw at it. So sure, some of us remember Teslas and MongoDB from 2013 and scoff, but the current reality is much different.


The link explains that CouchDB can have replicas on mobile phones and websites, meaning clients don't always have to be connected to the internet.

> The Couch Replication Protocol lets your data flow seamlessly between server clusters to mobile phones and web browsers, enabling a compelling offline-first user-experience


Does MongoDB have multi master replication or the classic election of one master from a pool of candidates ?

CouchDB has another pattern, each master is really a master and you can have live replication but also offline replication. You can connect two clusters every new moon and they will synchronize. For sure the clients may have to deal with potential conflicts but in practice it's very neat and that's what makes couchdb worth it if you need this feature.


MongoDB does replica sets and sharding. As far as I know it doesn't support multi-master architectures or data syncing. Even the Atlas-style global data distribution is sharding, right?


They are tools that solve different problems, imo. In CAP theorem[0] you have 3 groups of DBs.

CA databases: SQL databases that are hard to scale ("partition") but are always consistent and available.

CP databases: MongoDB style databases that are consistent and partition tolerant, but trade availability (sometimes your queries will fail during high load).

AP databases: CouchDB style databases. They are always available and are partition tolerant, but you may be querying stale data.

[0]: https://en.wikipedia.org/wiki/CAP_theorem?wprov=sfla1


> At this point why would you use CouchDB over something like MongoDB?

They are very different databases. But since they have come up are around the same time and because they look very similar on the surface, you might think you chose between them.

But when you look more closely at detail decisions on the technical details, at almost every point, where CouchDB goes one way, Mongo went the other way.

I’m not saying either decisions are better or worse, it’s just that they are very different database that you should evaluate on their merits, not just superficially.




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: