Skip to content
/ sentinel-ledger Public template

A high-performance transaction processing engine featuring a Token Bucket Rate Limiter and ACID-compliant MySQL ledger to resolve high-concurrency bottlenecks in payment systems.

License

Notifications You must be signed in to change notification settings

BruceIsBat/sentinel-ledger

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sentinel-Ledger: High-Throughput Financial Transaction Engine

Sentinel-Ledger is a resilient backend infrastructure designed to solve the "thundering herd" problem in payment gateways. It implements a dual-layer protection system: a Token Bucket Rate Limiter to control system load and an Atomic Ledger to ensure 100% data integrity during transactional bursts.

🚀 Key Technical Features

  • Token Bucket Algorithm: Implemented in app/core/limiter.py to prevent resource exhaustion.
  • ACID-Compliant Transactions: Utilizes MySQL InnoDB row-level locking to guarantee zero data variance.
  • Resource Profiling: Integrated Bash scripts for empirical performance tuning.
  • Application Factory Pattern: Built for scalability and modular testing.

📂 Quick Navigation

  • /app: Core logic and API delivery.
  • /scripts: Load testing and system monitoring tools.
  • /sql: Database schema and transaction locking logic.

🛠 Setup

  1. pip install -r requirements.txt
  2. Configure .env based on .env.example.
  3. Initialize database using /sql/schema.sql.
  4. Run python run.py.

About

A high-performance transaction processing engine featuring a Token Bucket Rate Limiter and ACID-compliant MySQL ledger to resolve high-concurrency bottlenecks in payment systems.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published