Open thelinuxlich opened 9 years ago
Nice idea @thelinuxlich .
See https://github.com/rethinkdb/rethinkdb/issues/1863#issue-25564559 . It's a relatively complicated thing and would need some work to really explain what it does and how to use it.
I think there are some lower-hanging fruits in terms of expanding our documentation at the moment, but we should keep it in mind.
There is a MongoDB article which you can reuse in RethinkDB:
http://docs.mongodb.org/manual/tutorial/perform-two-phase-commits/
Unfortunately the Mongo docs are under a variant of the CC license that does not allow commercial use http://creativecommons.org/licenses/by-nc-sa/3.0/ , so we cannot use it.
:(
@thelinuxlich I've been working on something like this recently, feel free to audit it for issues -- https://gist.github.com/Timer/51e5b8883ff13eaaa3ca
@Timer very nice, looking at your code, you could do almost everything with ReQL server-side in one step instead of using async.waterfall
Thanks for the tip @thelinuxlich, I'll look into it.
We had a requirement to implement transactional support in ReThinkDb, and had come-up with this solution thinktrans.
I tried to document our approach of Implementing transactions in No SQL Databases
Disclaimer: I am author of this library
It would be nice to have something like this on the Cookbook section