# Embracing the Future Internet of Things +
## 5 Evaluation  
We have performed experimental tests with the aim of analyzing the impact of a topology of federated IoT platforms instead of a single cloud IoT platform instance. In particular, we have made usage of the FIWARE foundation [7] and its portfolio of components for creating various IoT platform configurations. The first set of tests is meant to understand the impact on the performances when the data requests are not handled by a single component in the cloud but into a federation of platforms. In the former case, the data is directly requested to the provider of the data; in the latter case, for each query, a discovery is performed first to find the provider of the requested data and then the data is provisioned to the requester, hiding the complexity of the system behind. We have used the dockerized reference implementation of the FIWARE Context Broker Generic Enable [29], which is recommended by the European Commission as one of the Connecting European Facility [30], as the centralized IoT platform. On top of it, we have then instantiated a federation framework comprehensive of a broker of IoT messages, using the reference implementation of the FIWARE IoT Broker Generic Enabler [31] together with the alternative implementation of the FIWARE IoT Discovery Generic Enabler [32]. All the components are using the OMA NGSI standard [9]. In the case that the IoT query is handled by the centralized system, the request is issued directly to the Context Broker (CB) that performs a lookup on its local database and responds to the requester. However, the queries handled by the federated framework are sent to the IoT Broker (IoT-B), which discovers providers through the IoT Discovery (IoT-D) component and then requests all the discovered providers (in our case several CBs) with the requested data. The responses are then collected by the IoT-B and sent back within a single message to the requester. The latter is not aware of the complex topology hidden behind the IoT-B.  
Figure 8a shows the result of performing query to a centralized and federated IoT system. The federation is made of an IoT-B and an IoT-D that are hiding an instance of CB. The plots show on the \(x\)-axis the number of entities (i.e., things) requested in each query. The throughput is measured as the number of entity data (fixed to 20 attributes per entity) per second. Several sizes of the IoT system are tested: 100, 1000 and 10,000 entities. The requests are made using 100 parallel clients continuously requesting the systems. The plots show that the performances, both throughput and latency, are not affected much by a big volume of data exchanged, although the federated configuration requires more operations and generates more messages.  
Figure 7: Integrated cloud and edge technologies: from vehicle to vehicle.  
We have then performed a second test for assessing the scalability advantages implicit of the federation. We have envisioned a scenario of 10,000 entities handled both by the centralized system and by a federation of 10 different providers, each one managing a disjoint set of 1000 entities. The test has been repeated for 10, 50 and 200 parallel clients (i.e., threads), requesting 2, 8, 32, 128 and 512 entities per query. Figure (b)b clearly shows that a federation with several small data providers with sharded dataset are outperforming by orders of magnitude the centralized approach.  
A federated platform has many advantages, for example: data providers can handle data locally preserving privacy and data sovereignty, a new data provider can join the federation (by performing an NGSI-9 RegisterContext) at any time since a discovery is performed for each request (we are not considering the case of caching), complex semantic discovery can be performed at discovery time, service-defined data analytics can be triggered on demand at the time of the query. In addition, a heterogeneous system can join the federation making usage of mediation gateways for translating the data format and interfaces methods.