Live data from Hacker News

Guide to MongoDB for startups

optinidus.com

11–20 of 66 posts

Re: Guide to MongoDB for startups

#11
post #7

I find it somewhat depressing that the first comments on any post about MongoDB generally seem to be short, disparaging and dismissive without offering much if any substance. We use MongoDB in production, processing millions of new records every month and it works great. Our data has differing and evolving schemas and can be used as JavaScript objects or python dictionaries with little effort. It works and performs w…

> It works and performs well for us and our use case.

100% agree. I think it's become cool to knock MongoDB, just because it is MongoDB.

It isn't a silver bullet, and its use cases are more limited than RDBMs. But if you know what you're doing, it has some great applications.

Re: Guide to MongoDB for startups

#12
I guess this is a good introduction to some of the internals, However its very very high level. If I were to give one piece of advice it would be to plan out your primary key's according to your data access pattern. This is especially true if you know you will need to be sharding across multiple nodes.

Re: Guide to MongoDB for startups

#13
post #7

I find it somewhat depressing that the first comments on any post about MongoDB generally seem to be short, disparaging and dismissive without offering much if any substance. We use MongoDB in production, processing millions of new records every month and it works great. Our data has differing and evolving schemas and can be used as JavaScript objects or python dictionaries with little effort. It works and performs w…

There was a spate of high profile "why we moved from MongoDB to $other_database" articles a year or so ago of startups getting burned when they realised that the all-signing all-dancing cure-all database they (thought they) had been sold, in fact wasn't.

The issues encountered ranged from MongoDB failing to scale out as easily as promised, to significant loss of data. There was also some backlash because MongoDB didn't (and perhaps still doesn't) persist data to disk when it acknowledged it as received[0].

A general perception grew, rightly or not, than MongoDB was being marketed by 10Gen[1] over and above its capabilities. Then the actual message of "MongoDB is not a drop-in replacement for traditional RDBMSs like PostgreSQL and MySQL, and is not the ideal solution to every problem" has been filtered down to "MongoDB is a terrible product with no use cases whatsoever." Such is the effect of the HN echo chamber.

Much like PHP, MongoDB is now simply a product that you cannot say anything good about on HN, even if you are in fact finding it an effective tool for your use case in spite of its shortcomings.

[0] Cynically, because they were trying to win benchmarks. Less cynically, because the use case was semi-ephemeral data where possibly losing some data is acceptable.

[1] Now also called MongoDB

Re: Guide to MongoDB for startups

#14

Here's my one-word guide: Don't.

I came to here say this as well.

You came here to write a one-word comment about a database too, found it already written, so instead decided to write "me too"?

Or did you instead have a detailed and carefully plotted comment about the problems with Mongodb, but then you read "nasalgoat's" comment and found his concision so bold and bracing that you were intimidated from contributing your comment?

If so, I urge you to reconsider.

Re: Guide to MongoDB for startups

#16
post #7

I find it somewhat depressing that the first comments on any post about MongoDB generally seem to be short, disparaging and dismissive without offering much if any substance. We use MongoDB in production, processing millions of new records every month and it works great. Our data has differing and evolving schemas and can be used as JavaScript objects or python dictionaries with little effort. It works and performs w…

Well, I'll explain why I'm a naysayer on NoSQL.

I will grant that "don't use NoSQL" isn't the correct advice in absolutely all cases. Once in a blue moon there is a case where it's the best solution, and if you say you have one of those cases, fair enough, I'll take your word for it.

But the vast majority of people who use NoSQL should be using a relational database instead. And the consequences of using NoSQL where you shouldn't, can be very bad indeed. (If your data gets messed up, it's not like a bug that can be put right just by fixing your code.)

So I will stand by "don't use NoSQL" as general advice. If you're really sure you know what you're doing, if you have sufficient expertise on databases and understanding of the present and future characteristics of your workload to be certain you're an exception, fine; but then you don't need general advice in the first place.

Re: Guide to MongoDB for startups

#17
post #7

I find it somewhat depressing that the first comments on any post about MongoDB generally seem to be short, disparaging and dismissive without offering much if any substance. We use MongoDB in production, processing millions of new records every month and it works great. Our data has differing and evolving schemas and can be used as JavaScript objects or python dictionaries with little effort. It works and performs w…

Aphyr has thoroughly explained what is wrong with MongoDB[1]. I'm quite sure that things aren't probably as swell with your tech stack you might imagine. A commenter here has in the past demonstrated how to cause someone using MongoDB data problems by sending too much information too quickly for MongoDB to handle in a targeted way although I can't find the link to it now. I have been wanting to try it myself to see if I could do it too. Firebase uses MongoDB[2]:

"Firebase stores all its data in MongoDB which offers the built-in capability for apps to scale automatically and gives each piece of data its own unique URL stored in JSON documents."

I was going to see if I can get achieve data consistency problems there for my own firebase app.

Also posts that malign MongoDB frequently make it to the home page [3][4].

[1] http://aphyr.com/posts/284-call-me-maybe-mongodb

[2] http://www.mongodb.org/about/production-deployments/

[3] http://www.sarahmei.com/blog/2013/11/11/why-you-should-never...

[4] http://www.aaronstannard.com/post/2013/12/19/The-Taxonomy-of...

Re: Guide to MongoDB for startups

#18
Startups should use a relational database unless their requirements (current and future) exactly fit a nosql model - which is difficult to predict. You can migrate later if scalability becomes an issue. Going nosql first (considering that most startups lack enough design experience) will make things messy and would make it difficult to scale when needed.

Re: Guide to MongoDB for startups

#19
As mkohlmyr mentions, it is unfortunate that MongoDB is offhandedly dismissed, however by the second paragraph of the linked article you have to appreciate how such hostility comes about.

But what is it that SQL databases could not solve which lead to the evolution of NoSql databases...{some "big data" changes to the world}...Which means processing huge amount of data. Which SQL databases were never designed for.

Firstly, specialized data storage and retrieval, including unstructured or document oriented, existed long before SQL did. Your filesystem is just such a system. Everything old is new again.

And secondly, a citation is required for the SQL databases "were never designed for" huge amounts of data claim. To start with, a definition of huge is necessary to make such a claim. 1GB? 1TB? 100TB? There are SQL solutions that work with all of those with ease. Many of the largest databases on the planet are humming away on SQL systems right now. SQL is abstract from the underlying platform, so if you have a cluster of 100 machines each in front of 1000 storage arrays each in front of 100 SSDs, it doesn't suddenly become "NoSQL".

SQL databases are generalized solutions. They generally do not solve specific, individual problems as well as precisely engineered solutions, which is why giant companies like Google, with extremely precise needs (e.g. index the web) have solutions that do a much better job for their purposes. Does that apply to your needs at all, though? Are you looking at your specific requirements, engineering precise storage and retrieval that is optimal? Probably not. Saying "MongoDB is under the umbrella of NoSQL, and NoSQL also kind of encompasses highly specialized solutions from industry leaders, so it will work for my startups contacts databases" is very, very poor, misleading reasoning. But we see it all of the time on HN in regards to solutions like mongodb. Which again is how you get responses that might seem hostile.

Re: Guide to MongoDB for startups

#20
post #7

I find it somewhat depressing that the first comments on any post about MongoDB generally seem to be short, disparaging and dismissive without offering much if any substance. We use MongoDB in production, processing millions of new records every month and it works great. Our data has differing and evolving schemas and can be used as JavaScript objects or python dictionaries with little effort. It works and performs w…

That's because it really is a terrible database. It does absolutely nothing better than other popular databases. It's slower, less durable and has less features than Postgres, but also slower, less reliable and worse at sharding than Cassandra.
Post reply on HN