Distributed Intelligence at the Edge on IoT Networks

: The Internet of Things (IoT) has revolutionized innovation to collect and store the information received from physical objects or sensors. The smart devices are linked to a repository that stores intelligent information executed by sensors on IoT-based smart objects. Now, the IoT is shifted from knowledge-based technologies to operational-based technologies. The IoT integrates sensors, smart devices, and a smart grid of implementations to deliver smart strategies. Nowadays, the IoT has been pondered to be an essential technology. The transmission of information to or from the cloud has recently been found to cause many network problems to include latency, power usage, security, privacy, etc. The distributed intelligence enables IoT to help the correct communication available at the correct time and correct place. Distributed Intelligence could strengthen the IoT in a variety of ways, including evaluating the integration of different big data or enhancing efficiency and distribution in huge IoT operations. While evaluating distributed intelligence in the IoT paradigm, the implementation of distributed intelligence services should take into consideration the transmission delay and bandwidth requirements of the network. In this article, the distributed intelligence at the Edge on IoT Networks, applications, opportunities, challenges and future scopes have been presented.


Introduction
IoT keeps growing through technological inventions including solutions, embedded software, network virtualization, distributed systems and intelligence. The exponential increase in the rate of information collected through IoT sensor devices have contributed to the emergence of edge computing in which information is recorded at or close to the sources. The futuristic Internet is supposed to be powered by the proliferation of the IoT where everything could be linked. The revolutionary change towards distributed cloud storage to edge computation has grown rapidly in the IoT. Advances in Information technology have led to a considerable improvement in the ability of portable systems for data storage and processing, but that will proceed to grow at a rapid pace. Current concepts even so would not use low-level gadgets for any decision-maker. Throughout essence, smart gadgets are also used mostly for compatibility in connectivity and some storage at a minimal level. It is expected that 50 billion smart devices will be associated with the internet and the data created will be around 500 zettabytes by 2020 [1]. Wireless networking is bringing turned progressively prominent in computer organizations over the last 50 years [2]. The smart devices are increasing rapidly nowadays [3]. The smart device to smart device communication on the IoT environment can be a very useful approach to enhance the capabilities of smart devices [4].

Related Works
In 2000, M. Bonifacio published an article on the distributed intelligence [11], In this article, he discussed the distributed intelligence (DI) paradigm and he proposed a framework of multi-context systems like the specification language for distributed intelligence.
In 2004, Cecilio Angulo and Ricardo Tellez published an article on DI for smart homes [12]. In this article, they focused on the development of a framework for smart home that allows the integration of information from many sensors and actuators.
In 2007, Lynne E. Parker et.al. published an article on DI in Multi Roboting framework [13]. In this article, they were focused on three main paradigms for distributed intelligence and applied these paradigms in the multi-robot system.
In the year 2013, Gubbi, Jayavardhana, et al. published an article on IoT [14]. In this article, they present the private and public cloud interaction architecture for the IoT. They also discussed the convergence of wireless sensor networks, the Internet, and distributed computation.
In 2016, Rashid Mijumbi, et.al, published an article on Network Function Virtualization [15]. In this article, they illustrate that there is a big challenge in the management of large amounts of information exchange among IoT devices. It is therefore critical to try to find efficient methods to transfer big data over such networks. They also recommended investigating whether the existing cloud data management applications like Hadoop and Cassandra can support real-time data.
In 2017, Yuvraj Sahni, et.al, published an article on Edge Mesh. In this article, they proposed a novel approach called edge mesh that distributes the decision-making processes between edge devices to send the information to each other [6].
In 2020, Baha Rababah, et.al. published an article on distributed intelligence in IoT. In this paper, they were explained most of the concepts related to the distributed intelligence in IoT [38].
The recent innovative developments of information and communication technologies related to ubiquitous communication, pervasive computing, and ambient intelligence play an essential role in IoT birth [16]. Ubiquitous Communication a concept in communication and computer networks where interconnection can be made anywhere and anytime. Pervasive computing is the improvement in smart devices including the computational feature process. Ambient Intelligence is the ability of objects to sense and respond to the physical environment. Recently, researchers have shown an increased interest in IoT. The IoT is a paradigm to connect an unlimited smart device with their unique identifications anytime and anyplace using the IoT communications protocols [17] [18] [19] [20]. The IoT objects might be mobile phones, food, clothing, machines, tables, sofas, doors, etc. [21]. The IoT impacts everyday life such as home, work, health, transportation, etc. It has many related aspects. Below, key aspects of IoT are discussed.

Radio-frequency Identification (RFID)
The RFID technology is used in IoT to identify or track the smart object electronically. It uses power from nearby RFID. It can store and/or retrieve information using electromagnetic transmission and a radio frequency (RF) compatible integrated circuit [22]. A simple RFID system consists of RFID readers and RFID tags [23] [24] [25]. To date, RFID systems have been utilized by many departments in a successful industry [26]. RFID system benefits are providing accurate, real-time information about the equipment, reducing labor costs, streamlining business processes, improving overall business efficiency. The RFID technology is widely using in organizations like strategic, production network administration, and health services checking [27], as it can be used for identification and tracking smart objects [28]. The RFID currently depends on the following two main points. a) RFID Active systems with transmission b) Application management techniques [29]. There are many technologies available to develop RFID-based applications [30]. In the future, researchers can develop an integrated platform with WSN and RFID together for scanning the smart objects in the real-time system. Specifically, sensor innovations are rising day by day, for example, electromagnetic sensors, biosensors, off-board sensors, and sensor gadgets, etc. These smart sensors can collect the RFID data so that researchers can develop strong IoT apps for smart organizations.
www.aetic.theiaer.org They work together with RFID systems to get the right data of their locations, movements, temperature, pressure, light, etc. It can consist of sensing objects that communicate wirelessly and hop-by-hop to gather information and detect a certain event in the physical environment [31] [32]. The WSN provides a variety of right information that is related to health informatics [33], military applications [34], farming [35], industry [36], etc. These sensors work with each other to provide different beneficial data that might be used in certain applications and services. However, sensor networks face many problems in terms of communication and resource constraints [37]. For communications, there are many issues such as short communication range, mobility, reliability, security, etc. [38].
The development of the Internet has led to interconnect objects and an intelligent environment. In this case, identifying and managing objects is very important for IoT to succeed, as it consists of a large number of objects. Addressing adds more features to IoT which are uniqueness, reliability, persistence, and scalability [39] [40] [41]. The current IPV4 is only able to identify a group of sensors based on their geographical location. But, the current requirements for IoT is to identify every sensor individually based on its identification, location, or/and functions. IPv6 able to achieve those requirements, as it has a larger address size [42] to address and manage IoT objects efficiently, the IETF standardized adaption protocol for IPv6 which is called 6LoWPAN. It represents by both RFCs 4944 [43] and 6282 [44]. It allows compression techniques to compress the IPv6 and UDP packets after deleting the excessive data from the header part.
Due to the object heterogeneity, limited storage, and processing capabilities, the middleware and application layer plays a key role, with the main objectives of functional abstraction and device communication. The Middleware is categorized in the layers such as object abstraction, service management, service composition, and application [45]. In a generic IoT system, the end devices (sensors, smart devices, etc.) usually collect specific information such as temperature, light, pressure. Etc. This information passes through limited processing locally. Then it is sent to the external gadget for computations. After that, it can transmit to the local area network until it reaches to the internet then the cloud-based services. The cloud-based service will convert received information into knowledge after some processing operations. This knowledge might need to be stored or action needs to be performed. To support IoT, middleware should handle the following challenges: interoperability between heterogeneous devices [46] [47], context awareness [48], managing data [49], privacy and security [50], and device discovery [51]. The current proposed IoT system has many challenges. We have summarised the challenges that might be handled by enabling Distributed Intelligence as follow:

Latency
In many IoT applications, sensors sense data then send it to the cloud to be processed. All intelligence and actions are centralized in the cloud. However, the cycle of sensing and actuating might take a specific interval of time which causes high latency. For example, self-driving car's sensors generate around one gigabyte every second [52]. Sending this amount of data to the cloud and waiting for action takes time, it might cause a crash. Most IoT applications are real-time which need to take action in an instant. Furthermore, Due to the limited Internet bandwidth and internet delay, cloud servers are unable to process coming data and take actions instantly.

Offline processing
In general, IoT cloud-based applications will completely be offline during an internet disconnection. For example, a self-driving car that is fully controlled by the cloud will not be able to take any decision or action, if the cloud service is unavailable.

Bandwidth
There is no doubt that a cloud is an efficient place for data processing as it has more powerful computing capabilities than the devices at the edge. However, network bandwidth is not currently enough to send a large quantity of data efficiently. For example, Boeing 787 generates 5-gigabyte data every second [53]. However, bandwidth between it and satellites or the base stations are not able to transmit this big amount of data. www.aetic.theiaer.org

Cloud Computing
Cloud Computing allows the users to process, access, and storage data remotely over the internet [54]. It allows sharing the resources, software, services with less effort over the networked computers that use the internet [55]. In the realism of the internet, security has been perceived as a prominent inhibitor of embracing the cloud paradigm. Since the cloud environment is a distributed architecture, which it's resource storage and management may lay in any place in the world, many concerns have been raised over its vulnerabilities, security threats, and challenges. The involvement of various parties has widened these concerns based on each party's perspective and objective. It has been determined that three dominant parties participate in the cloud environment.
i. Service providers: Service providers provide services to the consumers intensified over public and hybrid cloud [56] where issues related to unauthorized access and cyber-attacks may jeopardize the service availability. ii. Service consumers: Their concerns may focus on issues related to data privacy and quality of service. Besides, their concerns regard service availability and interoperability. iii. Service regulators: Their concerns may focus on issues related to service standard violations.
Thus, issues related to interoperability would affect them greatly. It is fair to say that all previously mentioned party concerns might be correlated and associated with other parties.

Public cloud
All services have been provided in a public environment where consumers can access a pool of resources that is managed by a hosted organization. Due to its nature, this type of environment may raise critical concerns over security problems [57].

Private cloud
Services have been provided by a third-party vendor which separates it from public access. Consequently, it is safer than the previous development model because it prevents unauthorized access [58].

Community cloud
Services have been provided to a specified community where all members have an equal right of accessing the shared resources [59].

Hybrid cloud
Services are provided as combustion of more than one cloud (public cloud, private cloud, and community cloud). It could inherit any type of vulnerability or risk that resides within the previously mentioned parties [60]. Figure 2 represents the cloud services and deployment model.

Edge Computing
Edge computing methodology is used to process data on the edge of networking to optimize cloud computing [61]. The performance evaluation of edge computing for data processing is better AETiC 2020, Vol. 4, No. 5 6 www.aetic.theiaer.org than cloud computing (see figure 3). The previous techniques such as cloudlets [62], fog computing [63], and data center are also developed because cloud computing doesn't perform better for the process of the data on the edge of networking [64]. Edge computing becomes the shared technological development framework wherein device information is collected however closely to the origins as appropriate on the boundaries of the service provider. Information is the lifeline of successful corporation, offering useful financial information or encouraging actual monitoring of commercial enterprise planning and execution. Organisations are overflowing in the massive amount of data, and large quantities of data could be regularly obtained from sensors and IoT devices running in multiple locations from distant places and unfriendly situations from anywhere in the globe.

Distributed Intelligence
Distributed intelligence means that a group of related entities work logically together planning, solving problems, abstract thinking, understanding ideas and language, learning, and making a decision. The entity can be agents, humans, network devices, robots, sensors, and so forth where each one responsible for a specific objective. After processing the raw data will change into smart data the distributed intelligence (see figure 4). The peoples are knowing about distributed intelligence in the form of teams such as the research team consists of co-investigators, fractional staff, technical staff, and postgraduate research students. The objectives of distributed intelligence in the area of communication systems are to work together as proficiency as human teams to achieve specific many purposed tasks.  [65] In general, enabling distributed intelligence solutions to help to solve certain problems that are related to time or function as enables decreasing the task completion time and decreases the www.aetic.theiaer.org complexity for each entity. Creating a group of entities for the system enhance the robustness and reliability. Enabling distributed intelligence in computer and communication systems help to handle parallel computations, distributed systems, and multi-agent systems. There are many possible paradigms to enable distributed intelligence in the systems. Understanding the types of distributed intelligence is essential to be able to specify the appropriate paradigm for a specific type of distributed intelligence. One of the most popular ways is to understand the type of interactions between the entities in the system. The interactions between the entities can be divided into four categories: Collective, Cooperative, Collaborative, and Coordinative. Table 1 describes those categories. The Smart devices are wellinformed of another smart device.
The Smart devices are wellinformed of another smart device under a network.
The Smart devices are well-informed of another smart device.
The smart devices can share their actions and objective with neighborhood devices.
The smart devices can share their actions and objective with neighborhood devices.
The smart devices have individual objectives however they help each other to accomplish their objectives.
The smart devices don't share a common objective, and their actions are not helpful to neighborhood devices. Ex. Swarm robot framework. Ex. In the Multi-robotics system, many robots work together to accomplish a common objective.
Ex. In the multi-robot system, multiple robots depend on each other to achieve a common objective without the help of other robots.
Ex. Traffic Controlling System.
Distributed intelligence has different paradigms. Using a paradigm based on the problem's space situation allows the system designer to determine the right solution. Commonly, those paradigms are inspired by insects, animals, or human society. In general, there are three common paradigms to enable distributed intelligence in the systems:

Swarms intelligence paradigm
Bonabeau [66] defined Swarms intelligence as "any attempt to design algorithms or distributed problem-solving devices inspired by the collective behavior of social insect colonies and other animal societies". Examples in natural systems of Swarm intelligence are bee-inspired, ant colonies, fish schooling, and others [67]. In swarm intelligence, the demand for entities in the communications can be reduced. The entity can sense the right data on the local network. It is a strong approach to the application that needs the same task to be accomplished through decentralized control. Swarm intelligence paradigm can be used in the different field of computer and communications systems [68] such as Swarm Intelligence Routing [69], Swarm robotics [70], Crowd control [71], Software testing [72], Image segmentation [73], Data mining [74].

Organizational and Social paradigms
These models are used for modeling human organizational intelligence in computer and communication systems [75]. Sociology, economics, and psychology, etc. had proved to understand that the products have the capabilities of intelligent systems to work in a team to solve the complex problems.

Knowledge-based, ontological, and semantic paradigms
It is depending on share the knowledge among different entities. The purpose is to allow different entities to easily share and understand knowledge from different sources. These methods require language to represent knowledge. Knowledge systems are part of knowledge management technologies to represent knowledge application processes [76]. It is commonly used to deal with uncertain problems. This approach is using in a huge range of applications like decision support systems [77] [78]. The applications concern reusing the knowledge in more easy, effective, and www.aetic.theiaer.org efficient. This model reduces communication by using common assumptions about vocabulary and semantics.
Currently, it is noticed that many researchers are interested in studying distributed intelligence. According to a Google Scholar search, Figure 5 represents the google trends that contain the exact phrase "distributed intelligence", IoT network, and Edge computing for the last five years. The data explicitly illustrate an increasing interest in this field, as it plays an essential role in developing computer and communication systems [79].

Distributed Intelligence in IoT
Most IoT data is generated close to the edge of the network where the things are. Usually, IoT data processing is performed close to the source. Therefore, the intelligence is distributed within IoT architecture layers. Real-time IoT data produced by a wide range of end devices such as sensors, locating, and identification devices. Those devices send data thousands of times per second. The lifecycle of produced data goes through different stages of filtering, summarizing, pattern, detection, interpreting, and processing. Understanding and processing the data locally is usually better than send them away for processing. The intelligence not only on the top layers of IoT but also there is local in the end and edge devices.
Sensor data can be read by the local processor for tens or hundreds of times per second. The local processor may, in turn, send repeated data about important status changes or events to the gateway. This may be connected to a LAN with a server at the factory level and ultimately linked to the enterprise system. The actual connection to the Internet may be away from peripheral sensors and processors. Additionally, Internet devices may be things that are intermittently connected to the network only. End devices might not be able to connect to the network all the time. The current IoT model has many limitations to support real-time applications as it was mentioned in section 3.1. The intelligence should be everywhere from the end layer to the top of IoT depending on the case as shown in Figure 6. In many states, intelligence should be spread over several layers to achieve the right functionality and performance. The previously mentioned challenges let researchers think about the distribution of intelligence over IoT components. In general, Distributed Intelligence in IoT can be defined as a model, technique, and algorithms for collaboration between all IoT components from sensors to cloud to accomplish the desirable support of communication and application in a large scale network. It enables the communication and processing tasks to existing at the right place and time. Recently, the researchers highlight the importance of enabling Distributed Intelligence in IoT so there has been an increasing interest to support distributed intelligence in IoT.
There are a limited number of proposals for the distributed intelligence paradigm in IoT. In [80] published a white paper on distributed intelligence architecture in a wireless network. In a traditional hub and spoke architecture, access points send all traffic to the controller that manages all network policies. This will not work well with an enormous amount of real-time data to be transmitted because it needs high bandwidth. Increased bandwidth highlights the need for a new architecture that able to increase the power of controller processing to avoid the negative impacts on real-time data. Furthermore, this architecture does not work well with the current and future 802.11 technologies. Another drawback of the traditional architecture is the failure of the controller leads the network to go down. The previously mentioned challenges force many organizations to think of a solution that supports intelligence at the edge of the network to enhance traffic flow without any negative impact on security and QoS. The proposed paradigm as shown in Figure 7 for distributed intelligence from Motorola permits optimized routing data locally or to the internet without sending traffic to the controller. Moving the intelligence and making a decision down helps the network to be dynamic, responsive, and avoid bottlenecks. This architecture improves Scalability, Reliability, Survivability; IT budgets go farther, Security, and Power consumption.
Furthermore, some researchers suggested useful methodologies to activate distributed intelligence in IoT. In [81] an architecture named sensor function virtualization to enable distributed processing is proposed as shown in. This approach offloads a specific task from limited capability nodes to unlimited capability infrastructure like a cloud, virtual gateway, etc. This approach decomposes the chosen function into smaller modules. The modules are sorted according to their functionality. For example, the module responsible for implementing 6LoWPAN compression will categorize in the network category. Once network traffic reaches a machine that runs virtualization of sensor function, the packets move up over a group of modules and move down over to an outgoing network interface. After that, all of the modules that are running on a set of machines are combined. The main feature of the approach is elasticity because some functions can be running in the cloud and it also can handle the increased load by allocating more resources to the cloud. Furthermore, the www.aetic.theiaer.org approach does not rely on cloud infrastructure because it takes in its consideration the internet is unavailable and high latency. In [6] proposed an approach called Edge Mesh that uses edge devices for data processing as one computing paradigm. The data and reckoning tasks can be divided between edge devices.

Smart Home
In the past, home automation was a science fiction idea. For example, Ray Bradbury imagined homes were interactive and ran themselves. It was terrifying until the actual benefits of home automation were considered by humans, and then the idea started to be more comfortable [83] In the 19 th century, many hardware and software invention occurred that leading up to smart home automation. Besides, the X10 standard was industrialized to allow sending and receiving broadcast messages via radiofrequency. Currently, the invention of raspberry pi helps researchers to find and develop the smart home system [84]. The Raspberry Pi is a cheap, small-sized computer that plugs into an LCD, keyboard, and mouse. It has different types of communication ports such as Ethernet, USB ports, HDMI ports. It can perform all the functions of a desktop computer like word processing, internet browsing, playing the game, etc. it is currently used in a wide range of projects because of its ability to interact with the outside world [85], [86]. With raspberry pi, home automation becomes interesting. Many researchers proposed a smart home system using a raspberry pi as an edge device [87]. Home automation includes all that building automation provides door and window controls, air condition controls, multimedia controls, lights controls, cooker controls, etc. Smart home means to control home with the help of various technologies like GSM, Wi-Fi, Bluetooth, Zig bee and so on to be able to manage home remotely [88], [89], [90].
Nowadays, all the suggested proposals of smart home aim to build comfort, secure, accessible, safe system inside the home with consideration of minimizing operating energy and cost. Sensors are attached to all targeted home appliances to be considered smart objects. They can sense, process data, and communicate. These devices from time to time carry out sensing and perform basic data processing before sending the data to the hub, gateway or directly to the cloud [91]. There are many challenges with regard to smart home system design, but this paper concern of distributed intelligence only. In the traditional proposed smart home system, all data need to be transferred to the cloud where the decision is made. This strategy takes longer time and threatens security because data is shared with outside network. By applying distributed intelligence, the required data only will be transferred to the cloud. The intelligence will be distributed through several layers in order to provide the required functionality and performance so the decision will be made by cloud, edge, or any device between them depending on the situation [92]. Moreover, when internet service is not available, it is difficult to communicate with the cloud to take the decision. Enabling distributed intelligence will allow different devices within the system to share the data and decision even without the cloud. The system will be able to work offline and provide the essential coordination between the edge and end devices. In addition, real-time data is very important in an emergency.

Internet of Vehicles
According to the Victoria Transport Policy Institute's Urban Mobility Report (UMR), the congestion cost will reach $199 billion by 2020 due to the increasing number of vehicles [83]. Internet of Vehicles (IoV) or sometimes called Intelligence Transportation System is an IoT application domain for sensing, analysis, control and communications technologies to vehicle transportation to enhance safety, flexibility, privacy, security, latency and reduce the cost [84]. IoV is a group of applications for Information processing and sharing to ease overcrowding, enhance traffic management, reduce environmental influence, and increase revenue for transport to business users and the public [85]. It is an advanced technology with the integration of sensors, internet, wireless communication, protocols for exchanging information among fast speed vehicles.
IoV should be able to process real-time data efficiently. But, the traditional system with central data processing and communication experience many significant challenges such as Connectivity www.aetic.theiaer.org and coverage, Communication and energy cost, Congestion, Coordination and implementation, and Traffic incident notification. It cannot efficiently deal with real-time data, as each vehicle will transfer a big size of generated data to the cloud through the internet. A large number of vehicles will impact the network as it will cause a bottleneck. Furthermore, the traditional system may cause privacy problems because the current location of vehicles is shared. They also share the beginnings and journey's end of tours with the cloud server. In fact, enabling distributed intelligence in IoV will reduce the delay and enhance safety. Most of the IoV applications will benefit from distributed intelligence. For example, rerouting vehicles in the traffic management system for congestion avoidance needs the information to be shared between vehicles from different road areas. This shared information is used to re-route the vehicles. Sharing information between vehicles will prevent shifting the congestion from one route to another.

An Autonomous Agriculture Intelligent Machinery
Given the state of precision agricultural technology, this technology can allow accurate cultivation of agricultural machinery, strict application of fertilizers and pesticides, robotic welding, precision parallel grain's harvesting, and yield control (see figure 8). Precision farming equipment usually uses GPS with an accuracy of a few centimeters for automatic machine steering and when and where to apply specific amounts of seeds, fertilizers, and pesticides [96].
The data from GPS, GIS, and On-board sensors are combined with each other to enable the machine making real-time decisions and tunings. The onboard sensors measure plant biomass, chlorophyll content, soil nitrogen content, etc. For example, when using pesticides, the system may use sensor data and GIS data to adjust the height of the boom, the flow of the nozzle, and the size of the droplet. Farming, fertilizing or harvesting machines download GIS data to guide the course and limits of their activities. GIS data may also specify areas of skipping or areas that should receive different types or levels of treatment. The incoming data from the sensor is used to direct the device in real time, but a brief copy of the data is also recorded and returned to the central farm register. External information and data, such as weather forecasts and crop prices, can also be provided to help the system improve profitability. Therefore, we can see a number of two-way communication layers for intelligent IoT in a modern farm environment.

Smart Mine
One of the fast-growing areas in IoT is the heavy equipment used in construction, mining, agriculture, and logging. Mining equipment provides some possible examples of IoT. Working with those enormous and powerful machines is dangerous. If a worker does not be careful, the result might be fatal. So, the essential role of IoT in this environment is enhancing safety through warning technology like location sensors, cameras, and RF locating devices. Autonomous Operation reduces www.aetic.theiaer.org the chances that a worker is hurt as no need to be in a dangerous environment. There are autonomous continuous mining machines such as Joy Global's Longwall System. It has 7,000 sensors, actuators and controllers to direct its shearer with its armored face conveyor, belt conveyor, powered roof support system, and pump stations. The system can extract 2,200 tons per hour. The system constantly transfers data to other parts of the systems and systems under the surface, this includes communication with underground transport vehicles, as well as automatic mining trucks and automatic trains on the ground, all connected to control centers hundreds of miles away. Joy turns data generated by the sensor into actions to make real-time decisions on the system. For example, decreasing the idle time of huge wall systems for one hour can reduce the operation costs of mine operators. Again, you can combine complex multi-level machines into a cohesive and coordinated environment for several interconnected systems [97].

Heterogeneity
IoT is a heterogeneous system as it has different hardware, architecture, infrastructure, and technologies [98]. IoT devices would be able to understand the incoming data to accomplish reliable communication. IoT devices support communications protocols with the low data rate, packet losses, and stochastic channel variations [99]. Enabling distributed intelligence means some tasks should be performed on edge nodes. But edge and end nodes are most heterogeneous. In this case, it will be difficult to deploy the tasks between those nodes.

Security and privacy
IoT brought many challenges related to security and privacy such as identification, authentication, access control, etc. [100]. Possible attacks should be expected during tasks distributions and data communication. Heterogeneous Devices are distributed to interact with each other which make it complicated to apply protection mechanisms [101].

Resource and Tasks management
The huge numbers of IoT devices, network, and traffic complexity, and the capability of constrained devices increase resource and task's management difficulty. The tasks are typically divided between edge devices. However, as the cloud has the capability to process a large amount of data, it should take part in big data analysis and management [102]. Thus, the tasks should be distributed between a group of devices based on application requirement and resources availability. The main challenge with this issue is to distribute the tasks between edge devices as it needs computation and communication joint optimization. Edge devices should manage access control, resource, Quality of Service, privacy and security, and data. Using Edge devices to manage all tasks at the same time is not an easy task because these devices are heterogeneous, resource constrained and distributed. In addition, as the IoT devices are heterogeneous, they might not be able to support the same type of tasks. The device might not be able to support some tasks because it has not enough resources.

Distributed computing Algorithms
In fact, distributing tasks between IoT devices is also a big challenge [103]. The traditional distributed computing algorithms cannot be directly applied for distributed intelligence in IoT as communications and computations tasks should be taken into consideration together. The decision should not also totally central based. Distributed intelligence requires implementation of advanced algorithms that can enable local processing and decision when it is needed. On the other words, the algorithm should enable the components to communicate and negotiate without central influence [104]. www.aetic.theiaer.org

Standardization and interoperability
Another critical challenge with distributed intelligence and task assignment is changing the current code for various devices and application. Lack of standardization also prevents devices to communicate and work with each other to share data and tasks. Standardization is the key to the success of IoT especially with enabling distributed intelligence. Standardized guidelines include data acquisition protocols, data communications, task allocation and others [105].

Scalability and automation
The scalability is a major challenge associated with IoT. In order to get all the benefits of Distributed Intelligence in IoT, it should be able to manage millions of IoT devices. It is challenging to control, configure, and monitor millions of devices [106]. In addition, IoT with distributed intelligence will only be scaled, if all the functions can be automated. Thus, enabling of distributed intelligence based on the automation of processes.

Discussion
The secret to the growth of the IoT and the capacity to identify, evaluate providing huge information in the cloud is edge computing, the new scientific model wherein information is recorded from edges of the network. Edge Computing is attracted prominence as being one of the top competitive technological advancements in the last two years and it has a creative possibilities. This offers reduced waiting time periods, low latency rates, and much more reliable information security than cloud services. Technological advances, in general, are increasingly integrating edge computing. Throughout this paper we have presented the terms, contexts, and benefits and drawbacks of distributed intelligence, explain how it works and organize it structurally with distributed intelligence techniques, provide details of its applications in various areas, and finally propose several changes and address the key challenges of its implementation.
Edge computing is a modern innovation which has already recently gained interest, and there is space for development to promote effective distributed intelligence computation. Through analyzing information from edge, decreasing reply time and enhancing performance, a larger amount of users can shift from the clouds to the edges computing. There are three issues with cloud, they are delivery delays, high computation loads and infringements of data; cutting-edge communication technologies could be used to address this challenge. Edge computing is a smart move for true controlled activities with complex field features and is independent from the data center. These are considered to be a significant key element on the business when we use different technologies like artificial Intelligence and Data Analytics and IoT in a structured way to achieve the performance goals.
Cloud is also an essential part of this approach where it is linked to ending nodes through edge nodes. This architecture enables distributed intelligence because all computation tasks are shared between edge devices. All those devices are connected through routers. Edge devices belong to the edge mesh network perform data processing and computation tasks. They share data through the virtual mesh network. They also proposed a task management framework to manage and distribute tasks among edge devices. The paradigm is split into three layers equivalent to end devices, edge mesh, and cloud. This paradigm enables edge devices to perform computation locally rather than transfer data to a cloud server outside the local network to perform the computation. In other words, this approach enables local data processing and distributed intelligence which enhances latency, security, reliability, scalability, fault tolerance, services, and privacy. In [82] proposed an approach for enabling distributed intelligence in IoT controller that depends on the intelligence of edge and cloud. They use an edge controller to provide intelligence close to things. They also use a cloud controller to provide a high level of intelligence. This approach includes the belief network technique for making a decision based on prior and new beliefs. Learning a new belief based on probability. It also employs reinforcement learning to learn experiences for learning and prediction. They proved that using a belief network that depends on knowledge-based management reduces the prerequisite of instructions and it also enhances processing time for the gateway (edge controller). www.aetic.theiaer.org

Conclusion and Future Work
This paper has presented the role of distributed intelligence at the Edge on IoT architecture, with an emphasis on its importance, latest proposed paradigms, and applications that requires it. This article alos pointed out the main challenges for enabling and develop distributed intelligence at the Edge in IoT. Distributed Intelligence in IoT plays an important role to support the exact communication and processing functions to be offered at the exact place at a certain time. The distributed intelligence combines the models, techniques, and algorithms to support decision making in a distributed environment of the IoT. Distributed Intelligence is basically related to Artificial intelligence, and there are many types of research about enabling it under artificial intelligence. Therefore, in the future, the researchers of artificial intelligence and communication networks could work together on the popular applications such as smart home, intelligence of vehicles, intelligence watering system, and so on.