# FODIT: A Filter-Based Module for Optimizing Data Storage in B5G IoT Environments
## 2 Background
### Filters
Additionally, local databases may face challenges in data synchronization and remote accessibility, making them less suitable for large-scale, distributed IoT systems. * _Cloud-based storage_ solutions offer scalable, on-demand storage managed by third-party providers. This model enables seamless data access, redundancy, and backup capabilities, making it ideal for IoT applications that require high availability [42]. The key benefits of cloud storage include elastic scalability, reduced infrastructure costs, and remote accessibility. Nevertheless, reliance on cloud services introduces concerns regarding data privacy, network dependency, and latency. Additionally, subscription costs and compliance with data regulations must be carefully managed when adopting cloud-based solutions. * _DLT_ such as blockchain [43], offers a decentralized approach to data storage, enhancing security and transparency. In an IoT context, DLT ensures data integrity, immutability, and traceability, which are crucial for applications requiring high levels of trust. However, DLT-based storage systems often face scalability challenges, as maintaining a distributed ledger across multiple nodes demands significant computational and storage resources [44]. Furthermore, the transaction processing time in blockchain-based systems can introduce latency, making it less suitable for real-time IoT applications [8; 45]. Each of these storage approaches plays a vital role in addressing the requirements of IoT data storage. In Table 2, the pros and cons are summarized. Local databases offer security and low latency, but lack scalability. Cloud storage provides flexibility and scalability while raising concerns about data privacy and network dependence. DLT ensures data integrity and security at the cost of scalability and processing efficiency. A

Figure 2: The figure displays IoT data storage scenarios. hybrid approach that integrates these storage solutions based on specific application needs can help optimize data management in IoT ecosystems. The volume and heterogeneity of IoT data in B5G environments necessitate a paradigm shift in how data is filtered, prioritized, and stored. The convergence of edge computing and B5G allows for intelligent, on-device decision-making to reduce unnecessary data transfer and storage. Probabilistic data structures, such as _filters_, offer lightweight mechanisms for approximate membership tests and summarization, which are especially valuable when bandwidth or storage resources are constrained. ## 5 FODIT Overview

In this section, we introduce a module named FODIT. A general description is presented in Section 5.1, and Section 5.2 discusses the workflow. ### Architecture Overview

The FODIT module operates in two distinct phases. The first phase handles data insertion into the server provider, while the second phase performs data queries. Figure 3 illustrates this process. In the insertion phase, before storing data directly in the server provider, a cuckoo filter is initialized. This filter serves as a mechanism to optimize both storage and the insertion process. Each time a data item is to be inserted into the server provider, it is first checked against the cuckoo filter. If the data already exists in the filter, this implies that it has already been inserted into the server provider, and thus the system avoids inserting it again, preventing duplicate storage. A special case arises when data is intended to be stored on a DLT, as we cannot guarantee that the data has been successfully stored until the corresponding transaction is confirmed. To avoid inconsistencies between the data stored in the filter and that stored on the DLT, FODIT integrates a data structure where data is held until confirmation is received. Two possible scenarios may occur:

* _Transaction confirmation is received within the maximum time window defined for the temporary structure._ In this case, the data is removed from the temporary structure and inserted into the filter.