How salehairum/cs4067-assignment-02-k224360-saleha_irum works
Project Type and Purpose
• This is a microservices-based Online Event Booking System.
• It exposes multiple independent services (User, Event, Booking, Notification, Payment) that collaborate via REST (synchronous) and RabbitMQ (asynchronous) to handle user registration, event management, booking, notifications, and payments.
Main Components
a. Frontend
• Static HTML/CSS/JS UI served from a web server or CDN.
b. User Service (FastAPI + PostgreSQL)
c. Event Service (Spring Boot + MongoDB)
d. Booking Service (Flask + PostgreSQL)
e. Notification Service (Flask + MongoDB) + Consumer
f. Payment Service (Flask mock)
g. Databases
• PostgreSQL instances for User & Booking services
• MongoDB instances for Event & Notification services
h. Messaging Layer
• RabbitMQ broker for async events (e.g., booking created → notifications, payment)
i. (Optional) API Gateway or Reverse Proxy
Component Relationships and Data Flow
1. User interacts with the Frontend.
2. Frontend issues REST calls to:
• User Service for registration/login
• Event Service for listing/searching events
• Booking Service to book an event
3. Booking Service writes booking data to its PostgreSQL, then publishes a “BookingCreated” event to RabbitMQ.
4. Notification Service’s consumer subscribes to “BookingCreated”, saves to MongoDB, and pushes email/SMS.
5. Payment Service subscribes or is called synchronously after booking to process payment.
6. Services may call one another synchronously (e.g., Booking Service calls User Service to validate user) over REST.
Architectural Patterns & Principles
• Microservices: each service is separately deployable, with its own database (polyglot persistence).
• Event-driven: decoupled async processing via RabbitMQ.
• Clear separation of concerns: user, event, booking, notification, payment.
• Technology diversity: FastAPI, Spring Boot, Flask tailored to service needs.
Essential Elements
• Clear component labels (Service Name + Tech + Port).