A concurrent banking system simulator written in modern C++17, designed to process financial transactions safely using multi-threading, mutex synchronization, and design patterns (Producer–Consumer + Observer).
This project simulates a real-world banking transaction processor where multiple threads handle deposits, withdrawals, and rollbacks concurrently.
It demonstrates key system design principles like thread synchronization, event-driven updates, and rollback recovery — all using pure C++ standard libraries.
- Multi-threaded transaction queue using the Producer–Consumer pattern
- Automatic rollback handling using the Observer pattern
- CSV-based persistence for transaction and account records
- Thread-safe balance updates with
std::mutex - Simulated concurrency delay and rollback synchronization
- Clean modular structure (Header + Source separation)
- The system uses a shared transaction queue.
- Producers read and push transaction data from CSV.
- Multiple consumer threads process transactions concurrently.
- A dedicated rollback thread observes processed transactions.
- On rollback-triggered events, it automatically adjusts account balances.
- Scalable And Maintainable code
- High performance systems
- Real-time transaction monitoring and rollback recovery
- Your system must have C++ version >= 11 because of thread dependancy
- Clone the repo , cd Concurrent Transaction Proccesor
- run in windows powershell or equivalent terminal in linux or mac : g++ "src/Transaction.cpp" "src\Rollback.cpp" "src/main.cpp" -I "include" -o main
- run main.exe
