## 7 Discussion of Quality Properties
### Second Scenario  
Here, the evaluation of each variation based on the quality properties is presented.  
First, all three variations have some common reference points concerning the aspects of quality properties we are considering.  
The **Time Behavior** is simply the same for all three variations. More specifically, the time required to calculate the average temperature is clearly increased, since several gradual and sequential stateless and stateful processing steps are required. Therefore, although the response time remains constant, the turnaround time is relatively increased. Furthermore, the total time required for the final temperature is affected to the greatest extent by the turnaround time; therefore, it will also be increased.  
Regarding the timeliness of the service, it is affected by two main issues. First, the total processing time, which, as mentioned, will be relatively increased. Second, the temperature calculation is conducted every minute. Therefore, any change in the sensor measurements will not be immediately visible in one-minute intervals. Instead, it will be visible shortly after the end of the one-minute interval. However, the final result, when obtained, primarily reflects greenhouse conditions, since the event timestamp is taken into account and not the ingestion timestamp. If a sensor sends delayed data while it had previously--but always within the time window--sent data at the correct time, the delayed data will not be considered in calculating the average.  
Regarding fault tolerance as an aspect of **Availability**, each variation has a different tolerance for IoT Physical errors. However, one factor of fault tolerance related to late but valid events within the predefined time window is the same for all three variations. So, the additional, common aspect contributing to fault tolerance is that the event timestamp is taken into account instead of the ingestion timestamp, which means that late events will be ignored or not contribute to the average calculation. Given that there is at least one correct temperature in the predefined time window for each sensor in the total number of sensors required for each variation, the service is available.  
Regarding trustworthiness as an aspect of **Reliability**, given that the time window of one minute is small, the result of the service is trustworthy. However, even in the interval of one minute, there are significant changes, and the user is not aware of them in real-time, but in a short period of time, they receive knowledge of the final temperature as well as of all the temperatures that contributed to its calculation.  
The most important, conserved, common reference point is that in all three variations when the service is available, reliability is served to the absolute extent.  
Some additional common references points include:  
1. The service is inclusive, since it includes (or tries to include) all the available sensors.
2. The validity and correctness of the input data always result in the production of a valid and correct temperature value.
3. Late events, i.e., invalid events, do not affect the validity and the correctness of the calculated temperature, since IoT Events are sorted based on the actual timestamp, i.e., the event timestamp.
4. To the extent that the service is available, functional correctness is maintained in both cases of the examined faults.