Live data from Hacker News

Why Did So Many Startups Choose MongoDB?

nemil.com

111–120 of 164 posts

Re: Why Did So Many Startups Choose MongoDB?

#111
post #32

I've seen a few comments mention RethinkDB ... what are the advantages over MongoDB? I can read their feature page but as someone who isn't an expert, I'm not sure what's marketing hype and what's genuine advantage.

The RethinkDB company went out of business last year, and unfortunately development has basically stopped, as you can see from the commits to their repo: https://github.com/rethinkdb/rethinkdb/graphs/contributors

The mailing list is also nearly dead with only a handful of posts total during 2017: https://groups.google.com/forum/m/#!forum/rethinkdb

RethinkDB did a lot of things right from an engineering perspective, but they were too late to market to compete with MonogDB; they burned through their cash, then went out of business, and now the devs work at various other companies (e.g., Stripe). RethinkDB is not a viable choice today.

I personally put enormous effort into trying to use RethinkDB (and Cassandra, and also MongoDB); now I very happily use PostgreSQL. just like I did back in the 1999, and I’m very happy with PostgreSQL.

Re: Why Did So Many Startups Choose MongoDB?

#112
You guys are discussing MongoDB from 2009. The database has evolved since then.

- There is a new replication protocol for replica sets, improving the election process.

- WiredTiger has been introduced and became the default storage engine.

- Journaling guarantees durability.

- Sharding architecture has changed. Config Servers are now deployed as Replica Sets and some of the tasks that used to be managed by mongos now are managed by the config servers.

- Storage efficiency has been added through compression.

- Security has been improved with encryption at rest.

- The aggregation framework has more options for BI.

- There are a variety of different indexes that can be created to improve query performance.

- and finally, stop saying MongoDB is schemaless because it is not. There is a schema in place and this schema is flexible enough to be polyform.

These are features available today in 3.4. You might have issues in the past, but if you really understand the newest architecture, you are capable of seeing how much MongoDB has grown since 2.4.

Re: Why Did So Many Startups Choose MongoDB?

#113
post #77

Earlier quoted context omitted.

Why is PHP a terrible language? It powers a vast part of the internet including sites huge, tiny, and everything in between. It's in vogue to hate on PHP especially here on HN. Language hate based on some sort of popularity contest is silly and language snobbery wont be tolerated at any company worth its salt (read: NOT most startups)

If you don't know, then I can't tell you :P Seriously, the biggest problem with php is that fundamentally it's a templating language. One thing I've seen with templating libraries in general, is that they are meant to take a template and a data structure and display output based on these 2, but what ends up happening is they end up converging on turing completeness. It starts with the need for some kind of looping st…

You described exactly what I'm experiencing. I've had this awkward feeling that was hard to describe in my current work and you were able to express my exact thoughts in words. Thanks for sharing

Re: Why Did So Many Startups Choose MongoDB?

#114
post #32

I've seen a few comments mention RethinkDB ... what are the advantages over MongoDB? I can read their feature page but as someone who isn't an expert, I'm not sure what's marketing hype and what's genuine advantage.

The company got bankrupted and they set up an org to fund its development. (Sagemath moved to Postgresql from RethinkDB after the company got sold. The guy behind sage said it was better in his blog about the switch)

Thanks; here’s my blog post: http://blog.sagemath.com/2017/02/09/rethinkdb-vs-postgres.ht...

Incidentally, http://www.lmfdb.org uses MongoDB (since maybe 2011) pretty heavily, as a result of me convincing them to do so after I read too much about MongoDB back then. It’s been painful for them, but it does still work well...

Re: Why Did So Many Startups Choose MongoDB?

#115

Earlier quoted context omitted.

MongoDB is like the PHP of databases. I started programming PHP and currently I bash it every time I can, because it is a terrible language. But it is easy to start and do cool stuff, just like mongodb. Initial traction is more important than initial architecture, I guess.

Right; Facebook, Wikipedia, OpenStreetMap - all serious tech stacks that started and (in the case of the last two) continue to use PHP. Reminds me of: https://slack.engineering/taking-php-seriously-cf7a60065329

Wikipedia launched in 2001. Facebook launched in 2004.

The choice was narrower then. Ruby and Python, while already active, did not have nice web and DB frameworks (both RoR and Django started in 2005). Java was also much less mature, and even more wordy.

PHP, on the other had, was easy to get from any shared hoster.

Re: Why Did So Many Startups Choose MongoDB?

#116
post #7

Earlier quoted context omitted.

Why wouldn't you always use something that is tried-and-true? MongoDB is relatively new compared to something like postgresql or even mysql.

If you actually need certain features like a document store, then Postgres is less mature than MongoDB in that regard.

The problem most developers who think they do really don't need a document store. They're just storing data and fields and relationships.

Re: Why Did So Many Startups Choose MongoDB?

#117
post #58

Earlier quoted context omitted.

If you actually need certain features like a document store, then Postgres is less mature than MongoDB in that regard.

I'll take "less mature" over "data loss" every day and twice on Sunday. Whatever else you might say about Postgres, that community cares about the integrity of its users data, over pretty much every other consideration. I don't think the same can be said of Mongo, or any other "NoSQL" anything.

> I don't think the same can be said of Mongo, or any other "NoSQL" anything.

I feel pretty good about DynamoDB, but the development model WRT to indexes and throughput is what keeps me away.

Re: Why Did So Many Startups Choose MongoDB?

#118
It's not just because of hype that teams choose Mongo. The flexibility of a schemaless db is pretty helpful in a startup scenario, where the requirements drastically change all the time.

Yes, migrations work for RDBMS too, but with Mongo you only write migrations for data changes, not schema changes - which means a lot less migrations.

The option of having documents with embedded objects/lists makes it a pretty natural mapping to Domain Driven Design concepts, like aggregate roots + aggregates. One might even argue that while following DDD, it's preferable to handle most rules at the application layer and use the database simply as a performant, low-maintenance storage service. I know some folks here might view this approach as a sin, but it works pretty well too, especially for smaller teams without a dedicated DBA.

Maybe it's just me that haven't ran large enough systems to find the kind of issues with mongo that people always rant about, idk. Honest question: considering all these advantages above (from a developer's point of view), are there good reasons for choosing something like PostgreSQL over Mongo for typical business apps?

Re: Why Did So Many Startups Choose MongoDB?

#119

Earlier quoted context omitted.

Maybe I'm too old now... but SQL is relational algebra translated into some sort of code/language. I did a lot of SQL & relational algebra for my undergrad databases class [which was about 20 years ago now]. Has SQL/DBs been phased out of CS education? Just genuinely curious...

A huge amount of people working as developers have no formal CS education whatsoever. In my company I even hear it touted as a perverse point of pride sometimes. (Kind of like, Oh you have a degree? I studied biology and I can still do the same job.)

I have a CS education, but have no real experience. So now, as a biomedical researcher, trying to rapidly prototype for medical devices and developing software is extremely daunting. I don't think these prideful people understand just how far a formal background can go to speed up the process when things get more complex.

Re: Why Did So Many Startups Choose MongoDB?

#120

Earlier quoted context omitted.

If you actually need certain features like a document store, then Postgres is less mature than MongoDB in that regard.

Have you actually studied the JSONB capabilities of PostgreSQL and related features such as partial indexes? These things can be used at scale and there is at least one company that has millions of partial indexes in production. And you might want to look at how SalesForce has implemented a highly scalable architecture on top of Oracle RDBMS servers. That includes a document store as well as a dynamic denormalized sc…

Honestly you can say any of these things about MongoDB. Their marketing team sure does. Did you know MongoDB is web scale?

I'm not insulting Postgres (actually a big fan), but Postgres added JSON support after. By that metric, document store in Postgres is less tried-and-true than MongoDB. Does that mean it's the wrong choice? No. Age of product is not always a good qualifier.

Post reply on HN