Based on the detailed content from the provided PDF document, here's a draft README file tailored to the project:
- Course: Distributed Systems
- Semester: 2025-1
- Institution: Universidad Nacional Autónoma de México (UNAM)
- Instructor: Ing. José Abraham Bonilla Pastor
- Peralta Rodriguez, Juan Manuel
- Ríos Lira, Gamaliel
- Sánchez Rosas, Alexis Alejandro
- Santiago Alejandro, Aldo
This project is a distributed support ticket management system designed to ensure efficient and fair distribution of support tickets across multiple branches (nodes). The system is built to maintain availability, consistency, and fault tolerance, ensuring that tickets are managed equitably even in the presence of node failures.
The system uses distributed databases, mutual exclusion mechanisms, and consensus algorithms to coordinate between nodes. It features a master node that manages the assignment of tasks and redistributes them dynamically in the event of node failures.
The main objectives of the project are:
- Design a distributed system that supports multiple nodes (branches).
- Ensure fault tolerance and load balancing among nodes.
- Implement a ticket management system with distributed data storage for engineers, users, devices, and tickets.
- Guarantee mutual exclusion when assigning tickets to engineers.
- Ensure consensus during database updates.
- Implement a mechanism to elect a new master node in case of master node failure.
- Java (Spring Boot): Backend development and distributed communication.
- Maven: Dependency management.
- MariaDB: Distributed database system.
- Docker & Docker Compose: Containerization and deployment.
- Sockets: Communication between distributed nodes.
- Multithreading & Semaphores: Handling concurrency and mutual exclusion.
- Client Nodes: Handle ticket creation, assignment, and closure.
- Master Node: Manages device distribution, handles consensus, and coordinates ticket assignment.
- Distributed Database: Stores data related to users, engineers, devices, and tickets across multiple nodes.
- Heartbeat Mechanism: Ensures nodes are alive and functioning, enabling fault detection.
- Token Ring Algorithm: Ensures mutual exclusion for critical sections (e.g., ticket assignment).
- A user creates a support ticket from any branch.
- The system assigns an engineer to handle the ticket, ensuring no two engineers receive the same ticket simultaneously.
- If a node fails, tasks are reassigned to other active nodes.
- In case the master node fails, an election algorithm selects a new master node to maintain system continuity.
Make sure you have the following installed:
git clone https://github.com/your-repository.git
cd your-repositoryIn the root directory (where backend/ is located), run:
docker compose buildThis will build the Docker images for both the client and server nodes.
Launch the distributed system using:
docker compose upThe system will automatically deploy multiple nodes, including a master node and client nodes. Access the system at http://localhost:8080.
- Create Tickets: Users can create support tickets from any branch.
- Automatic Engineer Assignment: Ensures no two engineers are assigned the same ticket simultaneously.
- Dynamic Load Redistribution: If a node goes down, tasks are automatically redistributed.
- Node Monitoring: Heartbeat messages check the status of nodes continuously.
- Master Node Election: In the event of a master node failure, a new master is elected automatically.
- Creating a Ticket:
- A user submits a ticket for device support.
- The system assigns the ticket to an available engineer using mutual exclusion.
- Node Failure Handling:
- If a node fails, its tasks are reassigned, and its data is updated across remaining nodes.
- Master Node Election:
- The system continuously monitors the master node and initiates a re-election process if the master fails.
- Node Synchronization: Further optimization is needed to reduce latency in synchronization across nodes.
- Security Enhancements: Implementing secure communication channels (e.g., TLS) for node communication.
- Scalability: Testing the system under high loads and adding horizontal scalability.