Veraticus / Dynamoid

Ruby ORM for Amazon's DynamoDB
http://joshsymonds.com/Dynamoid/
247 stars 83 forks source link

Making multiple table update atomic #184

Open hlms opened 9 years ago

hlms commented 9 years ago

I need to update multiple tables through dynamoid. Is there any way to make such transaction atomic?

For example, for a particular operation, I'm updating tables t1, t2, t3. If update in t1, t2 succeeds but if it fails for t3, it should revert the update in t1 and t2? Any way to do this in dynamoid?

ngordon17 commented 9 years ago

No. You'd need to use another framework to do transactions or implement them yourself. Transactions are also really inefficient in Dynamo, you probably don't want to use them unless you really need to.

hlms commented 9 years ago

Can someone name any framework which can be helpful in this case? Does AWS SDK v2 provide transaction facility?

ngordon17 commented 9 years ago

There's one provided byAWS for Java, but to my knowledge none for Ruby. You'd have to create your own.