In defense of MongoDB with Meteor


#1

Recently I began putting together a tech stack proof of concept for an internal company project that I feel would work well with the Meteor Platform. It is being compared to others constructed, some with Rails, others with React and Angular.

One of the major sticking points against the others is the teams feeling of MongoDB being less equipped than Postgres. Unfortunately I am not a db guru so I do not feel I am capable of defending it justly or at least offering up some good counter talking points.

That is why I am turning to the community in hopes that you could help inform and direct me as to the best way to approach comparing and defending MongoDB

Some of the concerns brought up so far were as quoted:

well, there’s (at least) minor downsides to mongodb – like the amount of stuff you’d have to do in app code with mongodb, things like joins – and not really any upsides compared to something like postgres
so it’s hard for me to figure out why we would use mongodb

other downsides – no transactions, no well-baked geo support, no ability to write extensions like postgres’s pl languages

Anything helping me address these concerns and possibly bring up other MongoDB benefits would be greatly appreciated. Also if anyone has some solid links to articles that address this type of content that would be greatly appreciated as well. Thank you all in advance…


#2

One suggestion that might help, depending on your app and requirements, would be to do a scheduled dump of the mongo data into a relational db. I may need to do this for reporting needs (which won’t need the real time data) but it’s a small price to pay for the reactivity and other awesome things you get when coding with meteor and mongo.


#3

There are a couple of packages for Postgres for Meteor now:

http://www.meteorpostgres.com (https://github.com/meteor-stream/meteor-postgres)

So you can use Meteor with Postgres, and no need to defend using MongoDB!

And both of these support reactivity.


#4

I’ll be brutally honest and say that perhaps you’re being biased toward MongoDB as much as they’re inclined against it

their arguments are legitimate, and it’d be hard to counter them without further knowledge of your database design/performance/consistency needs

If you share more information with us, perhaps I could express my opinion, but in general if you can’t come up with valid points supporting MongoDB, then maybe it’s the wrong tool.

side note: mongo does support geo - it has special queries and indexes for that purpose.

I’ll end on a positive note: as @bradzo mentioned,postgres is unofficially supported now in Meteor; I know at least one company that’s using it now in development