# Smartwatch-Based Monitoring and Alert System for Factory Operators Using Public Cloud Services
## 3 Materials and Methods
### The System Architecture  
In order to design the system architecture based on the previously functional requirements, it is necessary to establish a set of relevant criteria that will guide the design process and ensure that the resulting architecture meets all objectives. Therefore, the following criteria have been established: performance, scalability, ease of use, and flexibility. The system will have to respond quickly to user actions and efficiently manage resources. The architecture should be able to handle an increasing number of users and data volume without compromising performance. The user interface must be intuitive and easy to use, minimizing the time users spend understanding how the system works. Additionally, the architecture should allow for easy updates and modifications to existing functionalities and the addition of new features based on future requirements. \begin{table}
\begin{tabular}{c c} \hline \hline
**Functional Requirement** & **Responsible Component** \\ \hline _Real-time data processing and analysis_ & Server \\ \hline _User authentication and authorization_ & Server, web application, and smartwatch application \\ \hline _User management_ & Server and web application \\ \hline _Operator activity monitoring_ & Web application and smartwatch application \\ \hline _Notification management_ & Server, web application, and smartwatch application \\ \hline _Task list management_ & Server and web application \\ \hline _Work hours recording_ & Server, web application, and smartwatch application \\ \hline \hline \end{tabular}
\end{table} 
Table 1: The functional requirements and their associated components. Figure 2 presents a diagram illustrating the proposed system architecture. The diagram highlights the primary technologies used and how they interact with each other. The core component, the server, is built using Node.js and Express. This server performs several important tasks: handling user authentication and management through the AWS Cognito service; storing and retrieving specific data required by the application using the AWS DynamoDB service, a NoSQL database; serving as an entry point for certain requests sent by web and mobile applications; and utilizing the Firebase Cloud Messaging service to send notifications to users' wearable devices. The web application, built with React and Next.js, and the smartwatch application, developed using Kotlin, interact with both the server and AWS API Gateway through REST requests or WebSocket messages to enable information exchange. Through API Gateway, Lambda functions, which are developed in the AWS Lambda service, process incoming requests. In this way, these serverless functions allow code execution in response to specific events, without requiring server administration. By distributing tasks between Lambda functions and the server, the proposed IT system enables faster request processing while reducing the load on each component. Furthermore, the mobile application will be connected to the Firebase Cloud Messaging service to receive real-time notifications. Evaluating the proposed architecture against the previously mentioned criteria, we can observe the following:  
* **Performance**: The use of serverless services, such as AWS Lambda, ensures rapid and efficient processing of requests, reducing perceived response times for users. Interaction with AWS API Gateway and the server optimizes request handling, distributing workloads in a way that maximizes resource utilization and minimizes latency. * **Scalability**: The cloud-based architecture, leveraging AWS services, allows for adaptation to increasing numbers of users and data volumes. Scalability is enhanced by the ability to dynamically adjust allocated resources based on real-time system requirements without interruptions. Figure 2: The system architecture. * **Ease of Use**: Choosing the right technologies for creating two applications designed for user interaction was a crucial step.