Efficiently communicate and share data between threads
2. Architecture Styles and Design Patterns Applied
- - This design applies both the "Layered Pattern" and the "Master-Slave Pattern."
+ - This design applies both the "Layered Pattern" and the "Main-Secondary Pattern."
- Layered Pattern:
- Description: A software system is divided into layers where each layer has specific roles and responsibilities, and higher layers utilize lower-layer services.
- Reason for Application: By separating systems into layers, modularity and maintainability are improved, allowing independent development and testing at each layer.
- - Master-Slave Pattern:
- - Description: The master component distributes tasks to slave components, collects their results, and generates the final result.
- - Reason for Application: Setting up the service manager as the master and individual services as slaves allows distributed task processing while facilitating centralized control and monitoring.
+ - Main-Secondary Pattern:
+ - Description: The main component distributes tasks to secondary components, collects their results, and generates the final result.
+ - Reason for Application: Setting up the service manager as main and each individual service as secondary allows distributed task processing while facilitating centralized control and monitoring.
3. Architectural Components
- Main Daemon Process:
Acts as entry point of the process, managing overall initialization and termination of the system.
- - Service Manager (master):
- Executes and manages each service as an independent thread (slave).
+ - Service Manager (main):
+ Executes and manages each service as an independent thread (secondary).
Monitors service states and restarts them if necessary.
- Thread Pool: