## 4 Use Case: Smart Buildings
### Indoor Environmental Subsystem Scenario  
A smart building has already implemented several subsystems such as energy, lighting, HVAC, flooring, and motion sensors. The current smart building subsystems rely on technologies such as Wi-Fi, Bluetooth, ZigBee, Message Queuing Telemetry Transport (MQTT) and SDN as communication technologies. The smart building architecture follows an edge-fog-cloud continuum approach, that was demonstrated to be suitable for reducing the large amount of data generated by sensors [33]. In other words, the smart building has an edge node that can process data, analyze data, and make decisions. By monitoring and analyzing data in real-time, smart buildings can make automatic adjustments to various subsystems, such as heating, cooling, lighting, and ventilation, to ensure optimal performance and energy efficiency. The smart building system follows a centralized learning approach. Typically, the centralized learning approach centralizes the data from sensors in the cloud and trains AI models that can be distributed and applied to all devices [34]. Consequently, historical data is stored in the cloud infrastructure, to be used to train AI models to optimize the smart building resources. The trained models are deployed to the edge node for making useful predictions to automate decision making. Thus, the smart building has distributed application and services along the edge-fog-cloud continuum that require a continuous communication between the edge node and the cloud infrastructure.  
An indoor environmental subsystem based on RINA was designed, implemented, and deployed at a smart building following the architecture proposed to integrate this subsystem with the current SDN-based system. Figure 10 shows the subsystem architecture for the analyzed scenario. The subsystem is composed of several RINA-based sensors to measure the temperature, humidity, and carbon dioxide (CO\({}_{2}\)). These sensors communicate to the edge node RINA-based application by using a RINA-based IoT gateway (more details are provided in Section 4.2). The RINA-based application receives data that come from the sensors and inserts them into an InfluxDB database system. The InfluxDB database system contains the data from all smart building subsystems. In other words, this database receives data through a MQTT broker from the lighting, energy management, security, and fire subsystems that are already working on the building with SDN OpenFlow switches and other IoT wireless technologies (Wi-Fi, Bluetooth, and ZigBee) and communication protocols.  
The real-time analytics application and predictive services are fed by using the data within InfluxDB. The data process application is in charge of three main tasks: (i) aggregating the sensors' data to reduce the large amount of data to be transferred to the cloud, (ii) filtering  
Figure 10: Indoor Environmental subsystem high level architecture.  
and preparing data for predictive analytics carried on by the AI models, and (iii) calculating descriptive analytics (e.g., mean, maximum, and minimum values) to be published on a dashboard. Meanwhile, the predictive services are AI-based applications that make predictions to make automatic adjustments in the smart building subsystems. The current distributed data process application and predictive services were designed for receiving support from the TCP/IP stack. This fact complicates the use of the RINA network to enable communication between the application and predictive services deployed on the edge node and the cloud core. To overcome this limitation, the RINA L2 VPN provides an innovative solution to TCP/IP-based applications for using a RINA network without changing the current applications and services. Consequently, end-to-end RINA flows are smoothly allocated to take advantage of the RINA performance derived from the protocols' headers reduction, previously analyzed in [35; 36].