## 5 Technical Architecture of the Framework
### Advantages of IBBA Framework  
One of the key components across all modules is the custom software that drives data collection, processing, data aggregation to big data cloud service, blockchain interaction, etc. Microservices constitute the majority of such components. These microservices are deployed on remote and resource-constrained devices with limited bandwidth/network connectivity. While deployment and maintenance/upgrades are major challenges since microservices are remote, issues related to network outages, session management, and data consistency are some of the other challenges. The Kubernetes (K3S/K8S) [32] is the chosen deployment mechanism of the IBBA framework which not only facilitates and automates the remote deployment but also provides self-healing features in the event of outages. Moreover, K3S facilitates an integrated platform for development and on-demand deployment using runtimes to run containerized workloads. Also, in production environments, K3S facilitates continuous deployment, automatically pushing the newer version of a deployed component once the container registry is updated with the latest code. Table 3 summarizes the technical details of each module of the proposed framework. Implementation Use Case 2: IBBA Implementation Detecting Undeclared Allergens (Ex. Pennut) in Wheat Flow  
Food recall because of undeclared allergens is one of the major reasons [33; 34] for product recall all over the world. In Canada, the second-highest food recalls involve allergens [33]. Even though undeclared allergen contamination is often unintentional, such contamination occurs when using shared facilities/processing lines for food product production or processing. Finding such contaminants early in the production cycle not only saves us from collateral damage but also from financial losses to the company that is producing the food [35]. This section discusses a real-time use case of IBBA implementation detecting undeclared allergens (ex. peanuts) in wheat flour. Figure 6 summarizes the interactions of IBBA modules: IoT, edge, backbone, mobile, and portal. 1. An IoT system (IBBA IoT) to be designed and developed with a near-infrared (NIR) spectrometer and a proximity sensor on board. This IoT System also contains an SBC which hosts the functionality of processing the generated data (IBBA Edge). 2. When the raw material for bread (wheat flour) is set up on the process line and prepared for the next step of the bread manufacturing process, the IoT System recognizes the presence of the flour sample in its proximity and triggers the onboard NIR spectrometer sensor to grab the spectral signature of the sample. 3. The NIR sensor saves the spectral signature onto the local storage of SBC and triggers the microservices (on SBC) to process the data, apply trained ML/DL algorithms, and predict/classify the sample as contaminated or not (IBBA Edge). 4. If wheat flour is classified as contaminated and the contamination exceeds the threshold limit, then the batch is stopped from being processed further; otherwise, the batch is allowed to move to the next step. \begin{table}
\begin{tabular}{l l l l l} \hline \hline \# & **Module** & **Infrastructure** & **Software** & **Connectivity** & **Deployment** \\ \hline \hline
1 & IBBA IoT & ARM Processors, Various Sensors & Microservices Running on ARM (Linux), K3S [26], Node & 5G/Wi-Fi & K3S Cluster on Edge \\ \hline
2 & IBBA Mobile & OEM Processor & Android/iOS-Based Apps/HTML5 & 5G/Wi-Fi & App Repositories \\ \hline
3 & IBBA Edge & ARM/x86 Processors & K3S Cluster, Microservices, Kafka, MongoDB & Wi-Fi/Highspeed Internet & K3S Cluster on Edge \\ \hline
4 & IBBA Backbone & Cloud Infra & Microservices, TensorFlow/ Hadoop/Spark/Hive/Python/R & Highspeed Internet & Kubernetes Cluster on Cloud \\ \hline
5 & IBBA API/ Portal & Cloud Infra & APIs Backed by Microservices & Highspeed Internet & Kubernetes Cluster on Cloud \\ \hline \hline \end{tabular}
\end{table} 
Table 3: Summary of technical details of each IBBA module.