# Fuzzy-Based Multi-Modal Query-Forwarding in Mini-Datacenters
## 1 Introduction  
Traditional datacenters are typically designed to handle data at larger scales in terms of zeta bytes (\(10^{21}\)) for enterprise applications, cloud storage, and services [1, 2]. Further, the Internet of Things (IoT) is transforming various sectors [3, 4], such as the industries, healthcare, energy, home appliances, agriculture, and business, and according to [5], the IoT is projected to grow to 40 billion devices by 2033. The rapid growth of IoT-connected devices has led to an explosion in data generation [6, 7], which is expected to reach 79 zeta bytes in 2025 [8]. Transferring such large amounts of data from various interconnected devices to the cloud for processing would result in severe network congestion, emphasizing the limitations of traditional cloud-centric architectures in handling the demands of modernnetworks [9; 10]. Thus, there is a demand for new approaches that rely on distributed networks instead of centralized processing [11]. To meet the demands of emerging IoT applications and use cases, several computing models, such as edge computing and fox computing, have been developed [12; 13; 14]. However, edge computing is often treated as an extension of the cloud, requiring advanced infrastructure to support real-time task processing. In industrial monitoring, IoT sensors facilitate query-based data monitoring for runtime verification of machine operations [15; 16; 17]. However, for applications with minimal computational needs, relying on expensive cloud datacenters is inefficient. Moreover, the traditional datacenters follow a partition/aggregation flow model [18], and the datacenters more often face congestion events [19], as they rely on coarse-grain mechanisms, such as priority flow controls [20], end-end congestion control protocols [21; 22], and so on. These mechanisms may not be sufficient in resource-constrained environments, where reliability concerns are more pronounced. To address this, we propose a mini-datacenter in the form of a wireless sensor network (WSN), featuring a layered-distributed architecture that operates efficiently at the edge of the network for data collection. The mini-datacenter is a three-layered system, consisting of a command center, gateways, and IoT sensors. The command center functions similarly to a central server in a cloud/traditional datacenter, handling query-response flow, analysis, storage, and decision-making. Gateways within the system are integrated and equipped with local storage capabilities, mainly for buffering data before forwarding it either to the command center or to the IoT/sensor devices within the network. The responses from the sensors are aggregated at the respective gateways, and the aggregated responses are refined at the command center in the query processing pipeline, primarily focusing on improving the reliability of the responses. We have proposed a novel query flow management framework that employs:  
* A duplication/aggregation query flow model,
* A multi-modal query forwarding mechanism, and
* A fuzzy logic intelligence-based dynamic query forwarding selection. We have developed two query forwarding strategies: coarse-grain and fine-grain-based on the granularity of adaptability and reliability during query processing. In the coarse-grain approach, each incoming query is forwarded through a direct path involving the command center, an available gateway, and IoT sensors. Sensor responses are aggregated at the respective gateway and transmitted as a single data stream to the command center. This approach reduces data handling complexity but may compromise reliability. In contrast, the fine-grain approach offers a higher degree of reliability and adaptability. It forwards redundant copies of each query through at least two available gateways. Query processing is handled independently at respective gateways, and the aggregated responses are then compared at the command center to select the most reliable one.