Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
B
BANK_SDD
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
joubran.mansour
BANK_SDD
Commits
8dd87532
Commit
8dd87532
authored
Nov 03, 2026
by
joubran.mansour
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
docs: rewrite README
parent
49b26767
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
0 deletions
+29
-0
README.md
README.md
+29
-0
No files found.
README.md
View file @
8dd87532
# Fault-Tolerant Distributed Banking Transaction
## Problem
An Order Service (client) sends an HTTP request to a Billing Service (server)
to debit an amount from a user's account. The connection may drop, or the server
may crash before replying, or right after committing the debit but before the
client receives the response.
## Goal
Guarantee effectively-once execution: a transaction must never be lost and
never applied twice.
## Stakeholder requirements
1.
At-least-once delivery: client retries with timeout + exponential backoff.
2.
Artificial idempotency: each new transaction carries a monotonically
increasing sequence key, plus a boolean
`retry_is`
flag. Retries reuse the same key.
3.
Atomicity: the server checks
`key_sequence_last`
for the account and, in ONE
atomic transaction, debits the balance and updates
`key_sequence_last`
.
If the key equals the last executed key, skip the debit and return the success ack.
4.
Fault injector (configurable) for 4 scenarios:
(a) request never arrives
(b) server crashes before executing
(c) executed + persisted, but response fails to reach the client
(d) server responds after the client timeout
5.
Automated tests for happy path AND all four failure scenarios.
## Process constraint
Spec-Driven Development: constitution -> spec -> plan -> tasks -> implement.
No source code may be written before the spec and plan exist.
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment