This project is a real-time event ticketing system implementing the Producer-Consumer pattern. The system simulates multiple ticket vendors (producers) releasing tickets and customers (consumers) purchasing them concurrently. It uses advanced multithreading and synchronization techniques to ensure data integrity and smooth operation.
- Real-Time Ticket Management: Vendors add tickets to a shared pool, and customers retrieve tickets concurrently.
- WebSocket Updates: Real-time broadcasting of system status.
- Configurable Parameters: User-defined simulation settings for vendors, customers, and ticket release/purchase rates.
- Robust Logging: Comprehensive logs for system activities.
- Frontend: Angular 18
- Backend: Java Spring Boot 3.4.0
- Database: PostgreSQL running on Docker
- WebSockets: For real-time status broadcasting
- Logging: Implemented in the backend for tracking activities
Ensure the following software is installed on your system:
- Java 21+
- Node.js v20.13.1+ and npm
- Docker 4.36.0
- Angular 18 (and CLI)
- PostgreSQL
- Clone the backend repository:
git clone [email protected]:isuruK2003/ticketer-server.git cd ticketer-server
- Create a
compose.yml
file in "ticketing-server" directory Include your details in following format:services: postgres: image: 'postgres:latest' environment: - 'POSTGRES_DB=ticketing-system' - 'POSTGRES_PASSWORD=<YOUR POSTGRES PASSWORD>' - 'POSTGRES_USER=<YOUR POSTGRES USERNAME>' ports: - '5432:5432' # Mapping 5432 to local 5432 on local machine
- Start the backend:
./mvnw spring-boot:run
- Clone the frontend repository:
git clone [email protected]:isuruK2003/ticketer-gui-angular.git cd ticketer-gui-final
- Install dependencies:
npm install
- Run the Angular application:
ng serve
Additional endpoints are detailed in the provided API documentation, or please visit PostMan Documentation for full details.
The backend includes a logging module that records system activities, errors, and simulation events. Logs are stored in a configurable file for monitoring and debugging purposes.
- Use Postman or similar tools to test API endpoints.
- Verify WebSocket connections with browser developer tools.
- Test concurrent scenarios by starting multiple vendor and consumer threads.
MIT License is used. This project is a submission for a University Coursework, therefore please follow the proper academic rules and regulations when reusing this again.
- Backend: ticketer-server
- Frontend: ticketer-gui-angular
This project was developed as part of a coursework assignment to implement a real-time ticketing system using advanced Producer-Consumer techniques. It provided hands-on experience with multi-threading, synchronization, and full-stack development.
Please reach me out via GitHub or email for additional information.