## 5 Main Problems and Proposed Solutions Using FOG or IEC in Smart Buildings
* Security and Access Control: Enterprise clients (or federations of SBs) using the Fog layer require seamless access to multiple cloud services through a single authentication mechanism for both users and IoT devices [47; 48]. Implementing robust security measures is therefore crucial for protecting the privacy of residents, employees and visitors, and ensuring secure access to SB facilities while maintaining cost-effectiveness. Furthermore, the implementation of a robust security layer is imperative to mitigate Denial-of-Service (DoS) attacks targeting IoT devices, Wi-Fi access points within Smart Buildings (SBs) and their ingress routers or gateways connected to service providers. This security layer is a fundamental requirement for both Fog and Edge computing architectures, as such attacks are agnostic to the chosen paradigm. There are several solutions proposed and discussed in [39; 48]. Figure 7 illustrates a general solution to the aforementioned issues and challenges, exemplified by a VoIP call, chosen as a representative SB and VoIP application. The Figure uses VIoT as an application example for both Fog and IEC deployments, employing machine learning algorithms at the call origin to mitigate background noise. Adaptive Real-Time Control Protocols (RTCP-IoT) [23] are also utilized during the VIoT call. Figure 7 depicts the main call flow from origin to destination, with the lines (arcs, edges, connections) representing unidirectional or bidirectional VoIP (SIP/RTP) packet streams. The solutions presented in the cells of Table 1 directly relate to Figure 7.  
Table 1, which includes a glossary of abbreviations and acronyms (e.g., Fog with SDN or NFV (FSN), FOG, IEC with SDN or NFV (ISN), IEC, and ANY [representing Any of  
Figure 7: A diagram illustrating how to solve the main issues and challenges during a VoIP call on SB. the previous architecture alternatives], or (--) [not applicable]) further detailed in Table 2, outlines key challenges and issues in the columns (items \(a\).-> \(d\). previously detailed), those which must be addressed for one or more SBs and various application categories (rows of Table 1) within the proposed SB use case. The table further proposes optimal solutions based on two main implementation approaches:  
1. _Intelligent IoT Device Selection:_ This approach focuses on determining the optimal IoT device category (1) low-end, (2) middle-end or (3) high-end--as detailed in Table 2--to achieve the best cost-benefit ratio. The goal is to avoid unnecessary expenses by selecting the most appropriate category for the various IoT devices deployed within the SB [49]. 2. _Network Architecture Selection:_ This approach focuses on selecting the optimal Fog or IEC network architecture for the proposed use case, based on the three-tier cloud computing model: with Fog or IEC as the intermediary layer, as detailed in the Table 2. This includes considering the adoption of open SDN and/or NFV technologies. The decision to adopt SDN or NFV is a difficult decision and is more justifiable for federations of SBs or regional service providers serving numerous SBs within a defined geographical area (e.g., a large neighborhood or municipality). Future work will expand upon this study and refine this central Table 1 to further aid in decision-making. The optimal implementation decision will depend on factors such as the number of SBs (one or two buildings in close proximity, or a larger geographical complex), the size of the residential/commercial complex or the scale of a clearly defined federation of SBs within a specific neighborhood; moreover, the indicated articles' research complements this decision-making process.