Overview
A hybrid command-line simulation + web interface platform demonstrating a robust, concurrent ticket distribution engine. Built to explore producer–consumer synchronization, fairness, and throughput under contention.
Core Concepts
Producers: Vendors injecting tickets into a shared pool at variable rates.Consumers: Customers retrieving tickets with concurrency-safe access.Controller: Manages lifecycle, load patterns, and event logging.Web Layer: Angular dashboard + Spring Boot REST + WebSocket live log stream.Architecture
| Layer | Technology |
|---|
| Simulation Core | Java (Threads, synchronized structures) |
| API | Spring Boot (REST + WebSocket) |
| Data | MySQL (ticket states, audit logs) |
| Frontend | Angular SPA |
| Logging | WebSocket channel → live UI feed |
Key Features
Dynamic vendor/customer scalingThread-safe ticket pool (blocking retrieval semantics)Live event timeline (issued / claimed / exhausted)WebSocket-based real-time log streamingConfiguration presets (burst, steady, randomized)Graceful shutdown + metrics snapshotConcurrency Strategies
Synchronized monitor around ticket bufferBackpressure via wait/notify patternStarvation mitigation (fair retrieval ordering)Metrics instrumentation (throughput, latency)Challenges & Learnings
Avoiding race conditions while retaining performance required careful lock granularity.WebSocket flooding mitigated with buffered batching.Designed abstractions enabling simulation replay determinism where possible.Outcome
Demonstrated scalable concurrency model suitable for classroom & portfolio demonstration.Clear separation of simulation logic from web delivery for testability.Future Extensions
Kafka-based distributed ticket streamMetrics dashboard (Prometheus + Grafana)Adaptive load injector with ML-based anomaly detection---
Highlights strength in concurrent systems, full-stack integration, and real-time event streaming.