Live data from Hacker News

Why Did So Many Startups Choose MongoDB?

nemil.com

141–150 of 164 posts

Re: Why Did So Many Startups Choose MongoDB?

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

You can reimplement 95% of the "document model" with a relational database just fine, and you'll actually come out ahead given all its advantages.

Unstructured documents are very rare. Querying arbitrarily against them even more so. For the fields that do need querying in a document, put them apart and add a few indexes and you're good. That's been my experience and I've been around a while.

Re: Why Did So Many Startups Choose MongoDB?

#142
post #80

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)

Way back when I started reading HN, one thing that really struck me was seeing PHP discussed in a practical fashion rather than merely bashing it whenever it's mentioned as was the case in Proggit those days (often, the bashers obviously having very little experience building software). By that time I was doing most of my coding in Ruby and Python, but this businesslike approach to PHP made me realize this is a place…

What are you talking about? PHP has been rightfully bashed ever since it was created. If anything the bashing has substantially gone down in the past years as sane array notation has been added and a lot of weirdness has gone away.

Re: Why Did So Many Startups Choose MongoDB?

#143

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…

> PHP has changed A LOT in recent years — especially since the release of v7. I was curious and wanted to see if that is the case. So I checked for the most basic thing. The arrow notation for lambdas. Surely they must've added that by now. Surely they must've added that before Java did. Nope, still RFC. Now I wonder if it's idiomatic to pass those "long form" lambdas around when writing in functional style or is it…

I guess that's one way of judging a software language's progress, sure.

Re: Why Did So Many Startups Choose MongoDB?

#144
post #16

Back in 2012 I worked at a startup and we had a few backend data stores (Vertica, Postgres, Redis, Big Table, MySQL, Cassandra, ElasticSearch, Hadoop). When 10gen came along, they sold us an amazing vision. We were processing 500 million to billion social media messages a day and they sold us on this dream that we would have very fast writes, a cluster of 9 machines in master-slave-slave config for fail over. We woul…

You do realize it's 2017 now, right? Many things have changed in MongoDB (and in the IT world in general) during the last 5 years. MongoDB is a mature, established, full-featured database - recognized by Gartner as a "challenger" to more established RDBMS vendors like Oracle and Microsoft. http://bit.ly/2uP3Obi

Still no transaction control. It's not going anywhere any time soon.

Re: Why Did So Many Startups Choose MongoDB?

#145

I think Enterprise folks do not appreciate the flexibility afforded by NoSQL . For my startup I started off on PostGres SQL with Hibernate and it worked great ... until we first met our paying customers. They needed data elements that I had not envisioned and so we ended up doing Schema updates.. again and again . Since we used ORM (hibernate), that also meant new hibernate code generation . After a while this became…

The gotcha is going to come when your schema has dozens of fields whose existence is uncertain and they begin generating runtime errors when your code expects them to exist.

Re: Why Did So Many Startups Choose MongoDB?

#146

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…

But at this point that's all pretty much moot because competitors have caught up and there's hardly an advantage over Postgres' JSONB fields, which builds up on top of all the features Mongo will likely never have (transactions I'm looking at you).

Re: Why Did So Many Startups Choose MongoDB?

#147
post #22

Not to sound flippant but the reason why so many startups choose mongodb is because the problems they are working on are better suited to be addressed with a document-oriented database than relational database. And at the time, most of the mindshare is/was with mongodb for document-oriented technology.

What are those problems exactly?

Re: Why Did So Many Startups Choose MongoDB?

#148

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…

Have you ever worked on a significant project using MongoDB? I did. I wouldn't use it again. But reliability just wasn't an issue. There was a time when there were insane defaults that made this an issue, but that's a long time ago.

I am working on a significant project using MongoDB. Reliability absolutely is an issue even with significant engineering resources thrown at it.

Re: Why Did So Many Startups Choose MongoDB?

#149

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?

Mongoose is a lot simpler and less brittle than other ORMs in SQL land. That said, for most use cases, you don't need to use Mongoose.

When it comes to Mongo, I think it's nice to have the DB schema documented somewhere but you don't really need to have it enforced with Mongoose... It introduces more problems than solutions.

With Mongoose, you have to run migrations on your data more often which slows you down. Though it might make sense for bigger companies.

Re: Why Did So Many Startups Choose MongoDB?

#150

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

The OpenStreetMap website and editing API is written in Rails, not PHP. I think it was initally some other form of Ruby web application.

OSM started in 2004, but the editing API was ported to Rails in 2007ish.

Post reply on HN