The overall architecture
What condition is maintained in the event of a crash before or after the ledger commit?
This runtime topology follows from the data contract: Account interface → Posting API → relational journal storage; Posting API stores Journal and Outbox together. Settlement worker reads Outbox → External settlement; their result → Authenticated Inbox in Journal Store → Posting API. Customer service reads the status via the same API. Internal modules are domain code boundaries; on the other hand, a separate process has its own operational lifecycle.
Starting point Create a referenced reversal posting with its own uniqueness guarantee.
Assumptions for the example case
Our own fictitious example draft: transfer in EUR with positive whole cent amounts; a debited customer account and an internal settlement account; external settlement with status query; reversal posting after proven rejection. Figures and quality goals are illustrative test assumptions. Outside are foreign exchange, interest, fees, regulatory approval check and a complete bank ledger.
Runtime architecture
Runtime topology · a local commit before the external effect
Intra-bank accounting system
API and Worker share the relational journal store. The external settlement remains outside the system boundary.
Domain modules within the application
Inside the posting API · five modules in one process
Process framework · Booking API
The modules are local responsibility limits; Journal and Outbox remain a common transaction.
Operational boundaries
- Runtime
- Account interface → Posting API → relational journal storage; Posting API stores Journal and Outbox together. Settlement worker reads Outbox → External settlement; their result → Authenticated Inbox in Journal Store → Posting API. Customer service reads the status via the same API.
- Persistence
- Transactional store for transfer U-41, customer account K-41, settlement account V-41. Leading changes and their repetition result are stored together; external side effects require their own evidence.
Preserve local atomicity
The posting API and worker share a transactional ledger and outbox store.
Journal and transmission have different failure points.
A crash after commit leaves A-41 discoverable; before commit, the balance remains unchanged.
- Alternative considered
- Two independently-writing account services require a distributed posting contract.
- Trade-off
- Schema changes will be rolled out together.
- Reassess
- Independent ledger teams or measured capacity limits justify reconsidering the boundary.
Terms in this step
- Preserve local atomicity
- A crash after commit leaves A-41 discoverable; before commit, the balance remains unchanged.
Try it yourself
Draw a crash immediately before and immediately after the shared ledger and outbox commit. State the data recovered in each case.
A hint for your attempt
Use the specific entities and conditions from this step. The two solution parts distinguish the decision from its evidenced outcome.
Compare with a possible solution
- First part of the solution
- Before commit, neither debit nor A-41 are visible; K-41 remains at 10,000 cents.
- Second part of the solution
- After commit, 3,000 cents, both journal lines and A-41 are permanently available. The worker continues exactly this task, even without an original API response.
Apply to your project
Which corresponding assumption in your project would you check first? Use as an occasion: Independent journal teams or measured capacity limits establish a new limit.