Live data from Hacker News

MongoDB queries don’t always return all matching documents

engineering.meteor.com

61–70 of 419 posts

Re: MongoDB queries don’t always return all matching documents

#62
post #50
post #41

Earlier quoted context omitted.

As a guy who works on ACID database internals, I'm appalled that people use MongoDB. You want a document store? Use Postgres. Why on earth would you use a database that makes so little in the way of guarantees about what results you get from it? I think most people have really low load and concurrency, so things seem to work. When things get busier you're in for a world of pain. Look I get that's it's easy to use and…

MongoDB: Because /dev/null doesn't support sharding.

But it does support sharting. Your entire app. Into the ether.

Re: MongoDB queries don’t always return all matching documents

#63
post #41

Earlier quoted context omitted.

As a guy who works on ACID database internals, I'm appalled that people use MongoDB. You want a document store? Use Postgres. Why on earth would you use a database that makes so little in the way of guarantees about what results you get from it? I think most people have really low load and concurrency, so things seem to work. When things get busier you're in for a world of pain. Look I get that's it's easy to use and…

I was always a big fan of calling MongoDB the "Snapchat for databases". I think people even had some stickers printed for it..

Hey! Snapchat is pretty useful for seeing snapshots into the not completely dull parts of my friends lives.

It has its potential flaws in being able to save the images/videos but please don't do it the disservice of likening it to MongoDB.

Re: MongoDB queries don’t always return all matching documents

#64
post #9

Earlier quoted context omitted.

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

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

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

#65

Earlier quoted context omitted.

I use RethinkDB in most of my production things. I recommend it.

and when I grow big, I will use Cassandra.

I absolutely love Cassandra, assuming you have the right use case for it.

We had some aches and pains with anti-entropy ops back in the day (7TB + on too small a ring) but it's my favorite storage system :)

Re: MongoDB queries don’t always return all matching documents

#67
post #21

TL;DR During updates, Mongo moves a record from one position in the index to another position. It does this in-place without acquiring a lock. Thus during a read query, the index scan can miss the record being updated, even if the record matched the query before the update began.

mongo developer 1

Man, it's just taking too damn long to run this update. What should we do?

mongo developer 2

Uh....remove all the locks?

mongo developer 1

Oh, yeah, that makes sense, let's do that.

mongo developer 3

Hey, what are you guys up to?

mongo developer 2

Making it web-scale!

mongo developer 3

Good job, keep it up!

Re: MongoDB queries don’t always return all matching documents

#68
post #53
post #41

Earlier quoted context omitted.

As a guy who works on ACID database internals, I'm appalled that people use MongoDB. You want a document store? Use Postgres. Why on earth would you use a database that makes so little in the way of guarantees about what results you get from it? I think most people have really low load and concurrency, so things seem to work. When things get busier you're in for a world of pain. Look I get that's it's easy to use and…

Because Postgres doesn't have any clustering / HA features. So out of the box it doesn't scale well.

If you want that you can always use a variant of postgres that does like greenplum, citus, and a few others. They're battle proven. There's also MySQL and its variants as well.

Not to mention that are NoSQL alternatives that have a better track record than Mongo like Cassandra.

Re: MongoDB queries don’t always return all matching documents

#69
post #41

Said it before, will say it again... "MongoDB is the core piece of architectural rot in every single teetering and broken data platform I've worked with." The fundamental problem is that MongoDB provides almost no stable semantics to build something deterministic and reliable on top of it. That said. It is really, really easy to use.

As a guy who works on ACID database internals, I'm appalled that people use MongoDB. You want a document store? Use Postgres. Why on earth would you use a database that makes so little in the way of guarantees about what results you get from it? I think most people have really low load and concurrency, so things seem to work. When things get busier you're in for a world of pain. Look I get that's it's easy to use and…

Postgres wasn't always a great document store...there was definitely a time period where if you wanted to take a document-oriented approach to data modeling, MongoDB was a good way to go. JSONB was only added in the last minor version of Postgres, and while the JSON and HSTORE types were available, it didn't give you quite the same speed. Now that JSONB is a thing, I think the two databases are more comparable as a document store.

Re: MongoDB queries don’t always return all matching documents

#70

Earlier quoted context omitted.

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.

thanks for spelling that out for me great incentive to dive into React further and ditch Mongo

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
Post reply on HN