Live data from Hacker News

MongoDB queries don’t always return all matching documents

engineering.meteor.com

91–100 of 419 posts

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

#91
post #4

I've just migrated one project from mongo to postgresql and i advise you to do the same. It was my mistake to use mongo, after I've found memory leak in cursors first day I've used the db which I've reported and they fixed it. It was 2015.. If you have a lot of relations in your data don't use mongo, it's just hype. You will end up with collections without relations and then do joins in your code instead of having db…

I still want to know how anybody is making money off of data that doesn't have a bunch of relationships in it.

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

#92
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…

> Why on earth would you use a database that makes so little in the way of guarantees about what results you get from it? Because some people can't stand having to work with SQL,migrations,schema and constraints, it's as simple as that ( That's not my opinion,that's just the rational behind MongoDB). Even if you use Postgres with the Json column type, you still need to write SQL queries and schemas. In the context of…

Is having seen something used some way a leading indicator of it being a good idea to have used that thing that way?

Because I've seen Excel used as database with all kinds of macros and VBA scripts bolted-on/embedded to provide the workbook various shapes of stored-procedure and query capability... but, while sorta impressive in a "Holy crap, lol wut?" kind of way, I'm not sure any instance I observed of uses like that were actually good ideas. Full of epic cleverness and ingenuity? Definitely. A good idea? Probably not.

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

#93

This use-case is not something that you would use MongoDB for. Try Zookeeper. This being said, I would feel embarrassed to post this on behalf of the engineering department of a company. This post is just a very illustrated way of saying "we have no idea about what we are doing and our services are completely unreliable". This is so bad that is more of an HR problem than it is an engineering problem.

Did you miss the part about how they're running a hosting platform that stores details about the status of containers for all their customers? Zookeeper is fine for things like service discovery that deal with a bounded amount of data. You don't want to use it for something where the amount of data depends on, say, how many containers your customers decide to start. Every ZK server keeps all of its data on the Java h…

Zookeeper slows down when you add nodes since quorum/consensus is larger. You can mitigate some of this with non-voting nodes (observer nodes) but only up to certain extent. So yes, a single Zookeeper cluster won't scale horizontally.

But that doesn't limit the amount of independent clusters you can have.

The reason I suggested Zookeeper is because it offers you ephemeral nodes, which is convenient to mark stuff as unavailable.

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

#94
post #90

Earlier quoted context omitted.

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.

Are there NoSQL alternatives that have a worse track record than Mongo?

There probably are, but they just don't enjoy the same level of popularity as Mongo or they'd be scrutinized just as much.

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

#95
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…

> Why on earth would you use a database that makes so little in the way of guarantees about what results you get from it? Because some people can't stand having to work with SQL,migrations,schema and constraints, it's as simple as that ( That's not my opinion,that's just the rational behind MongoDB). Even if you use Postgres with the Json column type, you still need to write SQL queries and schemas. In the context of…

It’s useful for prototyping. When you don’t know which schema you’ll end up using having an *SQL database is tedious because you have to do migrations every time you change the schema. Once you’re done prototyping you can switch to a better alternative.

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

#98
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…

> Why on earth would you use a database that makes so little in the way of guarantees about what results you get from it? Because some people can't stand having to work with SQL,migrations,schema and constraints, it's as simple as that ( That's not my opinion,that's just the rational behind MongoDB). Even if you use Postgres with the Json column type, you still need to write SQL queries and schemas. In the context of…

in this case, please use Postgresql jsonb data tables. Just as powerful as mongo... but with the stability and guarantees of postgres
Post reply on HN