Caller{{caller}}
Transactional serviceOwns the unit of work.
Primary databaseApplies atomic writes.
ObserverReceives the final transaction state.
Begin
Caller → Transactional service
sync
Request an atomic operation.
Transactional service → itself
self
{{begin}}
Atomic writes
Transactional service → Primary database
sync
{{write-a}}
Transactional service → Primary database
sync
{{write-b}}
Commit or rollback
{{commit-rollback}}
Transactional service → Primary database
sync
Commit the successful unit of work.
Transactional service → Primary database
error
Rollback all writes after failure.
Transactional service → Observer
async
{{observer}}