Add README markdown
authorHwankyu Jhun <h.jhun@samsung.com>
Fri, 24 Jan 2025 03:29:21 +0000 (12:29 +0900)
committerHwankyu Jhun <h.jhun@samsung.com>
Fri, 24 Jan 2025 03:29:21 +0000 (12:29 +0900)
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
README.md [new file with mode: 0644]

diff --git a/README.md b/README.md
new file mode 100644 (file)
index 0000000..476493e
--- /dev/null
+++ b/README.md
@@ -0,0 +1,56 @@
+**United Service**
+
+Multiple daemons have been consolidated into a single process, and each service has been rewritten using architecture styles and design patterns to run as a thread loop model based on either C or C++.
+
+Software Design Document
+1. Overview
+   - Goal: Integrate multiple currently independent daemons into one process to improve management efficiency, optimize resource usage, and ensure consistency between services.
+   - Key Features:
+     Run and manage each service independently as threads
+     Prevent conflicts and monitor status among services
+     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."
+
+   - 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.
+
+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).
+     Monitors service states and restarts them if necessary.
+
+   - Thread Pool:
+     Managed by the Service Manager; creates and manages threads for each service.
+     Responsible for efficient reuse and resource management of threads.
+
+   - IPC Module:
+     Handles inter-thread communications, including message delivery and data sharing.
+
+   - Logger:
+     Records system operations and service status changes for debugging and monitoring purposes.
+
+4. Operation Flow
+   - System Initialization:
+     When the Main Daemon Process starts, it initializes the Service Manager and Thread Pool.
+
+   - Service Execution:
+     The Service Manager uses the Thread Pool to create and execute each service as an independent thread.
+
+   - Monitoring Services & Restarting Them:
+     The Service Manager monitors each service's state and restarts any that terminate abnormally.
+
+   - Inter-Thread Communication:
+     Uses the IPC Module to deliver messages and share data between threads.
+
+   - Logging:
+     The Logger records major events within the system along with each service?s status changes.