# The Impact of Cloud Versus Local Infrastructure on Automatic IoT-Driven Hydroponic Systems
## 2 Materials and Methods
### Comparison Metrics Between AFCI and LSI  
The comparative analysis between AFCI and LSI will be carried out based on seven tests that focus on the infrastructure's performance in terms of RT, OR, IC, OC, CS, DA, and DS. RT aims to measure the time required for the process when an event is identified. In other words, RT quantifies the time elapsed between collecting sensor data and activating the pump. The authors start with the following two hypotheses:  
* RT-H1: The time for AFCI varies depending on the Internet connection. Sending data in the cloud may increase the RT, compared to LSI;
* RT-H2: The Internet connection does not affect the response time for LSI, as all processes run locally. However, the execution time per iteration within the process must be quantified for a relevant comparison with AFCI. The main objective for OR is the total error-free operating time over a predetermined period. This performance indicator reflects the level of trust in the quality of the software infrastructure used. The authors start from the following two hypotheses in the OR-associated test:  
* OR-H1: AFCI may record downtime when Azure performs maintenance;
* OR-H2: LSI has no risk of downtime. The IC indicator refers to the programming team's costs for implementing the solution. The more complex the implementation and the more advanced programming knowledge and modern technologies it requires, the higher the costs directly impact the overall business profit. In the case of IC, the authors start with the following two hypotheses:  
* IC-H1: AFCI has significantly higher IC than LSI because Azure programmers are experienced professionals trained explicitly in using these technologies, and the implementation time is much longer;
* IC-H2: LSI does not require senior-level programming skills. A mid-level programmer can implement such an infrastructure, lowering IC. The OC indicator refers to the actual costs of the software infrastructure, meaning how much is paid for each auxiliary service integrated into the infrastructure. These services are typically billed monthly based on their usage frequency. For this indicator, the authors propose the following hypotheses:  
Figure 6: Block diagram of the automatic system. Note: NC—nutrients concentration; NC\({}^{\text{i}}\)—Desired range for the nutrients concentration; ET—Environmental temperature; EH—Environmental humidity; LL—Tank liquid level; LT—Liquid temperature; ECS—Electrical conductivity sensor; T-HS—Environmental temperature and humidity sensor; LS—Level sensor; TS—Liquid temperature sensor. * OC-H1: The costs for Azure services (IoT Hub, server, SQL Database, cron) are higher than those of a local infrastructure;
* OC-H2: The costs for LSI can be zero. The CS indicator is associated with the flexibility of the proposed infrastructure when adding new hydroponic crops. Extending the monitoring needs by introducing a new crop involves adding more monitoring elements. A professional solution should allow this with minimal changes to the software infrastructure. Therefore, the authors start with the following hypotheses:  
* CS-H1: AFCI requires no fundamental modifications from the CS perspective;
* CS-H2: LSI requires a series of minimal modifications. The DA indicator refers to the ability to view data and the status of the hydroponic system remotely. The authors will analyze the following hypotheses:  
* DA-H1: Through AFCI, data can be accessed from anywhere in the world;
* DA-H2: LSI does not allow data visualization outside the intranet. The DS indicator tests the data's vulnerability to attacks by competitors who might attempt to sabotage hydroponic crops. The authors begin their tests with the following hypotheses:  
* DS-H1: AFCI benefits from all security layers through Azure's pre-implemented mechanisms, even though the data is stored externally;
* DS-H2: LSI may have multiple security vulnerabilities if not explicitly addressed during the software infrastructure implementation.