News for hackers. Stuff that matters.
Re:MongoDB queries don’t always return all matching documents by Joeboy on Tuesday June 07, 2016 @05:18PM (#11857941)
> don't use mongo, it's just hype

I'm kind of curious as to where this hype is. I've almost never heard anybody say anything positive about mongodb. All I ever see is people saying it's terrible / hilarious for various reasons.

Re:MongoDB queries don’t always return all matching documents by throwaway420 on Tuesday June 07, 2016 @06:24PM (#11858480)
Like with any online community, Hacker News can be kind of an echo chamber where groupthink reigns and alternative points of view aren't encouraged. MongoDB hype has died down here, but there are still some people that are fans.

There are some things MongoDB does fairly well:

* MongoDB is really easy to use

* Document databases can be great and flexible solutions for some kinds of projects

* Documentation is fairly good so learning the basics isn't too hard even if you know nothing about it

* scales fairly well at the initial stages

* arguably quicker to get a project off of the ground with than traditions RDBMs, which might be the most important consideration for any startup even if a complete rewrite would eventually need to take place

That being said, I've used MongoDB significantly before and it wouldn't be my first choice for most types of new project: PostgreSQL probably would be

Re:MongoDB queries don’t always return all matching documents by chaostheory on Tuesday June 07, 2016 @07:11PM (#11858788)
About the only thing I agree with is how great their docs are.

* Mongo is only easy to learn. Beyond simple demos, it gets harder and harder to use as projects evolve i.e. you have to do a lot of work yourself imo this is a common problem with nosql datastores that isn't exclusive to Mongo

* "Document databases can be great and flexible solutions for some kinds of projects": Postgresql has been able to work directly with JSON for some time now. There are also other document datastores that are more reliable than Mongo

* Scaling with Mongo is difficult, specifically the crazy setup. Even if you set it up properly, the results don't tend to match the marketing https://aphyr.com/posts/322-jepsen-mongodb-stale-reads

* "arguably quicker to get a project off of the ground with than traditions RDBMs" unless you're using Meteor, I'm also going to disagree here. Most frameworks target a relational database by default. Developing by convention tends to get you off the ground much faster than using something more specialized and niche

Re:MongoDB queries don’t always return all matching documents by rdtsc on Tuesday June 07, 2016 @08:28PM (#11859164)
But they do make great mugs. Who here doesn't have at least a couple of MongoDB mugs. I don't use MongoDB and still have a bunch from random conferences over the last 3-4 years.
Re:MongoDB queries don’t always return all matching documents by partycoder on Tuesday June 07, 2016 @07:09PM (#11858764)
Re:MongoDB queries don’t always return all matching documents by vonklaus on Tuesday June 07, 2016 @06:54PM (#11858664)
Idk about hype, but for node.js virtually every tutorial uses it. I think the stereotype is that postgres locks you into a data model but your needs vary drastically. I suspect mongo is harder to retool the schema than it is widely claimed, while pg/msql is slightly easier than is often claimed.

I doubt they meet in the middle, but both have great use cases. scaffolding out a quick isomorphic js app is great for mongodb for example. pg is faster and more robust.

its just tech, depends what you are optimizing for

Re:MongoDB queries don’t always return all matching documents by dcosson on Wednesday June 08, 2016 @12:22AM (#11860002)
> scales fairly well at the initial stages

Not sure what that means, but scalability is the worst thing about mongo (though my experience with mongo is all from ~2.5 ish years ago). As soon as your working set of indices gets bigger than memory, performance falls off a cliff and your entire app grinds to a halt. In my experience, mysql and postgres have a more gradual decline in performance so you have some time with only mildly degraded performance to figure out a solution (plus they have more options for tuning which can buy you more time).

Re:MongoDB queries don’t always return all matching documents by lucasmullens on Tuesday June 07, 2016 @05:27PM (#11858026)
The HN crowd tends to insult it, but outside of HN people hype it up. People keep talking about how much they love the MEAN stack. It's huge in the hackathon crowd, due to them sponsoring many of them, and its low learning curve.

I wish people would stop using acronyms and realize Express/Angular/Node is just as good with something other than Mongo.

Re:MongoDB queries don’t always return all matching documents by sotojuan on Tuesday June 07, 2016 @05:50PM (#11858227)
I can confirm. On HN, meetups, Twitter, etc. no one talks about MEAN stack any more because of Mongo and the Angular 1/2 split (and React's popularity). In the last hackathon I went to, like most "corporate sponsored" ones, you got a special prize for using it.
Re:MongoDB queries don’t always return all matching documents by zeemonkee3 on Tuesday June 07, 2016 @11:54PM (#11859885)
Are people using React starter kits? The major issue I'd see with React at hackathons is the large amount of configuration you typically need to do before you get started. I dislike starter kits due to the additional complexity overhead, but I can imagine for a throwaway project they'd be fine.
Re:MongoDB queries don’t always return all matching documents by cloudjacker on Tuesday June 07, 2016 @06:39PM (#11858572)
thanks for spelling that out for me

great incentive to dive into React further and ditch Mongo

Re:MongoDB queries don’t always return all matching documents by vonklaus on Tuesday June 07, 2016 @06:58PM (#11858690)
if you are just messing around you might be interested in vuejs & rethinkdb. found it a pretty intuitive stack, much easier than react for me
Re:MongoDB queries don’t always return all matching documents by zeeshanm on Tuesday June 07, 2016 @05:51PM (#11858231)
I think this is part of the reason who RoR, MEAN and other such frameworks are so popular. They tend to be easier to setup and many developers love it. My own theory is there are so many bad devs out there so that contributes to the hype because so may devs end up adopting it.

Take it with a grain of salt...

Re:MongoDB queries don’t always return all matching documents by sotojuan on Tuesday June 07, 2016 @07:42PM (#11858953)
MEAN isn't as easy to set up and I would not compare it to Rails at all. Rails is a backend framework—MEAN is just a bunch of technologies used together to have an API and a SPA. I'd actually argue, from personal experience, that newbies have a lot of trouble with MEAN because while there's a CLI tool MEAN doesn't have the community support, conventions, etc. that Rails does. Plus, you have to learn too many things at once.
Re:MongoDB queries don’t always return all matching documents by PhantomGremlin on Tuesday June 07, 2016 @07:41PM (#11858947)
outside of HN people hype it up

Just today CNBC announced its list of "the 2016 CNBC Disruptor 50 companies"[1]

MongoDB is #19. It apparently is:

   Big data's thought leader
[1] http://www.cnbc.com/2016/06/07/2016-cnbcs-disruptor-50.html
Re:MongoDB queries don’t always return all matching documents by threeseed on Tuesday June 07, 2016 @07:46PM (#11858970)
It's accurate. MongoDB is killing it in the Big Data space.

Because of its excellent integration with Spark/Hadoop and the schemaless nature it's very useful in the analytics space.

Re:MongoDB queries don’t always return all matching documents by pizzasynthesis on Wednesday June 08, 2016 @11:08AM (#11862715)
I like the Postgres/Express/Ember/Node stack, if not just for the acronym.
Re:MongoDB queries don’t always return all matching documents by tim333 on Tuesday June 07, 2016 @05:26PM (#11858022)
Their website is quite hype prone:

>The Standard for Modern Applications

>MongoDB 3.0 features performance and scalability enhancements that place MongoDB at the forefront of the database market as the standard DBMS for modern applications.

>Also included in the release is our new and highly flexible storage architecture, which dramatically expands the set of mission-critical applications that you can run on MongoDB.

>These enhancements and more allow you to use MongoDB 3.0 to build applications never before possible at efficiency levels never before attainable.

Re:MongoDB queries don’t always return all matching documents by partycoder on Tuesday June 07, 2016 @07:10PM (#11858774)
The standard for the golden age of crap.

Hang out on the freenode room for mongo and you will see that most people, working on production software, make inquiries that reflect a complete lack of knowledge, common sense and leave you facepalming with no hope in humanity at a large.

Re:MongoDB queries don’t always return all matching documents by 010a on Tuesday June 07, 2016 @06:42PM (#11858590)
The people who wrote that are not the same people who write the database.
Re:MongoDB queries don’t always return all matching documents by api on Tuesday June 07, 2016 @05:24PM (#11858002)
It's massively successful in the entry level web coding world due to a combination of good marketing and the belief that it gives you unlimited scale 'for free' and everything 'just works.'

Not saying those are impossible goals but so far no database has managed to deliver that. Building a large-scale endlessly-scalable database is still very hard and very detailed and easy to screw up.

Re:MongoDB queries don’t always return all matching documents by davidw on Tuesday June 07, 2016 @05:37PM (#11858115)
It got pretty hyped a few years back when it was new, and 'NoSQL' stuff was just coming out.
Re:MongoDB queries don’t always return all matching documents by brokentone on Tuesday June 07, 2016 @06:09PM (#11858377)
It was the hottest thing a 2-4 years ago. Hype is probably the biggest association anyone who lived through that and didn't drink the coolaid has.
Re:MongoDB queries don’t always return all matching documents by stevecalifornia on Tuesday June 07, 2016 @06:22PM (#11858469)
When it first came out it was hyped big time. Every other article was about how great Mongo was. About a year later the fallout started bubbling up. Digg went down for one or two weeks because of switching over to Mongo-- Reddit saw an influx of users and now is what it is.
Re:MongoDB queries don’t always return all matching documents by simtel20 on Tuesday June 07, 2016 @06:24PM (#11858477)
I recall that Digg moved at least some part of their site to cassandra. Did they in fact do both?
Re:MongoDB queries don’t always return all matching documents by threeseed on Tuesday June 07, 2016 @07:43PM (#11858961)
The hatred for MongoDB mostly comes from the PostgreSQL supporters camp. The rest of us are just using whatever tool makes sense.

MongoDB is the fastest database I've ever used. The easiest to get running, stable and scaled out. The best documentation by far and has excellent integration e.g. Spark, Hadoop.

If you are doing Big Data it's a great tool in the arsenal.

Re:MongoDB queries don’t always return all matching documents by orthecreedence on Tuesday June 07, 2016 @07:51PM (#11858993)
It's fast because it doesn't actually save your data when you ask it to. It saves it later, when it feels like it, maybe. Also, the hate I have for Mongo is from first-hand experience with the wretched thing. The scaling is insane. The next jump after your first server is like 9 servers (2 repsets w/ 3 servers each w/ 3 config nodes). I don't have that kind of cash laying around for servers, especially when instance-for-instance, Postgres can handle easily 10x the write load of mongo.
Re:MongoDB queries don’t always return all matching documents by SmirkingRevenge on Wednesday June 08, 2016 @02:07AM (#11860328)
RethinkDb does all of this better, and with good engineering and API design behind it.