**5. Open challenges of IoT-Fog integration in the IF context**

### **5.1 Real-time processing**

Fog computing provides required resources at the edge of the network to deliver realtime services for demanding applications (e.g, video streaming, gaming, video analytics, and robot-fog interactions [63]). When it comes to IoT data processing on a large scale, we can distinguish between three processing concepts [64], as illustrated in **Figure 3**.

#### **Figure 3.**

The serverless function also called Function as a service (FaaS), refers to the simplest processing model where data are present in the input of a black box, the results of processing are then gathered in the output without any session stat. The second processing concept is called batch processing, here, data are processed in small parts and often simultaneously, this type of processing is considered in situations when a large amount of data need to be processed, input data are accessed in batches form, or data need complex processing. The last processing mode is called stream processing, it refers to on-the-fly processing where data are processed online and the results are delivered instantly, this mode of processing is appropriate in case of real-time results are needed. Since IoT applications are diversified and data are generated and sent continuously to fog computing nodes, each processing mode can be adopted for a specific scenario.

#### **5.2 Resource scheduling and management**

It was expected that a huge number of IoT devices will be online shortly, meaning that the amount of generated data will be also colossal. Resource management policy is a determining factor in evaluating the quality of service delivered to IoT devices

and applications. This policy depends on many factors such as the nature of the application requiring the resource. If the application allows delay of processing, all its requests are forwarded to the cloud resources to be executed there. But if the application is time-sensitive, all its requests are served by fog computing nodes.
