Live data from Hacker News

Why Did So Many Startups Choose MongoDB?

nemil.com

41–50 of 164 posts

Re: Why Did So Many Startups Choose MongoDB?

#41
post #2

This post makes the assumption that MongoDB isn't doing well based on Hacker News. MongoDB the company, and product, are doing extremely well (outside of anecdotal Hacker News posts), based on objective metrics like downloads, skills, jobs, and company revenue (and the company is nearing 900 employees on linkedin). To put it another way, RethinkDB did extremely well on Hacker News. Twitter didn't, if you remember all…

But MongoDB's own cite cites Indeed.com Job Trends data only through 2012, on the basis that Mongo's growth is a reason to use it.

Current Indeed.com Job Trends data actually show better numbers than the 2102 stats, but nonetheless show MongoDB jobs in decline.

https://www.indeed.com/jobtrends/q-MongoDB.html

Re: Why Did So Many Startups Choose MongoDB?

#42

I still think MongoDB is a good database. Conceptually, It's not as good as RethinkDB but it's not too far off. It's good to not have to deal with SQL and horrible ORMs anymore. TBH, I'd rather write SQL directly rather than use an ORM though. I never want to use an ORM ever again. At least that's one problem that MongoDB solved.

I don't understand what you're saying MongoDB solved. Mongo has ORMs too like Mongoose.

Why did you think you can only use SQL with an ORM? And if you didn't think that, then what was your point?

Re: Why Did So Many Startups Choose MongoDB?

#43
post #7

The misplaced hype cycle is real. 10gen is not a company dedicated to databases, at least not if the initial code quality of MongoDB is a signal (and it should be, since if you know a thing or two about storage you wouldn't take the compromises it initially did) Unfortunately, many fresh graduates with no experience in storage decided to evaluate the technology based on its very visible merits, without considering th…

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

My guess...

SQL is a lot for newcomers to grasp on top of learning the rest of their stack. The appeal of "no schema" is most likely what gets them as it seems easier than SQL. Simple things at first seem daunting like: constraints, joins, and indexes. What they fail to see is that doing these database level things in the application layer becomes the final level hell and you get to live it.

People also undervalue their data and it's integrity.

I personally do not like mongo and see zero reason for it except perhaps in some very niche use cases and even then, I'd still choose another document store over it.

Re: Why Did So Many Startups Choose MongoDB?

#44

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

Well, Facebook and Wikipedia are using HHVM to execute their PHP code, so at least those two are not really satisfied with PHP. I bet they'd like to rewrite their code in a faster, more memory-efficient, language but are hindered by the complexity of their code base.

Re: Why Did So Many Startups Choose MongoDB?

#45
I have been paid by two companies to remove Mongo. One that was hosted at the Mongo HQ. (The mongo HQ guys are really nice). At small startups, things are on fire and people need answers quick. "How many users tried this, how many times was feature x used," on and on. If it is in mysql, well i just setup a vpn and a read mysql access, done -- they can query away.

If it is all in mongo? Welp. How is your python? "See there is this key, and you need to sum this -- OH and remember that this does.. Hmm, "

Re: Why Did So Many Startups Choose MongoDB?

#46
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.

Not only that but you can use PostgreSQL as a NoSQL and there are benchmarks showing that it outperforms MongoDB. And if you do not want to commit to either SQL or NoSQL, the PostgreSQL has you covered. You can put a JSONB column in any of your tables to handle the part of your data that is schemaless, and you can still index the data in that JSONB column. There are a very few applications that need distributed scala…

These PostgreSQL features are relatively recent. The jsonb column type dates back to 9.4, which was released in Dec 2014, less than three years ago. MongoDB had been around for well over five years by that point.

There are few applications that need distributed scalability beyond what PostgreSQL can provide, but I'd argue that it's not uncommon to have problems with Oracle scalability, if you don't have deep pockets for licensing.

Re: Why Did So Many Startups Choose MongoDB?

#47
I use Mongo & its been working great. Our data is not relational (imagine you were tasked with building "Powerpoint" on the web).

Compared to mysql I like that it has automatic failover out of the box. I can also just add new replica set members without having to stop the master or bring a slave offline to rsync it over.

With something like mysql I have to learn about & choose between row based replication or statement based replication. I have to choose between binary logging or global transaction ID logging. With Mongo I just call rs.init() and rs.add() and it "just works".

Perhaps I'm just not hitting the level of traffic where the problems begin to surface, or maybe postgres would be better... but its been great so far. No complaints. The only issue was de-normalized data getting out of sync due to bad coding in our app, which i do not blame Mongo for (and was simple to fix).

Re: Why Did So Many Startups Choose MongoDB?

#48

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.

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)

This lack of insight is why PHP developers have lower average salaries than non-PHP developers.

If you think PHP is looked down on by those who care about language features because of a popularity context, rather than because of asinine language decisions and limited support for modern programming paradigms, I think it's you who is missing it. Since any program can technically be written in any (Turing Complete) language, the fact that some big sites were made to work with PHP also sort of misses the point. When most of the big "success stories" adopted PHP, options for web-friendly open source languages were much thinner. Now if you look at the new development projects they highlight, you don't see PHP come up that much. Facebook, for example, is prominently using Haskell. I don't know anyone who both programs in Haskell and is willing to touch PHP.

Of course, many thoughtful criticisms of PHP have been discussed on HN. e.g. https://eev.ee/blog/2012/04/09/php-a-fractal-of-bad-design/ & http://poincare101.blogspot.com/2011/11/php-sucks-but-some-f....

Re: Why Did So Many Startups Choose MongoDB?

#49
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.

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 schema layer that works real well for reporting.

Heck, I've implemented a persistent memcache server on top of SQLITE and it scaled pretty well because modern servers and network infrastructure just happen to do most of the work needed.

It is not easy to learn PostgreSQL well enough to evaluate it, but more and more people are doing so and finding that it is the ideal open source persistence solution for the vast majority of business uses.

Post reply on HN