A high-performance, multithreaded C++ simulation designed to handle e-commerce transaction requests (Payments, Checkouts, Browsing) using Service Level Objectives (SLO).
- Real-time Scheduling logic: Implements Earliest Deadline First (EDF) combined with an Aging Algorithm to prevent low-priority task starvation.
- Thread-Safe Architecture: Uses
std::mutexandstd::condition_variableto manage a shared request queue across simulated distributed nodes. - Service Level Objectives (SLO): Dynamic priority calculation based on transaction type (e.g., Payment > Checkout > Browse).
- Modern C++ Design: Built with C++17, following industry-standard directory structures and CMake build systems.
The system follows a Producer-Consumer pattern across decoupled modules:
- Workload Generator: Simulates high-traffic bursts of e-commerce transactions.
- Thread-Safe Queue: A synchronized buffer that prevents race conditions between incoming requests and the scheduler.
-
SLO Scheduler: The "Brain" that calculates urgency scores using:
$$Urgency = \frac{1}{Slack} + (Aging_Factor \times Wait_Time)$$ - Worker Pool: Simulated distributed nodes with specific resource capacities and priorities.
├── include/ # Header files (.hpp) - Interfaces & Data Structures
├── src/ # Implementation files (.cpp) - Core Logic
├── CMakeLists.txt # Cross-platform build configuration
└── README.md # Project documentation