Live data from Hacker News

Why Did So Many Startups Choose MongoDB?

nemil.com

91–100 of 164 posts

Re: Why Did So Many Startups Choose MongoDB?

#91

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

That Slack post is terrible. I can't believe they would site concurrency as a strength of PHP...."Asynchronously curl’ing to localhost (or even another web server) provides a shared-nothing, copy-in/copy-out way of exploiting parallelism." I almost have to wonder if this is satire

Re: Why Did So Many Startups Choose MongoDB?

#92
Because they have great docs. At least that's why I chose them for my (now defunct) startup back in 2013. I wasn't familiar with databases and their docs were extremely approachable and easy to understand and navigate, with lots of useful examples.

Re: Why Did So Many Startups Choose MongoDB?

#93
I wrote this series over several months and am happy to answer questions.

Part 2 will dive into the benefits of Mongo along with the mistakes that some teams made with Mongo. Part 3 will dig into Mongo's marketing strategy and how it influenced uptake. Sign up here to be notified: http://eepurl.com/cxs5Zr

As any reflective engineer, it's important for me to provide a thoughtful perspective backed by evidence. This can be a fraught discussion and I personally know teams that truly value Mongo, and other teams that had tremendous issues. I want to provide color about the early years of Mongo (not today). My key point is that as engineers, we have to get beyond hype, thinking critically and choosing the right tool for the job.

Re: Why Did So Many Startups Choose MongoDB?

#94

Earlier quoted context omitted.

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 th…

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

I think a web development class I took in college a few years ago spent maybe two or three class periods on SQL. Felt like enough to get by with, and learn more as you go.

Re: Why Did So Many Startups Choose MongoDB?

#95

Knowledge does not equal wisdom. Perhaps it was young folks with lots of knowledge didn't see the wisdom in using battle-hardened, boring technology.

It isn't an age thing. There are mid-life engineers where I work who are constantly trying to force the latest fad in tech into our engineering organization.

Re: Why Did So Many Startups Choose MongoDB?

#96

What NoSQL databases are people using today when they need something ACID compliant? CouchDB?

NoSQL originally meany to not use SQL as the query language However, most people think NoSQL as NotRelational - when there is no ACID guarantee. They are choosing availability over consistency.

ACID and relational are orthogonal. You can have ACID properties without a relational model. Much of the early literature on the subject merely discusses databases in general rather than any particular type. Here's an example from Jim Grey:

http://jimgray.azurewebsites.net/papers/thetransactionconcep...

Re: Why Did So Many Startups Choose MongoDB?

#97

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 stateme…

Of course I don't know your product, but when I imagine Powerpoint-as-a service, do users not relate to decks which relate to slides which relate to the content on those slides? Content itself of course would probably be a pretty flexible tree structure.

An app full of queries like "Get me all the content of slide Y of deck XXXX... or don't if the current user YYY doesn't have access to that" would make me itching for indices and foreign constraints across what definitely feel like relations to me.

And for the non-relational content blobs, Postgres's partial indices + indexes on expressions would make some fairly intricate reports like "since we launched the image embedding feature, per week, what percent of created or modified slides contain images", "who are the top 10 users in terms of edits to content tree items, and what subscription level do they have" pretty neat and fast.

If you're in early stages such that you don't want to hire or acquire DBA skills, you're probably well served by offloading replication/backup/verification (which are all very possible with RDBMS) to e.g. AWS's RDS product.

HA is important, is covered by replication+failover. Periodic backups are important, are covered by a export+rotate schedule. Point-in-time restores are important, are covered by storing replication logs. All are covered by a managed RDBMS, so you need to know what they are and how they work, but not implement or manage them. Most of the NoSQL deployments I've seen just rely on the out-of-the-box replication, and get HA but that's it. The engineers I've seen that don't want to understand the simple high-level ramifications-to-developers of RDBMS replication don't want to understand ramifications-to-developers about their NoSQL replication either, and they take a risk of encountering those ramifications needlessly unforeseen.

As the data grows, yeah, maybe you'll eventually hit technical or economical limits that mean you'll want to manage your own RDBMS with an application-tuned replication and sharding scheme, so you'll want to hire or train at that point -- but there's huge huge room to play within the economic and technical characteristics of modern managed cloud RDBMS-as-a-service for any app that has a hint of a business model, given that we measure the cost of such services in cents per billion unit-hours.

Re: Why Did So Many Startups Choose MongoDB?

#98
post #52

Earlier quoted context omitted.

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

Facebook does not "normal" PHP that much, they use host of languages, including Hack, erlang and lots of Python.

Right. That's why I said "Started With".

Re: Why Did So Many Startups Choose MongoDB?

#99

Earlier quoted context omitted.

You're not wrong, but those articles are 5+ years old and PHP has changed A LOT in recent years — especially since the release of v7. Still, that's not going to do much to change public perception, and I guess that's somewhat fair. PHP has earned it's reputation, even if many (but not all) criticism are now largely dated. I'm just happy I switched to working on other languages, aside from the occasional Laravel-based…

Thanks, that is absolutely worth pointing out. But there is only so much you can do to fix languages when they are designed with problems initially and you want to keep old programs working. I have the same concerns about ES6 BTW, although JavaScript foundations are arguably less flawed overall (excepting a few areas that are just bat shit crazy). Is public perception the reason you are happy to be mostly using somet…

It's certainly nice when talking in developer circles, but no, public perception is not the primary reason — it's more of a bonus :)

I really enjoy some of the more flexible syntax and design choices present in some other languages. It also help that various job requirements over the year have required that I build a broader skillset. Finally, the growth I've experienced by stepping outside my comfort zone the past few years is probably the best benefit, which is a good experience regardless of which language(s) you start with.

In the end, however, as we both know, most decisions in software development are an exercise in managing tradeoffs. I guess the core of my argument is that, in the past few years, PHP has done a great job at improving its balance of tradeoffs.

Re: Why Did So Many Startups Choose MongoDB?

#100

Earlier quoted context omitted.

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 th…

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

I finished my BS in CS 7 years ago. I took an elective class on relational databases. We spent about the first 25% of the class on relational algebra & SQL, and then used SQL fairly consistently for the remainder of the class.
Post reply on HN