# IoT Helper: A Lightweight and Extensible Framework for Fast-Prototyping IoT Architectures
## 2 Related Work
It is used on low power consumption devices and is recommended in scenarios with a low number of messages exchanged. These protocols are easier to implement since they do not require the introduction of mediators within the architecture but show serious limitations in terms of flexibility and scalability in real-time applications [19; 20]. On the one side, they introduce significant overhead in those cases in which multiple application modules--e.g., different instances of a mobile-client app--need to communicate with the base embedded system. On the other side, the case where real-time sensors generate volumes of data at a pace that applications cannot handle is very frequent due to the need to store values and to process and render them for users. * An alternative is represented by _Publish and Subscribe (P&S)_ protocols such as AMQP or the most widely used MQTT, the Message Queue Telemetry Transport protocol. P&S architectures systems exchange messages through middleware components called _message brokers_, where publishers push messages and subscribers read them. This obviously incurs more complexity in setting up the overall architecture, but it solves the problem of point-to-point protocols. In fact, brokers decouple the generation of messages from their actual handling, thus allowing for much higher scalability. MQTT exchanges messages using TCP. A permanent connection between the clients and the broker is established to exchange those messages through queues or channels. MQTT is widely used in data communication scenarios such as data collection. AMQP (Advanced Message Queuing Protocol) adds a security layer based on TLS. It is often used for data analysis. To tackle the proliferation of protocols and to render interoperability between different systems, Open Mobile Alliance (OMA) proposed a new protocol, OMA Lightweight M2M (OMA-LwM2M), that introduces a middle layer between servers and clients deployed on the IoT devices. Recently, OMA-LwM2M also supports P&S using MQTT. **Comparison to Other Solutions**. As discussed, many alternatives exist on the market both in terms of embedded devices, protocols and server or cloud-based solutions. Many of them require coding specific application logic for the problem at hand. On the contrary, as it will be discussed in the following sections, a distinguished feature of our approach is that the framework can be configured in a declarative manner by specifying sensors, i.e., input values, and actuators, i.e., actions to be performed on the hardware without any line of code. ThingWorx ([[https://www.ptc.com/it/products/thingworx/](https://www.ptc.com/it/products/thingworx/)]([https://www.ptc.com/it/products/thingworx/](https://www.ptc.com/it/products/thingworx/)), (accessed on 15 October 2021)) and Cumulocity IoT ([[https://www.softwareag.cloud/site/product/cumulocity-iot.html](https://www.softwareag.cloud/site/product/cumulocity-iot.html)]([https://www.softwareag.cloud/site/product/cumulocity-iot.html](https://www.softwareag.cloud/site/product/cumulocity-iot.html)), (accessed on 15 October 2021)) are examples of cloud-based platforms for collecting and processing data gathered by smart embedded devices. However, they do not provide services in terms of declarative configuration of devices--each embedded devices needs to be configured offline by the user before connecting it to the platform--or fast development of client solutions. Two proposals that share common goals are Greengrass and Brainboxes. We discuss these proposals and how they compare to ours in the following. Greengrass ([[https://aws.amazon.com/it/greengrass/](https://aws.amazon.com/it/greengrass/)]([https://aws.amazon.com/it/greengrass/](https://aws.amazon.com/it/greengrass/)), (accessed on 15 October 2021)) is a framework for developing IoT applications on the AWS cloud platform. It leverages the low-level IoT provided within AWS IoT. In essence, in order to develop a Greengrass application, users need to configure the embedded devices and join them to the project.