CECTC / dbpack

A db proxy for distributed transaction, read write splitting and sharding! Support any language! It can be deployed as a sidecar in a pod.
https://cectc.github.io/dbpack-doc/#/en-us/
Apache License 2.0
356 stars 46 forks source link

Saga and undo logic #257

Open gedw99 opened 2 years ago

gedw99 commented 2 years ago

Is there are support for sagas with compensation logic ?

I used to work on these types of 2PC systems and the holding of locks on DB’s is imho only allowed on Databases your own . Even with a large organisation with many teams where each team controls their own database, holding locks on more than db can be disallowed.

the alternative can be sagas where the transactions do not use locks , and is any db refuses a mutation, then the 2PC must execute compensation logic and either undo the transaction or some other form of compensation.

Are you working on this. I lock approach or interested in pursuing it ?

It’s a solution to when different parties need to perform business transactions across theirs and others databases.

if you would like to discuss more in depth on this I am open to collaborating. Telegram is in my GitHub profile.

dk-lockdown commented 2 years ago

I have considered using ETCD as an event-driven engine to implement saga pattern, but DBPack is focused on database proxy, we can cooperate in hptx to implement saga pattern. What do you think?