# The Impact of Cloud Versus Local Infrastructure on Automatic IoT-Driven Hydroponic Systems
## 3 Results
### Metrics Results for Performance Comparison Between AFCI and LSI  
To measure RT, 240 test cycles were performed for each infrastructure, using the same network to ensure the Internet connection was identical. The time monitored during each test was obtained as the difference between the moment the data was sent and the moment it was recorded in the database. The results are as follows:  
* For AFCI, the average RT was approximately 300 ms;
* For LSI, the average response time was 200 ms. Figure 10 presents the RT evolution for AFCI and LSI. The graph shows the superiority of the LSI infrastructure. AFCI performance depends on the quality of the Internet connection. An Internet connection outage would lead to the hydroponic system's inability to function. LSI demonstrates superiority in terms of RT, making it more suitable for the automation typology of the hydroponic system. As a result, both RT-H1 and RT-H2 are confirmed. The superiority of the LSI configuration is marked by the value 1 in Table 2, while the value 0 is assigned to AFCI. In this way, after analyzing all the proposed metrics, it will be easy to visually determine the superiority of one of the configurations. For OR, the following observations were recorded over 10 days:  
* AFCI missed one measurement due to Azure unavailability, which could have been caused by maintenance or other service issues;
* LSI did not record any interruptions, confirming hypotheses OR-H1 and OR-H2. However, it should also be noted that a power outage would have the same consequences as an internet outage, affecting both types of infrastructure. Nevertheless, this time, LSI receives a point in Table 2, as it demonstrates superiority in the OR metric. The estimation of IC was based on the skill level of one of the authors, who was assessed as an intermediate programmer. The number of hours required to implement the AFCI infrastructure was 31 h. In contrast, the number of hours needed for the LSI implementation was approximately 20. The authors acknowledge that this analysis is subjective, given that a programmer may be more experienced with cloud infrastructures or vice versa. Additionally, counting hours may be influenced by factors such as fatigue or others; however, the difference in the number of hours is significant enough to confirm both hypotheses, IC-H1 and IC-H2. This metric demonstrates the superiority of LSI over AFCI, adding one point to Table 2 for LSI. An experimental Azure account was used to evaluate the OC metric. Within this account, for the 10 days of monitoring, an 82.57 USD/month cost was obtained for Azure services. Table 3 presents the detailed cost analysis of the Azure Infrastructure. This account exclusively includes server services, database, IoT Hub, and cron through Azure Stream Analytics. The OC for LSI is 0 USD/month, confirming hypotheses OC-H1 and OC-H2. LSI's superiority in terms of OC leads to adding one point in Table 2. \begin{table}
\begin{tabular}{c c c} \hline \hline
**Metric Indicator** & **AFCI** & **LSI** \\ \hline RT & 0 & 1 \\ OR & 0 & 1 \\ IC & 0 & 1 \\ OC & 0 & 1 \\ CS & 1 & 1 \\ DA & 1 & 0 \\ DS & 1 & 0 \\ Total & 3 & 5 \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Comparison of AFCI and LSI infrastructures based on key metrics. Figure 10: RT comparison between AFCI and LSI infrastructures. Table 3 depicts the cheapest scenario that can be used in a production phase. Unlike the development phase used in this research, the production phase may include auxiliary costs. Microsoft provides an online calculator that allows the configuration of all services needed for the production phase. In Table 3, the production configuration is similar in cost to the development one. The configuration set for the production phase includes the \"Standard Tier, Free\" plan for the IoT service, which consists of 500 devices and 8000 messages per day, with no additional costs. This is a free option for implementations of the size of the hydroponic system proposed in this work.