Work / 06 · Open source
Inventory and order management.
01
Problem, approach, result
Problem
- Two orders for the last unit arrive at the same moment.
Approach
- Transactional orders with row locking and idempotency, on FastAPI, React, PostgreSQL and Docker.
Result
- One order wins. The other waits, then sees the truth.
02
How it works
Two orders reach the last unit at once. The row lock lets one commit; the other waits, then sees qty 0.
03