# IRONEDGE: Stream Processing Architecture for Edge Applications
## 2 Background and Related Work
### IoT and Edge Computing for \"Smart Infrastructure\"  
Expanding on the previously given definition, \"Smart Infrastructure\" covers a wide array of domains that, in some way, support both the daily lives of individuals in particular and the economy in general. Considering specific domain areas in \"Smart Infrastructure\", we can consider:  
1. Water distribution infrastructure (\"Smart Water\");
2. Electricity distribution infrastructure (\"Smart Energy\");
3. Transportation infrastructure (\"Smart Transportation\");
4. Telecommunication infrastructure (\"Smart Communications\").  
In all domains, there is a common approach to resource management, where resources are continuously monitored. Continuous monitoring, or more accurately, the flow of data created by continuous monitoring, allows organizations to react appropriately to changes in the state of managed resources. This is true whether they occur quickly or slowly.  
The creation of data flows describing the state of resources is typically enabled by Internet of Things (IoT) devices integrated into the resources, or positioned close to them. These kinds of devices generally have limited computational, storage, and energy resources. Their limitations force them to delegate the task of handling the data they themselves produce to other components that receive the collected data. While a single sensor in a single device may produce small volumes of data, the aggregation of many sensors in all devices required for \"Smart Infrastructure\" quickly grows to very significant levels.  
When considering approaches to handle large volumes of data continuously produced by IoT devices, a simple, yet reasonable approach is to simply divide the data into smaller subsets that can be easily processed more closely to their source, by some processing nodes [8; 11; 12]. The method is more efficient than transferring all data to a centralized location, but it may have high latencies and may be challenging to scale, as the number of IoT devices increases [9]. Depending on how close to the sources of data these nodes are located, these approaches are refereed to as edge computing, for a higher level of aggregation, or fog computing [13], in contrast to cloud computing, for a lower level of aggregation.  
Even when considering the advantages of this approach, a centralized processing step may still be required, for example for monitoring the resource's status, detecting Events at the edges of the zones of responsibility of multiple nodes, distributing alerts, or simply persisting processed data redundantly. For this set of needs, data may be filtered, reducing the data transfer costs, and enriched with the local context available only to each node. In summary, a three-layer architecture, similar to the one shown in Figure 1, is common in edge-computing-based solutions [11].  
In the context of \"Smart solutions\", collecting data from IoT devices, there is, naturally, an unbounded stream of data continuously arriving at each node. The rate at which data arrive to the nodes differs between devices and usage cases, and it is not necessarily known when its is triggered by Events in the monitored resources. As a result, solutions based  
Figure 1: Three-layer architecture for edge-computing-based solutions. Adapted from [11].  
on Asynchronous Messaging Middleware (AMM) and Stream Processing are commonly employed for transferring and processing data as part of the three-layer architecture depicted in Figure 1.