Event-driven programming based on Event-Condition-Action (ECA) rules allows users to define complex automation routines in a simple, declarative way; for this reason, in recent years ECA rules have been adopted by the majority of companies in the Internet of Things (IoT) industry as a promising paradigm for implementing ubiquitous and pervasive systems. Unfortunately, programming simplicity comes to a price: most implementations of ECA rules are bound to a strongly centralized communication infrastructure, that poses serious limitations on the application scenarios for the IoT, due to scalability, security and availability issues. To mitigate these issues, recent works introduced abstractions for communication and coordination of ensembles of IoT devices in a decentralized setting, effectively moving the computation towards the edge of the network without sacrificing the programming simplicity prerogative of ECA rules. In particular, Attribute-based memory Updates is a communication model transparently enhancing ECA rules-based systems with an interaction mechanism where communication is similar to broadcast but actual receivers are selected on the spot, by means of predicates over devices properties. In this paper, we introduce AbU-dsl, a Domain Specific Language for the IoT that compiles on top of an implementation of Attribute-based memory Updates. In this way, AbU-dsl provides a practical development interface, based on ECA rules, to effectively program IoT devices in a fully decentralized setting, by exploiting a full-fledged attribute-based interaction model. Thus, programmers can specify interactions between devices in a declarative way, abstracting from details such as devices identity, number, or even their existence, without the need for a central controlling service.
INDEX TERMSIoT programming, ECA rules, Attribute-based memory Updates, Distributed systems, Edge computing, Domain Specific Language.This rule pattern basically means: when Event occurs, if Condition is verified, then execute Action. Thus, an ECA rules-based smart device can react to an event (e.g., a variable change or a signal from a sensor) by executing one or more actions, that can update the internal state of the device or act on the environment via an actuator. Of course, the effect caused by the rule action can trigger other rules, and so on.However, in most current models and implementations of this paradigm, the ECA rules are stored on, and executed by,