Tuesday 18 April 2017

Those of you who use MongoDB, how do you survive without support for transactions?

Recently I posted on here about deciding to make the switch from mongodb + mongoose to using postgres: http://ift.tt/2o037wR of my biggest frustrations with mongo was the lack of support for transactions. I've come across stackoverflow posts about this and have seen npm packages that try to solve this, but nothing looks very solid or worth using in production.So what do you guys do when you need to update/save multiple types of documents? Do you use any of these npm packages? I've seen some people say that you could save a Transaction object to mongo, and not mark it complete until all of it's work is done. I've also thought about using a worker queue / task manager to handle multiple saves/updates and then let it deal with any failures, but all of this sounds like a pain to implement when you could have just used an ACID compliant db in the first place.I'm genuinely curious to see how you guys dealign with this and solving these problems in production.

Submitted April 18, 2017 at 06:07PM by m9js

No comments:

Post a Comment