Reputation: 161
I'm creating a p2p content sharing platform where users can subscribe to a content by making payments to each other. I'm using a third party payment gateway but I cannot figure out how to design for this action using Mongoid(MongoDB)
After a successful payment, a subscription document will be added to the buyer's account and the subscription count needs to be updated for the publisher. In case my the system crashes after the transaction, how do I maintain the consistency of it?
I'm currently looking at the two-phase commit method for this but I'd be grateful if anyone can provide more useful information.
Upvotes: 2
Views: 980
Reputation: 24348
A quite late answer but the info is brand new:
MongoDB 4.0 will support multi-document ACID transactions
As far as I know the release is planed for the early summer 2018, in this blog post further details are compiled.
Upvotes: 1