Live data from Hacker News

Ask HN: Do you still use MongoDB?

news.ycombinator.com

51–60 of 243 posts

Re: Ask HN: Do you still use MongoDB?

#51
post #22

Yes, use it with Atlas for every one of my companies' projects. - The document model is a no-brainer when working with JS on the front-end. I have JSON from the client, and Dictionaries on the backend (Flask), so it's as easy as dumping into the DB via the pymongo driver. No object relational mapping. - Can scale up/down physical hardware as needed so we only pay for what we use - Sharding is painfully easily, with o…

This is a great testimonial. Would you care to share what Atlas is/which software package Atlas is?

Mongodb Atlas is their hosted DB as A Service. They will manage the infrastructure for you on any of the major cloud providers at a premium rate.

Re: Ask HN: Do you still use MongoDB?

#52
post #36

Earlier quoted context omitted.

Postgres's jsonb format is definitely not "essentially" a string. You can get native indexes on json fields in Postgres, and you can query fields however you like.

https://www.postgresql.org/docs/9.5/functions-json.html they are surrounded by quotes, is that not a string ?

Those are json literals in the SQL query. That has nothing at all to do with how json is stored in jsonb columns in the database itself.

Re: Ask HN: Do you still use MongoDB?

#53
Yes. We have applications running on both PostgreSQL and MongoDB and I find that working with MongoDB is just more pleasant. I think it mostly boils down to my preference of document databases as opposed to relational ones. It feels much more natural to me to embed / nest certain properties within a document instead of spreading it across several tables and then joining everything together to get the complete data. MongoDB makes working with these sometimes nested documents easy (I mean, it better) and there's always Aggregation Pipeline when you need it (something that I again find much more pleasant and readable over SQL).

What always irks me is when somebody suggests PostgreSQL's json (or jsonb) types as an alternative to using MongoDB. All it's saying is that the person hasn't really invested a lot of time into MongoDB because there are things that PostgreSQL simply cannot do over a json type, especially when it comes to data updates. Or it can do that but the query is just overly complicated and often includes sub queries just to get the indexes into the arrays you want to update. All of that is simple in MongoDB, not really a surprise - that's exactly what it was made for. The last time I worked with PostreSQL's json I sometimes ended up just pulling the value out of the column entirely, modified it in memory and set the it back to the db because that was either way easier or the only way to do the operation I wanted (needless to say there are only exceptional cases where you can do that safely).

Lastly, if you can easily replace MongoDB with PostgreSQL and its json types or you're missing joins a lot (MongoDB does have left join but it's rarely needed), chances are you haven't really designed your data in a "document" oriented way and there's no reason to use MongoDB in that case.

Re: Ask HN: Do you still use MongoDB?

#54
post #53

Yes. We have applications running on both PostgreSQL and MongoDB and I find that working with MongoDB is just more pleasant. I think it mostly boils down to my preference of document databases as opposed to relational ones. It feels much more natural to me to embed / nest certain properties within a document instead of spreading it across several tables and then joining everything together to get the complete data. M…

Yep, the update operators for MongoDB are really great and not replaceable with Postgres. Now if only MongoDB had a good sharding story it would be a worth contender for me.

Re: Ask HN: Do you still use MongoDB?

#55

What advantages does Mongo have over cloud managed NoSQL solutions lime cloud Firestore or aws dynamodb?

There are huge overlap between Mongo and Firestore. Mongo gives you the ability to finely control many aspects of the DB (sharing, replication, etc...) where as Firestore manages it for you. Firestore and DynamoDB are also closed source and you can only run them on their respective cloud providers. I don't have enough direct experience with DynamoDB to give you an accurate comparison.

Re: Ask HN: Do you still use MongoDB?

#56
post #14

Earlier quoted context omitted.

jsonb is limited in it's querying capabilities. you're essentially casting the json as a string when storing and querying, it's not truly json. therein lies the advantage of document model, native secondary indexes, $ for everry nested layer, etc.

Postgres's jsonb format is definitely not "essentially" a string. You can get native indexes on json fields in Postgres, and you can query fields however you like.

SELECT jdoc->'guid', jdoc->'name' FROM api WHERE jdoc @> '{"tags": ["qui"]}';

vs

db.api.find({tags:"qui"}, {guid:1, name:1})

Re: Ask HN: Do you still use MongoDB?

#57

MongoDB is a pretty good database IMO. I've used it at several companies in the past and wouldn't mind using it again. My favorite DB is RethinkDB. It's a shame that the company behind it fizzled out and was absorbed by Stripe. I still cannot wrap my mind around why it's not more popular. It's similar to MongoDB but much better. It's the perfect database. It adds constraints which improve the quality of your code. Al…

So what's the status of RethinkDB? Is it still being developed? Who's working on it? Is it stable and feature-complete or are there any kinds of features missing that only a dedicated (paid) team would be able to pull off? Genuinely curious!

Re: Ask HN: Do you still use MongoDB?

#58
post #17

MongoDB is a pretty good database IMO. I've used it at several companies in the past and wouldn't mind using it again. My favorite DB is RethinkDB. It's a shame that the company behind it fizzled out and was absorbed by Stripe. I still cannot wrap my mind around why it's not more popular. It's similar to MongoDB but much better. It's the perfect database. It adds constraints which improve the quality of your code. Al…

much of the anti-mongo sentiment is around people who used it in 2009-ish. it's useful to point out that when using the early version of any software, there will be bugs. that's a trade-off early adopters always need to contend with. unfortunately, it hasn't sat well over time despite every one of the concerns being addressed since.

> much of the anti-mongo sentiment is around people who used it in 2009-ish.

So? I think this is a very plausible way of measuring how much you should trust something. There had to be a downside to the "move fast and break things" that mongodb subscribes to (i.e., add features now, think about reliability later).

As it turns out, they moved fast and broke their reputation.

Re: Ask HN: Do you still use MongoDB?

#59
post #17

Earlier quoted context omitted.

much of the anti-mongo sentiment is around people who used it in 2009-ish. it's useful to point out that when using the early version of any software, there will be bugs. that's a trade-off early adopters always need to contend with. unfortunately, it hasn't sat well over time despite every one of the concerns being addressed since.

> much of the anti-mongo sentiment is around people who used it in 2009-ish. So? I think this is a very plausible way of measuring how much you should trust something. There had to be a downside to the "move fast and break things" that mongodb subscribes to (i.e., add features now, think about reliability later). As it turns out, they moved fast and broke their reputation.

i agree, there's reputational impact but again it's the trade off that early adopters make and are fully aware of.

When you're the first user of a brand new companies' database, you better bet there will still be kinks they're working through and let's face it you're the guinea pig.

i'm sure mongo is thankful for all these guinea pigs because they helped to define the roadmap and iron out the bugs. however, in the end of the day 2009 version of a product is entirely different than 2020 version. there are endless analogies (facebook, google, etc.) the only difference with an open source technology is users can analyze it under a microscope.

Post reply on HN