An energy-aware application module for the fog-based internet of military things

Smart devices in various application areas are becoming increasingly prevalent for efficient handling of multiple critical activities. One such area of interest is high-security militarized environments. Due to military zones’ harsh and unpredictable nature, monitoring devices deployed in such environments must operate without power interruption for extended time periods. Therefore, it is essential to choose an appropriate application design for operating these “things” in the internet of things (IoT) environment such that energy can be conserved throughout the operating span of an application. This paper presents two application modules and analyzes their performance in terms of energy conservation considering a military-based IoT-Fog architecture. The two modules are: A sequential application module, and a master-worker application module. Experimental results show that the master-worker module incurs lower energy consumption and communication overhead than the sequential application module. Significantly, the master-worker module exhibits a lower delay in tuple execution by almost four milliseconds while also accounting for lower simulation time and higher network utilization. The module achieves significant savings in energy consumption, making it more effective in handling smart devices.


Introduction
The internet of things (IoT) is ubiquitous and is changing the way we live and work. Applications of the IoT are becoming popular in a myriad of fields of life, including education, health, transportation, security, and surveillance [1]. The IoT is a network of heterogeneous devices capable of capturing and sharing information without human intervention [2]. IoT networks are classified as cyber-physical systems of interaction between the abstract cyber system and the physical environment using the Internet [2]. The aim is to allow these things to autonomously acquire vital information from the deployment area [3]. For instance, smart devices can be deployed on roadsides and surveillance cameras to help track offenses or violations of traffic rules [4,5].
Moreover, these things can prove to be a significant source of information in the military environment due to the distinct operations, such as smart surveillance and monitoring activities. For instance, Dastjerdi and Buyya [6] describe reduces the lifetime of such devices. Improving the operational lifetime of IoT devices in the militarized environment is crucial due to energy constraints as they are expected to operate in unattended harsh environments. Therefore, new solutions are required to reduce the energy consumption of IoT devices within military zones. This paper aims to study the energy consumption of IoT devices and propose a solution to improve the energy efficiency of IoT deployed in fog configuration. The paper adopts two strategies from [13], namely the sequential and master-worker modules. The details of the two modules are discussed in Sect. 3.

Motivation and contribution
Intensified by the integration with the cloud, resource management in Fog computing is intricate because of the diversity and resource limitation of the nodes to respond to the computational request of IoT-enabled systems. Other factors that add more difficulties are the sensing capacity differences of the devices, distributed application structure, and their coordination. Developing efficient resource management in an IoT-based fog computing environment requires a comprehensive strategy.
The management component conceptualized in the architecture consists of Controller and Module Mapping objects that identify available resources and place them. This is enabled by iFogSim, which uses Sense-Process-Actuate and distributed dataflow model while simulating any application scenario in a Fog computing environment. Figure 2 show Military IoT's system architecture and interaction with the conceptual relation with the iFogSim components. The physical components consist of Fog devices, the lower layer devices directly connected with associated sensors and actuators that realize the Military IoT's data sensing and control implementation. The sensors generate tuples referred to as tasks. The logical components include the modules and the edges of the application. While the collection of inter-dependent modules facilitates distributed data flow, the edges define a dependency between modules. Two application models, the master-worker and the Sequential Unidirectional dataflow application model, are proposed. This paper investigates the pattern of energy consumption, network usage, execution time, and tuple latency that may arise when handling critical IoT devices in a sensitive militarized environment. Our work is focused on these two basic approaches in the context of application module strategy, the "sequential module" and "master-worker module" for handling data in IoT. The aim is to build a lower energy consumption scheme when an application is invoked to process the captured data acquired by IoT devices within the militarized zone.
Complementing the literature, the main contributions of this paper are: • It evaluates two application modules and analyzes their performance in terms of energy conservation under militarybased IoT-Fog architecture. • It provides an edge network solution from the logical components of the application and dynamic network consideration while dealing with trade-offs. • Assuming a physical topology configuration with experiments in a realistic edge and core cloud testbed, we develop further avenues to enable the design of resource management techniques to minimize the latency and maximize throughput. In the next part of this paper, Sect. 2, we analyze the related work. The system model and problem formulation are presented in Sect. 3 and 4, respectively. The proposed strategy is detailed in Sect. 5, and the experimental evaluation and simulation results are discussed in Sect. 6. Section 7 concludes the paper with directions for future work.

Related work
The IoT revolution is transforming the entire spectrum of computing-based services. A new wave of rapid infrastructure development is sweeping the globe, encompassing virtually everything digital, ranging from data centers, supercomputers, clusters, embedded systems, servers, and networks to power grids, sensors, appliances, and mobile devices instruments [14]. With a broad application in many fields, including healthcare, military surveillance, buildings, and transportation, the need for high bandwidth and processing capability and energy efficiency performing tasks is everpresent as the modern system is expected to utilize cutting-edge technologies like 6G, IoT, etc.
Hameed et al. [15] devised a cluster-enabled capacity-based load balancing approach, providing lower energy consumption, and improving the performance in vehicular fog distributed computing to process the IoT requests efficiently. They use a dynamic clustering approach that considers vehicles' position, speed, and direction. Furthermore, energy emissions have a critical impact on the environment. In [16], a strength Pareto evolutionary algorithm (SPEA-II)-based higher-level algorithm was proposed to augment power conservation. In this regard, machine temperature is used as a parameter for job placement.
The design of the data centers also has a critical impact on energy consumption, cost, and performance. These issues require a compact solution in terms of software and hardware. Khalid and Ahmad [17] developed an evolutionary algorithm based upon a higher-level heuristic designed to find Pareto optimal decisions for a cloud controller. The technique considers real-time electric price variations due to load and renewable power availability while assigning requests to data centers. Meanwhile, An energy-efficient approach called eLCRQ was proposed in [18]. They optimized the energy consumption of the CPU by exploiting the parallelism. Here and in many other example areas, energy efficiency is the goal that must be addressed.
Also, in live virtual reality (VR) streaming, the considerable bandwidth and the energy required to deliver live VR frames in the wireless video sensor network (WVSN) become bottlenecks, making it impossible for the application to be deployed more widely. To solve the bandwidth and energy challenges, Chen et al. [19] proposed a lightweight neural network-based viewport prediction method for live VR streaming in WVSN.
In more critical areas, the energy-aware application module of IoT from a military perspective is a topic that explores energy consumption at the things, edge, and data center levels. Although there is no related research work in the field under consideration, we present closely related works targeted toward energy conservation in IoT, including military gadgets IoTs.
In [20], the authors presented a technique that considers the physical components of the IoT systems, including sensors, standard networking, and other acquisition components, to bridge the gap between theoretical analysis and practical applicability. The authors apply various application parameters to the proposed scenario, i.e., prediction and experimental demonstration. The authors conclude that different application parameters have varying impacts on the power consumption of IoT.
Mebrek et al. [21] investigated the nature of energy consumption in the IoT-Fog-Cloud Environment by using an evolutionary algorithm approach. The scenario employed by the authors involves a data center at the top of the network with fog nodes at the edges that serve the IoT devices. This scenario was parameterized into three components or steps to derive a solution to minimize energy consumption. The simulation results show that a considerable amount of energy is reduced when the proposed fog computing architecture is adopted. Another work presented in [22] investigated various technologies, such as Zigbee or IEEE 802.15.4, low power WSN, ultra-low power Bluetooth low energy (BLE) wireless standards in a mesh topology, among other technologies. The authors conclude that using BLE reduces energy consumption significantly within IoT devices. This is because BLE can extend the sleep time of sensor nodes. The work in [23] focused on some domains, such as data centers that heavily rely on a continuous flow of energy to operate communications entities and devices. The energy sources were the primary concern in their discussion. Based on the observation made on each energy source identified, the authors concluded that a strategic mechanism needs to be put in place to balance IoT devices' resource requirements, human experience, and the cost that may be induced to the environment.
Assila et al. [24] proposed a scheme based on a matching game approach to achieve low-energy consumption in IoT devices and clouds through fog computing facilities by employing a caching technique. The authors use the Galer-Shaphey algorithm for matching IoT devices to a suitable fog environment. The simulation result shows a remarkable reduction in energy consumption. Table 1 further analyses additional closely related research work along with the environment-focused problem, approach, and the added advantage and the weaknesses of each work. Existing strategies mainly optimize the quality of service features separately in different application environments. Most of the studies aimed at optimizing energy consumption using various approaches, focusing on the IoT devices' physical components--they do not consider the logical components. Very few of these studies use the graph-based computation strategy, although an efficient tool to represent the association and connections between the devices is found in the network theory. The literature is augmented with the proposed technique aimed at the application module's logical components to optimize energy in military-based IoT devices further.

The system model
Military-enabled IoTs require the help of a middleware application that can collect and analyze raw data captured by IoT devices [7]. The application module contains the necessary instructions for executing the specific IoT application function. Generally, it includes functions that receive data, process received data, and perform analytical tasks on data to provide a real-time response to the concerned application [28]. According to [29], the application is modeled as a collection of modules composed of different data processing elements. Processing military IoT applications locally or within a nearby fog is very important for energy conservation, as computation distance is distributed rather than centralized to a distant server [30]. In this research, we present two application modules to find better (less) execution time and lower energy consumption while handling tasks at the things level. The application may consist of distributed fog processes [28]. These processes are mapped onto computing instances contained within the fog, cloud, and various edge devices. IoT applications are designed to execute over devices that have the required resources. These resources can be sensors, actuators, computing, and communication resources. The applications are built based on the distributed data flow (DDF) model, where different functions or modules can be deployed on multiple physical devices. This is because the output from one module is considered an input for another module [29,31].
Inspired by [32], we employ the idea of the directed acyclic graphs (DAGs) model for the proposed technique. The DAG models consist of vertices that contain four application modules and a sensor representing an IoT device. These sensors send tuples (the fundamental unit of communication among entities) to the application modules along the edges of the modules. Edges of the DAG show data dependency between modules. The actuator displays the output of the processed data generated by the IoT sensor.

The sequential module
The application module processes tasks in a unidirectional pattern in the sequential module. Each module has a specific job to carry out on the incoming data. It then forwards the output to the next module as an input for processing until it reaches the actuator as the final output. The process is illustrated in Fig. 2.
In the sample module depicted in Fig. 2, sensor emitted tasks are sent to module 1. Module 1 processes the tasks and produces an output "Result 1". The output (Result 1) is sent as an input to the next module (i.e., module 2), which processes it and produces an output "Result 2". Result 2 is sent to the next module as input. The process continues until the last module has the outcome which is sent back to the first module. The first module then sends the final output to the actuator.

The master-worker module
The master-worker module works by start sending tasks to a specific module (worker 1). Worker 1 processes the task and returns the resulting output to the master module. The received output is sent to the next module (worker 2). This process is illustrated in Fig. 3 and is repeated until all the required modules process data. Lastly, the master module is responsible for sending the processed data to the actuator.
The master module has control over the workers, and, as the name implies, workers only process the tasks sent by the master module and return the results. The master module then sends the task to the next worker module until the task is completely processed. The output is then sent to the actuator. As in the sequential application module, the first module is always responsible for sending the output to the actuator. A common feature between the two scenarios is the user interface module. The user interface is deployed to provide the output of the video stream fraction captured by the IoT devices within the area of interest. For the proposed scenario, we will consider the value for inter-module edges (i.e., tuple input and task) CPU capacity involved in each module, as shown in Table 2.

Problem formulation
Energy conservation is essential, especially in a militarized environment. According to [1], the US Department of Defense (DoD) is employing mechanisms to help in reducing the overall energy consumption of its facilities. These efforts are carried out to avoid potential energy constraints, which is a critical challenge in adopting IoTs within the military field. Suri et al. [34] state that commercial IoTs can easily be recharged from a stable energy source, whereas the case for military-based IoTs is different due to their unique challenges of reachability and accessibility. Therefore, energy conservation is considered a key challenge for the sustainable adoption of military-based IoTs. This work analyzes the energy consumption, network usage, and execution time of tasks for the two application scenarios being investigated in this article. The iFogSim simulator inherits the CloudSim simulator's energy model [35]. We applied the same model for energy calculation, formulated mathematically in Eq. 1.
where E is the energy consumed by the nodes during the simulation, E c is the current energy consumption, T c andT o are current time and the last utilization update time of the host, and P o is the last utilization by the host. Another critical parameter is the network usage which is given in Eq. 2 as used in [34]: where NU is the network usage, T d andT t are total delay or latency and total tuple size, respectively. Max st is the maximum simulation time.

Proposed strategy
The application module presented in this paper is based on logical components of iFogSim applications [29]. The application modules [13,29], being inter-dependent entities, promote the concept of distributed application with application edges representing dependency between modules as discussed in the proposed sequential application module and master-worker application module. The proposed modules are built upon the context of video surveillance object tracking military IoT application presented in [33]. The modules consist of distributed intelligent cameras that can perform specific functions, such as motion detection, object detection, and object tracking. Other functions include user interface and pan-tilt-zoom (PTZ) control. We demonstrate militarized IoT scenarios intending to get the model having minimal energy consumption in the particular deployment situation. The application model proposed in this paper allows IoT devices, for instance, surveillance cameras deployed in the militarized field, to perform a sensor-process-actuator relationship. The processing module processes raw data captured by the device in sequential or in a master-worker relationship. The application module consists of 3 processing modules and an interface to display the captured data for the two scenarios employed.
Based on the scenarios mentioned above, we have used the following two algorithms for the modules to enable the energy-aware placement in IoT Fog-Cloud paradigm. Algorithm 1 is the Master-Module mapping, which allows IoT-Fog placement. It returns the efficient mapping of modules of an application onto a network infrastructure. Take the tasks T sent to each worker that processes and sends back the output. It may first sort the tasks and modules according to their capacity and requirement. The Control Loop of the algorithm runs for all the application tasks that need to be processed. Algorithm 2 is the sequential application module, where sensors send a set of input tasks to the first modules, which compute and send the tasks to the immediate next module and the last module. The first module received the previous module's output and then sent it to the actuator.

3 6 Experiments and evaluation
Efficient utilization of the available resources in the presence of constraints makes energy management challenging to achieve. Therefore, evaluating the impact of applications and resource management policies on energy consumption is vital in critical sectors such as military environments. This enables performance optimization and operational adaptation of the systems.
Extensive simulations have been conducted to analyze the performance of proposed techniques. The simulations are performed in the iFogSim simulator using the iFogSim module termed "DCNS" [29]. The application modules of iFogSim are customized to accommodate the proposed scenarios. The number of investigated military IoT scenarios, termed 'areas' , varies from 2 to 12, and in each simulation scenario, we assume a physical topology configuration having 2, 4, 6, 8, 10, and 12 areas of interest. Simulation parameters are summarized in Table 2, which provides the maximum CPU requirements in millions of instructions (MIs) for each task.
Configuration parameters of nodes used in simulation experiments are summarized in Table 3.
Simulations are conducted in DCNS main class, which is meant for intelligent surveillance in the iFogSim simulator, where the surveillance area varies from 2 devices (i.e., an intelligent camera) to 12. Furthermore, we assume 4 smart nodes as monitoring entities for the deployed site in each surveillance area. These smart nodes are connected to a gateway through which the intelligent devices gain access to the edge and the centralized data center over the Internet, as shown in Fig. 4. The physical topology of the surveillance area is classified and carried out in different configurations in each simulation scenario, i.e., config 1 through config 6.

Energy consumption
This section analyzes the variation in energy consumption at the mobile, edge, and datacenter levels by the given application modules. Figure 5 shows the comparison of the energy consumed at the data center for sequential and masterworker modules. We make use of CPU capacity for each of the nodes in our employed modules as shown in Tables 2  and 3. Simulation results show a slight variation between the energy consumption of the two modules. The sequential module (SM) consumes more energy than the master-worker module (MWM). Figure 6 compares the result for energy consumption at the mobile level. Here, the master-worker module has lower energy consumption than the sequential module. This is because the level of communication of the master-worker module is less than the sequential module. Figure 7 shows energy consumption at the edge level. Based on the results observed, we can see that in some instances, the energy consumption at the sequential module is less than that of the master-worker module. However, the overall consumption of the two modules shows that the master-worker module achieves lower energy consumption than the sequential module. Figure 8 provides an overview of the average energy consumed by the sequential module and master-worker module in all three levels, i.e., the overall average energy consumption attained by the two scenarios in the entire system. The results clearly show that the master-worker module achieves significant savings in energy consumption. Experimental results prove that employing a master-worker application module is more effective in handling smart devices. This is because all the nodes in the sequential module are actively participating in the execution, unlike the master-worker module, which does not require the engagement of all nodes within the module. Figure 9 shows the network utilization in each of the evaluated scenarios-the network usage increases as the number of devices connected to the application increases. The results show that the master-worker module exhibits higher network utilization than the sequential module. In fact, in the master-worker module, the master node always receives the resulting input from each worker module. Alternatively, in the case of a sequential application module, each module forwards the resulting data to the next module. Module 1 and module 2, or worker 1 and worker 2 in the case of the Master-Worker module, are placed at the edge of the node. This allows for a significant decrease in how data is sent to the cloud data center. Figure 10 shows the tuple CPU execution delay for the Sequential application and master-worker application modules. Results reveal that the master-worker module has a lower delay in tuple execution while the sequential module is relatively higher. Such behavior is that the sequential application module consumes more CPU time than the master-worker application module. The reason for higher CPU time is that all nodes actively participate in the execution process in the  Energy (Mega Joules)

Comparison of Energy ConsumpƟon at Mobile Level
Mobile Energy SM Mobile Energy MWM sequential module, unlike in the master-worker module, which involves only the concerned node at a time. Based on our findings, we can conclude that the master-worker module can handle tuple execution faster than the sequential module. Figure 11 shows the comparison of simulation time for the sequential module and master-worker module. The execution time of each scenario increases linearly as the number of devices and transmission rate increases. We also observed that the simulation time of the master-worker module is comparatively lower than the sequential module because the number of activities carried out by the sequential model is higher than the master-worker module.

Performance comparison
The performance of the proposed approaches in the two modules is evaluated, and the energy consumption is compared with the techniques mentioned in [21][22][23][24]. In [21], a method was introduced to reduce the energy consumption and the quality of service (QoS), whereas in [22], optimize battery usage and power consumption. Lutui et al. [23] presented strategy for optimizing energy requirements in a smart house through device efficiency. While their work considers the physical components of the IoT, we augment the techniques by focusing on the logical components of the application module to optimize further the energy consumed by the military-based IoT devices. The environments are different, but it was shown that proper deployment of modules, significant savings in energy consumption, about three times for the edge devices making it more effective in handling smart devices. IoT and related wireless network technologies find their way into military fields and are critical for monitoring and tracking. However, these technologies have drawbacks, including energy consumption, latency, complex infrastructure,   etc. The sensor cloud-based model for critical sectors constitutes applications characterized by a need for adapting to variable and unpredictable operating environments. While our motivation is to study the approaches that will offer energy-efficient processing of the request and data, the paper focused on the logical components of the application modules. However, considering the physical and logical components of the IoT systems may provide further energy management on these constrained devices with limited power sources while providing better latency. This should be further research to bridge the gap between theoretical analysis and practical applicability. In addition, the proposed work applies to fewer sensing devices, such as cameras, it could be extended to other smart sensing devices as energy conservation is a key goal of all the devices deployed in a militarized field.
Built based on the DDF model, complete characteristics of the application DAG have not been investigated, only the energy of the data processing procedure presented. In future work, however, the other dynamic characteristics, energy of the data transmission procedure, are aimed to be addressed while integrating network connectivity, failure of nodes, etc., further dynamic characteristic of Fog and Cloud components. The future scope would also look into multiple task processors' transmission power allocation of an edge computing system with multiple independent tasks.

Conclusions
The emergence of the IoT allows sensors and devices to observe the surrounding environment and make decisions autonomously. Innovative surveillance technologies have paved the way for the emergence of the military-based IoT. However, these high-security environments are harsh and unpredictable, and the devices deployed in such environments operate continuously for a long. The New IoT-Fog architecture paradigms that include critical sectors are becoming feasible for real-time decision making, and finding efficient energy conservation in the IoT-based application data processing is vital. Hence, it is essential to choose an appropriate application design for operating that can conserve energy throughout the lifetime of applications.
Towards these aims, two application modules were presented, and their performance was analyzed: the sequential application module and the master-worker application module. It was found that the master-worker module has lower energy consumption and communication overhead compared to the sequential application module. This enables the creation of an energy-aware environment for the growing smart military devices by lowering the energy consumption and extending the operation lifespan of the devices deployed within such a hostile military environment. The experimental results show that energy consumption within the military-based IoT can be reduced when an appropriate application scenario is implemented.