# Test Bed of Semantic Interaction of Smart Objects in the Web of Things
## 5 Evaluation  
Although some of the measures used most to evaluate test beds and other implementations are the quality of service indicators, it was decided not to manage these since the measurement objective is the interaction between smart objects, and not the quality of the different aspects that the test bed may have. However, the test bed takes the following measures in order to ensure a good quality of service:  
* Duplication of tasks [29]: in critical tasks such as sending MQTT messages to the server, the processes dedicated to publishing the messages are replicated at least three times. This is done in order to ensure the arrival of the package to the broker and its replication in the respective subscribers, and in this way increase the fault tolerance of the test bed. * Focus on programming threads [30]: the elements of the test bed have been programmed to think of thread systems, seeking to organize and synchronize different redundant and heavy processes in separate threads to improve the response times of the test bed. * Interactivity, delay, and criticality interactivity [31]: corresponds to the queries made by the user to the semantic index to detect objects and their resources. Delay is an indicator that is measured in the experiments under the name of interaction latency, with which a quality of interaction service can be established. Finally, criticality was taken into account when sending the states of each resource to the MQTT server, because these processes are critical in the test bed. Figure 7: Clipio interfaces. To evaluate the test bed, it was established that the appropriate indicator to perform the measurements should be latency in interaction. This consists of measuring the time elapsed since an element makes a query or sends a message, until the results are returned or executed. The first tests showed very high interaction latency times, with average values of 13 s. Analyzing the critical points of the system, improvements were made in the processes and bottlenecks, achieving considerably improved response times as the alpha tests of functionality progressed. Therefore, a new group of tests was carried out to detect delays (latencies) with precise times and with suitable analysis. The steps taken for the analysis were:  
* Measurements of latency times were applied only to the general processes. * The times correspond to the exact latency from the start message until the confirmation with the completion message arrives. The times perceived may be a bit longer due to a delay in the recomposition of the interfaces. * A table was collected that keeps all the messaging work between the objects and Clipio. They were organized according to the use case to which they belong and finally a latency analysis process was carried out. * Twelve tests were carried out during twelve different days, one per day. * Not all the tests were performed executing the same interaction services, since each test sought to test a particular functionality. However, the times were averaged, solving the problems of the differences in the number of records collected
* Since at individual times the individual measurements had extreme times (long and short) with respect to the average normal function, the ends were removed to avoid distortions. The eliminated times were stored separately in order to determine what happened at those points. Taking the interaction latency times into account, an interaction service quality can be measured. The results of the operations on the test bed were identified. To be classified as real time, these should not be longer than 4 ms [15]. This time is taken as a reference for the experiments and Table 2 is defined to interpret the interaction service quality. For the evaluation, the following considerations are taken into account:  
* The measurements were applied to the use cases and not to the internal processes contained in them. Evaluations are presented for the use cases discussed in this document, considered as those that contain the main functionalities of the test bed.