docs icon indicating copy to clipboard operation
docs copied to clipboard

Simulating two-phase commits

Open thelinuxlich opened this issue 10 years ago • 8 comments
trafficstars

It would be nice to have something like this on the Cookbook section

thelinuxlich avatar Dec 04 '14 06:12 thelinuxlich

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.

danielmewes avatar Dec 04 '14 19:12 danielmewes

There is a MongoDB article which you can reuse in RethinkDB:

http://docs.mongodb.org/manual/tutorial/perform-two-phase-commits/

thelinuxlich avatar Dec 04 '14 20:12 thelinuxlich

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.

danielmewes avatar Dec 04 '14 20:12 danielmewes

:(

thelinuxlich avatar Dec 04 '14 20:12 thelinuxlich

@thelinuxlich I've been working on something like this recently, feel free to audit it for issues -- https://gist.github.com/Timer/51e5b8883ff13eaaa3ca

Timer avatar Mar 19 '15 20:03 Timer

@Timer very nice, looking at your code, you could do almost everything with ReQL server-side in one step instead of using async.waterfall

thelinuxlich avatar Mar 19 '15 23:03 thelinuxlich

Thanks for the tip @thelinuxlich, I'll look into it.

Timer avatar Mar 20 '15 01:03 Timer

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

jaladankisuresh avatar Dec 06 '16 10:12 jaladankisuresh