COMP41720 – Distributed Systems
Group Project
This project implements a Distributed University Event Booking and Payment System using a microservices-based architecture.
The system allows students to browse university events, create bookings for events with limited seats, and complete payments.
The main focus of this project is on architectural design, correctness, and fault tolerance rather than only implementation.
The system ensures that event capacity is never exceeded and that bookings are confirmed only after successful payment.
The system is designed using a microservices architecture where each core business capability is implemented as an independent service.
The system consists of the following services:
- API Gateway
- Event Service
- Booking Service
- Payment Service
Services communicate using synchronous REST APIs over HTTP and exchange data in JSON format.
- Acts as the single entry point for all client requests
- Routes requests to appropriate backend services
- Hides internal service topology from clients
- Manages event creation and retrieval
- Enforces seat availability
- Acts as the single source of truth for event capacity
- Prevents overbooking under concurrent requests
- Manages booking creation, confirmation, and cancellation
- Coordinates seat reservation with the Event Service
- Uses retries and circuit breakers for fault tolerance
- Handles payment creation and payment status updates
- Confirms bookings only after successful payment
- Ensures unpaid bookings are never confirmed
- Client sends a booking request via the API Gateway
- Booking Service requests seat reservation from the Event Service
- If seats are available, a booking is created in PENDING_PAYMENT state
- If seats are unavailable, the booking request is rejected
- Client initiates payment for a booking
- Payment Service processes the payment
- On payment success, the Booking Service is notified to confirm the booking
- On payment failure, the booking remains unconfirmed
- Retries are used to handle transient failures
- Circuit breakers prevent cascading failures
- The system fails safely by prioritising correctness over availability
- Overbooking is prevented even during partial failures
- Java 17
- Spring Boot
- Spring Cloud Gateway
- REST APIs (HTTP and JSON)
- Docker and Docker Compose
- PostgreSQL
- Postman (for testing)
- Docker
- Docker Compose
- Java 17
-
Clone the repository: git clone https://github.com/maliparag11/Distributed-University-Event-Booking-System.git
-
Navigate to the project root directory: cd Distributed-University-Event-Booking-System
-
Start all services using Docker Compose: docker compose up --build
-
Verify services using:
/actuator/healthendpoints- Postman or browser-based testing
- End-to-end testing performed using Postman
- Concurrent booking scenarios tested
- Service failure and recovery scenarios tested
- Correctness verified by ensuring no overbooking and payment-gated confirmation
- Event Service design and implementation
- Event and seat management logic
- Integration testing and documentation support
- Payment Service design and implementation
- Payment workflow and booking confirmation logic
- Testing payment-related edge cases
- Booking Service design and implementation
- Service coordination and resilience mechanisms
- Failure handling and recovery tests
All group members contributed to architectural design, Docker setup, testing, and report preparation.
This project demonstrates the design and implementation of a distributed microservices system for university event booking and payments.
The system prioritises correctness, fault tolerance, and clear architectural trade-offs, aligning with the learning objectives of COMP41720.
https://github.com/maliparag11/Distributed-University-Event-Booking-System