## 3 Materials and Methods
### Server Architecture  
The server-side applications run on a virtual private server (VPS) provided by a web hosting company. The VPS runs the Ubuntu Server 20.04 operating system [48] and has 8 GB RAM, 2 virtual CPUs, 100 GB disk space, and 2 TB of bandwidth. An overview of the monitoring system, including server-side applications, is shown in Figure 3.  
A flowchart containing the step-by-step implementation is shown in Figure 4.  
Figure 3: Monitoring system overview. The applications that are executed on the server are explained below. * Mosquitoitto: It is an MQTT broker [49]. Mosquito receives the measures sent by the monitoring devices. * Telegraf: It is an MQTT client [50]. It subscribes to the topics that contain the exposure information of the employees and records them in the database. * InfluxDB: It is a time-series database [51]. InfluxDB stores the exposure information of the workers. * Grafana: Grafana is a platform for visualizing and analyzing metrics through graphs [52]. The server reads data from InfluxDB to generate graphics that show the exposure information of each worker. The data can be downloaded in CSV files. * MongoDB: It is a document-oriented database [53]. MongoDB stores employees' information. * Web application: It was built using HTML5 [54; 55; 56; 57; 58] and is accessible through HTTPS (hypertext transfer protocol secure), using digital certificates [59]. It is intended to allow managers, the OSH team, etc., to register employees and associate them with monitoring device IDs, display the list of monitoring devices and the IDs of the employees who use them, display the current activity and the history of activities (if any) performed by a person in the company, update employee details, and register when an employee retires or leaves the company. This information is stored in MongoDB. This web application provides a web page where the alerts and suggestions may be  
Figure 4: Flowchart with the implementation step-by-step. verified for each employee. This information is generated considering the diseases and symptoms stored during employee registration and can be updated anytime by the company. On the same web page, there is a link to Grafana, where the employers can view the graphics with information about the workers' exposure. The use of the web application, mainly for employee registration, is better explained in the next section. * Machine learning module: This module is under development and aims to help employers make long-term decisions about occupational safety and health by suggesting points that deserve attention. The machine learning module will be part of a recommendation system that will analyze the exposure data provided by each monitoring device and classify the data as risky or not. Alerts and suggestions will be generated based on the responses in this module. * Mobile application for workers and backend server: The mobile application is intended for workers to check their daily exposures using a very simple interface that is composed of a homepage, showing buttons to access the summary of the last 24 h for all of the monitored quantities. By clicking on one of these buttons, it is possible to check the minimum, maximum, and average values, and alarms (yes or no). For all of these quantities, at the bottom of the web page, the summary shows the following buttons: \"View history of the last 24 h\", \"View history of the last 7 days\", and \"View history of the last 30 days\". When clicking on one of these buttons, the application will show the device ID and a list with the date, time, and value of the monitored quantity for each 10 min for the selected period. These data are read from the InfluxDB database. A web page with help content presents relevant information about the study and its objectives, a summary of the monitored quantities and their limits, and information regarding data privacy.