# A Lightweight Perceptron-Based Intrusion Detection System for Fog Computing
### Fog Computing and IoT  
Currently, Cloud computing models are playing an important role in companies and startups since it provides an efficient alternative to owning and managing private computing resources. The emergence of Internet of Things (IoT) as a new technology increases the need for Cloud computing services and enhances the role of Cloud computing in business and technology. IoT devices such as sensors and actuators are becoming more ubiquitous, which brings a number of challenges in terms of performance, scalability, and reliability. Fog computing was introduced as a new computing paradigm to meet the low-latency and geographical distribution requirements of IoT applications [1].  
Figure 1 shows how fog computing extends the cloud computing and its services from the core to the edge of the network. The general structure of the fog computing consists of three main components: (i) end devices; (ii) Fog nodes; and (iii) Back-end cloud infrastructure. Fog computing provides computation and storage in addition to network services between the edge and the cloud servers. Fog computing nodes are heterogeneous in nature and are deployed in a diverse set of environments. Therefore, the fog software architecture should be able to facilitate efficient resource management. Fog software architecture consists of the following main components [2] (see Figure 2):  
* _Internet of Things (IoT) and Internet of Everything (IoE) verticals_: use cases include smart city, smart grid, smart connected vehicle, healthcare, and medical IoT etc.
* _Orchestration Layer_: it provides dynamic, policy-based life-cycle management and supports data aggregation, decisions, data sharing and migration.
* _Abstraction Layer_: the role of this layer is to expose a uniform and programmable interface for efficient management and hide the platform heterogeneity.  
The close proximity of the fog nodes to the end devices helps in resolving the latency problems and provides the option of processing the data coming from the end devices in real time. Only the data and computation which are required by the cloud are passed to the back-end cloud through high-speed communication channels. Contextual and location-awareness information is extracted from the data generated from the end user IoT devices by the fog nodes and can be further analyzed to support many specialized services. In edge computing, the computing process is performed locally using programmable automation controllers which are responsible for data processing, storage, and communication [3; 4].  
An Intrusion Detection System (IDS) is a crucial component of a security system for any computer network where intrusion and other security breaches need to be detected quickly and effectively. There are two main approaches to intrusion detection, signature-based methods and anomaly-based methods. Signature-based methods match the current behavior of the network against predefined attack patterns. The method is required to store a signature of each attack in a database which means the system will fail to detect unseen attacks. Anomaly-based methods attempt to build a profile for normal behavior and any activities that do not fit this profile are considered an anomaly and hence an intrusion. This approach is effective in detecting previously unseen attacks but they have relatively high false positive rates. Anomaly-based intrusion detection techniques include statistics-based detection, data mining-based detection, and machine learning-based detection. Machine learning-based detection includes support vector machine-based detection, genetic algorithm-based detection, and neural network-based detection.  
Figure 1: The structure of Internet of Things (IoT) network using fog computing.  
Figure 2: The main components of Fog network [2].