<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta />
    <article-meta>
      <title-group>
        <article-title>Towards a Discipline of IoT-Oriented Software Engineering</article-title>
      </title-group>
      <contrib-group>
        <aff id="aff0">
          <label>0</label>
          <institution>Universita ́ di Modena e Reggio Emilia Reggio Emilia</institution>
          ,
          <country country="IT">Italia</country>
        </aff>
      </contrib-group>
      <abstract>
        <p>-Despite the rapid progresses in IoT research, a general principled software engineering approach for the systematic development of IoT systems and applications is still missing. In this article, by synthesizing form the state of the art in the area, we attempt at framing the key concepts and abstractions that revolve around the design and development of IoT systems and applications, and that could represent the ground on which to start shaping the guidelines of a new IoT-oriented software engineering discipline.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>I. INTRODUCTION</title>
      <p>
        The dramatic future impact of IoT in society, industry,
and commerce is already widely recognized [
        <xref ref-type="bibr" rid="ref14">14</xref>
        ]. However,
despite the great deal of worldwide researches in the area, the
technologies to make IoT a systematic reality are far form
being assessed. Early researchers in the IoT area have mostly
focussed on communication issues and on enabling
interoperability [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ]. More recently, great efforts has been devoted
at promoting means to facilitate the integration of resources
and services towards the provisioning of software-defined
distributed services for the IoT. For instance, as in the “Web
of Things” (WoT) vision [
        <xref ref-type="bibr" rid="ref13">13</xref>
        ], by promoting the provisioning
of resources in an IoT network in term of Web Services, and
thus making it possible to develop distributed and coordinated
IoT services by using standard Web technologies.
      </p>
      <p>
        WoT is definitely promising and will most likely represent
a keystone technology in the future of IoT. Indeed, along the
WoT lines, a number of different approaches (in terms of,
e.g., supporting middleware [29], [
        <xref ref-type="bibr" rid="ref17">17</xref>
        ] and programming
approaches [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ], [
        <xref ref-type="bibr" rid="ref16">16</xref>
        ]) are being proposed to support the
development of IoT systems and applications. Yet, a common unifying
approach supporting their design and development, grounded
on a common set of abstractions, models, and methodologies,
is still missing. This undermines the possibility of promoting
a systematic and disciplined approach for the development
of complex IoT systems, and thus limits unfolding the full
potentials of the IoT vision.
      </p>
      <p>Against this background, this article attempts at framing
some key general characteristics related to the engineering of
complex IoT systems and applications, by synthesizing the
common features of existing proposals and application
scenarios. Such common characteristics are then used to identify
the key software engineering abstractions around which the
process of developing IoT systems and applications could
revolve, and via which to organize a set of guidelines towards
a general IoT-oriented software engineering discipline.</p>
      <p>To exemplify the analysis, we refer a specific case study,
representative of a larger class of IoT scenarios: an IoT
enabled hotel with conference center. We assume the hotel
infrastructures (e.g., lightening, heating, etc.) and its
facilities (guest rooms, conference rooms, and their associated
appliances) are densely enriched with connected sensors and
actuators. There, different actors (from hotel managers to
hotel/conference guests) can contribute to set up a variety of
IoT services to support both the hotel management and the
activities of its guests.</p>
    </sec>
    <sec id="sec-2">
      <title>II. BACKGROUND</title>
    </sec>
    <sec id="sec-3">
      <title>The definition of general software engineering principles requires identifying the general features and issues that characterize most current approaches to IoT systems design and development.</title>
      <sec id="sec-3-1">
        <title>A. Things</title>
      </sec>
    </sec>
    <sec id="sec-4">
      <title>The “things” in the IoT vision may encompass a large</title>
      <p>number of physical objects, and also include places and
persons.</p>
      <p>Physical objects and places can be made trackable and
controllable by connecting them to low-cost wireless electronic
devices. At the lower end of the spectrum, RFID tags or
bluetooth beacons, based on low-cost and short-range
communication protocols, can be attached to any kind of objects
to enable tracking their positions and status, and possibly to
associate some digital information with them. More advanced
devices integrating environmental or motion sensors (i.e.,
accelerometers) can detect the present and the past activities
associated with objects or with some place. In addition, one can
make objects actuable – enabling the remote control of their
configuration/status via proper digitally-controller actuators –
and possibly autonomous – delegating them of autonomously
direct their activities.</p>
      <p>
        To exemplify, in the hotel scenario: attach RFID tags to
objects in rooms, such as to a remote control in order to detect
its presence and location in the room; integrate some kind of
Arduino-link controller to a roll-up board in the conference
room, in order to enable controlling via, e.g., a mobile phone
its rolling-unrolling; have the window obscuring systems
autonomously regulate lightening conditions depending on the
kind of activities detected in the conference room, and possibly
actuable walls that can dynamically change the shape and
dimensions of meeting rooms depending on needs [
        <xref ref-type="bibr" rid="ref21">21</xref>
        ]. In
this perspective, autonomous robots (or robotified objects [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ])
can be somehow considered the highest end of the spectrum
in the world of smart “things”.
      </p>
      <p>Concerning persons, other than simply users of the
technology, they can also be perceived at first-class entities of the
overall IoT vision. Simply for the fact of having a mobile
phone, they can be sensed in their activities and positions,
and they can be asked to act in the environment or supply
sensing. In the hotel scenario, one may think continuously
detecting the position and activities of people, in order to get
ready to manage any possible emergency situation in the most
efficient way.</p>
      <sec id="sec-4-1">
        <title>B. Software Infrastructures</title>
      </sec>
    </sec>
    <sec id="sec-5">
      <title>To make “things” usable and capable of serving purposes,</title>
      <p>
        there is need of software infrastructures (that is, of IoT
middleware [
        <xref ref-type="bibr" rid="ref22">22</xref>
        ]) capable both of supporting the “gluing” of
different things and of providing some means for stakeholders
and users to access the IoT system and take advantage of its
functionalities.
      </p>
      <p>
        Concerning the “glue”, this involves a variety of technical
issues:
• Interoperability. To enable a variety of very
heterogeneous things to interact with each other, a set of shared
tele-communication protocols and data representation
schemes must be put in place [
        <xref ref-type="bibr" rid="ref20">20</xref>
        ], other than means to
identify things [
        <xref ref-type="bibr" rid="ref24">24</xref>
        ]. The study of these issues dates to the
very early stages of IoT researches, a number of different
proposals exists, and the way towards assessed standards
in well paved.
• Semantics. Beyond mere interoperability, a common
semantics for concepts must be defined to enable
cooperation and integration of things [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ]. Also for this
issue, a number of proposals grounded on standard Web
technologies, and ontologies and schemas specifically
suited for the physically and socially embedded nature
of the , exists [
        <xref ref-type="bibr" rid="ref20">20</xref>
        ].
• Discovery, Group Formation, and Coordination. IoT
systems’ functionalities derive from the orchestrated
exploitation of a variety of things, possibly involving a
variety of users and stakeholders. In the hotel scenario,
configuring a conference rooms for slide presentation
requires involving the beam projector, the lightening
system, other than the conference organizers and the
speakers. This requires means to discovery and establish
relations between things, between things and humans,
and coordinating their activities also accounting for their
social relations [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ].
• Context-awareness and self-adaptation. The inherent
ephemerality, unreliability, and mobility of system
components (e.g., things such as chairs or flipboards in the
hotel conference centre can come and go, can be moved
around, and can be placed in corners without wireless
connections) makes it impossible to anticipate which
things will be available and for how long during their
exploitation. This requires mechanisms for discovery,
group formation, and coordination are that are capable of
dynamically self-adapting to the general context in which
they act, or possibly even self-organize in a context-aware
way [31].
      </p>
      <p>
        Concerning the “access” to the functionalities and
capabilities of individual things by users, the scene is currently
dominate by the so called “Web of Things” (WoT) vision [
        <xref ref-type="bibr" rid="ref13">13</xref>
        ].
The idea is to expose services and functionalities of individual
things in terms of REST services, enabling the adoption of
assessed web technologies as far as discovery of things and
provisioning of coordinated group services are concerned.
Concerning middleware infrastructures, a variety of proposal
to support the provisioning of IoT services and applications
have appeared [29], [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ], [
        <xref ref-type="bibr" rid="ref16">16</xref>
        ], [
        <xref ref-type="bibr" rid="ref22">22</xref>
        ]. Beside their specificities,
most of these proposals rely on: some basic infrastructure to
support the WoT approach (i.e., to expose things in terms of
simple services); some means to support, in according to a
specific coordination model, the discovery of things (and of
their associated services), and the coordinated activities of
groups of things; and some solutions to make services and
applications capable of self-adapting and self-organizing in a
context-aware and unsupervised way.
      </p>
      <sec id="sec-5-1">
        <title>C. Services and Applications</title>
        <p>With the term “IoT System” we generally refer to the
overall set of IoT devices and to the associated middleware
infrastructure devoted to manage their networking and their
context-aware interactions. Logically above an IoT system,
specific software can be deployed to orchestrate the activities
of the system so as to provide:
• A number of specific services. That is, means to enable
stakeholders and users to access and exploit individual
things and direct/activate their sensing/actuating
capabilities, but also coordinated services that access groups of
things and coordinate their sensing/actuating capabilities.</p>
        <p>For instance, in a conference room of the hotel, other than
to services to access and control individual appliances,
one can think at providing a coordinated service that, by
accessing and directing the lightening system, the light
sensors, and the windows obscuring system, can modify
the overall situation of the room from “presentation state”
to ”discussion state” and viceversa.
• A number of more general-purpose applications or suites,
intended as more comprehensive software systems
intended to both regulate the overall functioning of an IoT
system (or of some of its parts), so as to ensure specific
overall behaviour of the system, as well as to provide
an harmonized set of services to access the system and
(possibly) its configuration. In the hotel scenario, one
can think at applications to control the overall heating
systems and lightening systems, and giving to hotel clerks
of the IoT system, empowered to enforce local control
and policies for that portion of the system. In the hotel
scenario, these could correspond to hotel guests,
empowered to control the IoT system in their room, and tune
the local parameters and exploit its services according to
own specific needs. Or they can be conference organizers
in charge of managing and configuring the services of the
rented conference rooms.
• Users: These are persons or groups that have limited
access to the overall configuration of the IoT applications
and services, i.e., cannot impose policies on them, but are
nevertheless entitled to exploit its services. In the hotel
scenario, these include conference delegates authorized to
access the conference facilities (e.g., uploading
presentaFig. 1. Key concepts and abstractions for IoT engineering. tcioonnfisginurtahteiopnroojfecthtoer)c,obnufetraernecenortooemntsit.led to modify the</p>
        <p>The three identified classes of actors are of a very general
the access to services to change the configuration of the nature, beside the hotel scenario. For example, in a scenario
associated parameter. of energy management in a smart city, they could correspond
Clearly, depending on the specific scenario, one can think at to, respectively: city managers, house/shop owners, private
IoT systems in which services may exist only confined within citizens and tourists. In the area of urban mobility, they
the context of some general application, but also at scenarios could correspond to, respectively: mobility managers, parking
in which there are services that can be deployed as stand-alone owners or car sharing companies, private drivers.
software.</p>
      </sec>
      <sec id="sec-5-2">
        <title>B. Functionalities</title>
      </sec>
    </sec>
    <sec id="sec-6">
      <title>III. KEY SOFTWARE ENGINEERING CONCEPTS AND ABSTRACTIONS</title>
    </sec>
    <sec id="sec-7">
      <title>Based on the above overview of IoT issues, we now try to</title>
      <p>synthesize the central concepts and abstractions around which
the development of IoT systems (spanning analysis, design,
and implementation) should be centered. Figure 1 graphically
frames such concepts in a logical stack.</p>
      <sec id="sec-7-1">
        <title>A. Stakeholders and Users</title>
      </sec>
    </sec>
    <sec id="sec-8">
      <title>The first activity in the analysis of a system-to-be concern</title>
      <p>identifying the stakeholders and users of the system, aka the
“actors”. That is, those persons/organizations who will own,
manage, and/or use the system and its functionalities, and from
which requirements should be elicited.</p>
      <p>In the case of IoT systems, the distinction between IoT
services and applications, and the presence of an IoT
middleware to support them and to manage individual things,
naturally leads to the identification of three main abstract
classes of“actors”:
• Global Managers: These are the owners of an overall</p>
      <p>IoT system and infrastructure, or delegates empowered to
exert control and establishing policies over the
configuration, structure, and overall functioning of its applications
and services. In the hotel scenario, the global manager
corresponds the system manager devoted to control the
overall IoT system of the hotel according to the directives
of the hotel management, e.g., for deciding heating levels
or for surveillance strategies.
• Local Managers: These are owners/delegates (whether
permanently or on a temporary basis) of a limited portion</p>
      <p>
        Once the key actors are identified, the analysis preceding
design and implementation cannot – for IoT systems and
applications – simply reduce to elicit from them the
functionalities (i.e., the specific services) that things or group of things
has to provide, but has to account for a more comprehensive
approach. In fact:
• Beside things provided with basic sensing/actuating
functionalities, one should consider the presence of smarter
things that can be activated to perform in autonomy some
long-term activities associated with their nature and with
their role in the socio/physical environment in which they
situates. These can range from simply cleaning robots to
more sophisticated autonomous personal assistants [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ].
• IoT applications are not simply concerned with providing
a suite of coordinated functionalities, but they should also
globally regulate the activities of the IoT systems on a
continuous basis, according to the policies established by
its stakeholders and to their objectives.
      </p>
      <p>As a consequence, other than analyzing the specific
functionalities to deliver, one also has to identify the policies and
goals to be associated with services and applications [28], i.e.,
the desirable “state of the affairs” to strive for in the context
of the socio-cyber-physical system where IoT applications and
services operate.</p>
      <p>In this perspective, the general classes of functionalities
to be identified for the development of IoT applications and
services include:
• Policies express desirable permanent configurations or
states of functioning of an overall IoT system (global
policies) or portions of it (local policies), and have the
aims of regulating the overall underlying IoT system.</p>
      <p>In the hotel scenarios, global policies can be defined,
e.g., to specify the maximum occupancy levels in each
room and have this monitored by local cameras in order
to invite people to move in different rooms whenever
needed. Policies are meant to be alway active and actively
enforced. Although, from the software engineering
viewpoint, the focus is mostly on application-level policies,
policies can also account for the proper configuration
of the underlying hardware and network infrastructures.</p>
      <p>
        The definition of global and local policies is generally in
charge of the global managers, although local managers
can be also entitled to enforce temporary local policies
on local portions of the system (provided they do not
contrast with the ones imposed by the global managers).
• Goals express desirable situations or state of the affairs
that, in specific cases, can/should be achieved. The
activation of a goal may rely on specific pre-conditions Fig. 2. IoT actors and the functionalities of IoT systems.
(i.e., the occurrence of specific events or the recognition
of some specific configurations in the IoT system) or and exploiting the above framed functionalities.
may also be specifically activated upon user action (e.g.,
the activation of a goal is invokable “as a service”). C. Avatars and Coalitions
The typical post-condition (deactivating the pursuing of Moving from analysis to design, one should consider that
a goal) is the achievement of the goal itself. In the hotel the “things” to be involved in the implementation of the
idenscenario, the clearer example could be that of activating tified functionalities can correspond to a variety of different
an evacuation procedure upon detection of fire by some objects and devices, other than to places and humans, each
sensors (pre-condition), whose goal (and post-condition) relying on a pletora of different technologies and capabilities.
is to achieve a quick evacuation of all people inside the Accordingly, from both the gluing software infrastructure and
building. To this end, the activation of a goal can trigger the software engineering viewpoints, it is necessary to define
the activities of digital signages and controllable doors in higher-level abstractions to practically and conceptually handle
order to rationally guide people towards the exits. As it the design and development of application and services, and
was the case for policies, the definition of global and local to harmonically exploit all the components of the IoT system.
goals is generally in charge of global, and sometimes of Most of the proposal for programming models and
midlocal, managers, whereas users can be sometimes entitled dleware acknowledge this need, by virtualizing individual
to activate simple local goals (or goals associated to things in some sort of software abstraction [
        <xref ref-type="bibr" rid="ref13">13</xref>
        ]. The WoT
individual things) “as a service”. perspective abstracts things and their functionalities in terms of
• Functions define the sensing/computing/actuating capa- generic resources, to be accessed via RESTful calls, possibly
bilities of individual things or of group of things, or associating external software HTTP “gateways” to individual
the specific resources that are to be made available things if they cannot directly support HTTP interfacing [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ].
to managers and users in the context of specific IoT Other approaches suggest adopting a more standard SOA or
application and services. Functions are typically made object-oriented approach [
        <xref ref-type="bibr" rid="ref23">23</xref>
        ]. Also, some proposals consider
accessible in the form of services, and can sometime associating autonomous software agents to individual things
involve the coordinated access to the functions of a [27], which we think well suits the fact that goals to be pursued
multitude of individual things. In the hotel scenario, one in autonomy may be associated to things.
can think at the individual functionalities of the appli- In addition, as already stated, some “things” make no sense
ances in a conference room (e.g., open/close a curtain, as individual entities as far as the provisioning of specific
serdisplay slide / change slide in a projector), as well as vices and applications is concerned, and are to be considered
more complex functionalities that can be achieved by part of a group and be capable of providing their services as
orchestrating things (e.g., set up room for presentation by a coordinated group. This applies both to the cases in which a
closing all curtains and switching off all lights). Functions multitude of equivalent devices must be collectively exploited
and the associated services are typically defined by global abstracting from the presence of the individuals [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ], and to the
and possibly local managers, but are exploited also by the cases in which the functionalities of the group complement
everyday users of the IoT systems (e.g., the hotel guests with each other and needs to be orchestrated [27].
and the conference attendees). With these considerations in mind, in an effort of
synthesizing from a variety of different proposals, we suggest the
Figure 2 shows the different roles of IoT actors in defining unifying abstractions of avatars and coalitions (See Figure 3).
Avatars. Borrowing the term from [
        <xref ref-type="bibr" rid="ref17">17</xref>
        ], we define an avatar
as the general abstraction for individual things and also for
group of things (and possibly other avatars) that contribute
to define a unique functionality/service. Avatars abstract away
form the specific physical/social/technological characteristics
of the things their represent, and are defined by means of:
• Identity. An avatar has a unique identity and is
addressable. An avatar representing a group does not necessarily
hides the identities of inner avatars, but it has its own
identity.
• Services. These represent access point for exploiting the
peculiar capabilities of avatars. That is, depending on the
kinds of things and functionalities a service abstracts:
triggering and directing the sensing/computing/actuating
capabilities, or accessing some managed resources.
• Goals. Goals, in the sense of desired state of the affairs,
can be associated to avatars. A goals have may a
precondition for autonomous activation, or may be explicitly
activated by a user or by another avatar.
• Events. Events represent specific state of the affairs that
can be detected by an avatar, and that may be of interests
to other avatars or to users. Other avatars or users can
subscribe to events of interest.
      </p>
      <p>Clearly, for group of avatars, an internal
orchestration scheme must be defined for coordinating the
activities/functionalities of the things (or of the other avatars) it
includes. In general terms, an orchestration scheme defines the
internal workflow of activities among the composing thungs
and avatars, and the constrains/conditions they are subjected
to. Orchestration scheme may also account for contextual
information, to make the activities of the group of context-aware.</p>
      <p>
        The need of defining orchestrations schemes and constraints
to rules the access and usage of (group of) things is generally
attributed – with specific characteristics and terminologies – in
most middleware and programming approaches for IoT [
        <xref ref-type="bibr" rid="ref23">23</xref>
        ],
[29], [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ].
      </p>
      <p>
        More in general, the avatar abstraction is in line, and
account for all the typical characteristics, of most existing
IoT approaches. Although the idea is not fully in line with
that of RESTful WoT approaches, because of the stateful
concepts of goals and events, most of them recognize the
need to somehow incorporate similar concepts within RESTful
architectures [
        <xref ref-type="bibr" rid="ref13">13</xref>
        ], to suit the dynamic and contextual nature
of IoT systems and applications.
      </p>
      <p>
        Coalitions. Borrowing the term from the area of multiagent
systems [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ], we define a coalition as a group of avatars that
coordinate each other’s activities in order to reach specific D. From Design to Implementation
goals, or enact specific policies. Accordingly, coalitions may The identification of avatars, avatar groups, and
coalibe of a temporary or permanent nature. Unlike avatar groups, tions, abstracts away from implementation issues. However,
coalitions does not necessarily have an identity, and does not the implementation of individual avatars associated to actual
necessarily provide services. “things” and of the necessary software for supporting for the
      </p>
      <p>To define and bring a coalition in action, the abstraction of orchestration schemes of avatar groups and the coordination
coalition must be defined (at least) in terms of a coordination patterns of coalitions, has to eventually follow.
scheme that should include: In our perspective, and comparing against the state of the art
• Rules for membership, to specify the conditions upon in the area, avatars, groups and coalitions are abstract enough
which an avatar should/could enter a coalitions. From
the viewpoint of individual avatars, the act of entering a
coalition can be represented by the activation of a specific
goal based on pre-conditions that correspond to the rules
for membership.
• Coordination pattern, to define the pattern (interaction
protocol and shared strategy) by which the members of
the coalition have to interact. The coordination pattern
may include an explicit representation of the goal by
which the coalition has been activated. However, such
goal can also be implicit in the definition of the protocol
and of the strategy.
• Coordination law, to express constraints that must be
enforced in the way the avatars involved in the coalition
should act and interact.</p>
      <p>In addition, one can consider the possibility to subscribe to
events occurring within the coalition.</p>
      <p>
        The view of avatar coalitions can be of use to realize
policies, or to aggregate groups of avatar based on similarity,
so as to make them work collectively in a mission-oriented
way without forcing them to specific identity-centered
orchestration scheme. This is coherent with the idea of aggregate
programming in sensor networks and in spatial computing
systems [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ], to realize nature-inspired coordination schemes
[31], to enable the dynamic formation of service ensembles
focused on short-term goals or sharing specific attributes [
        <xref ref-type="bibr" rid="ref9">9</xref>
        ].
concepts to tolerate implementation above most existing
systems and infrastructures. If not, this article at least contributes
proposing a starting point from where to reason further on
the expressiveness and necessity of the identified abstractions,
and on the desirable features of IoT programming systems and
middleware.
      </p>
    </sec>
    <sec id="sec-9">
      <title>IV. RELATED WORK</title>
    </sec>
    <sec id="sec-10">
      <title>In the past few years, research in the area of IoT has</title>
      <p>exploded. Nevertheless, a few research work has explicitly
attacked the problem of defining new software engineering
approaches specifically conceived for the IoT.</p>
      <p>
        Some proposals for development frameworks for the IoT
or for the WoT (whether middleware architecture [
        <xref ref-type="bibr" rid="ref17">17</xref>
        ] or
programming models [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ], [
        <xref ref-type="bibr" rid="ref16">16</xref>
        ]), are also accompanied by
guidelines towards the development of applications. However,
such guidelines are not grounded on general abstractions and
haven’t a general applicability beside the specific framework
in which they are conceived. Similar considerations apply to
the area of smart cities and urban computing [30], where
middleware and programming approaches are being proposed
– mostly of a special-purpose nature and focussed on specific
application scenarios such as participatory sensing [
        <xref ref-type="bibr" rid="ref11">11</xref>
        ], [
        <xref ref-type="bibr" rid="ref12">12</xref>
        ]
or mobility management [
        <xref ref-type="bibr" rid="ref25">25</xref>
        ] – but without accounting for the
issue of defining general design and development
methodologies.
      </p>
      <p>
        Agent-oriented software engineering research is strictly
related to IoT engineering [32]. Indeed, AOSE tackles the
problem of engineering large-scale systems, goal-oriented
entities, possibly including robots [26] and humans [
        <xref ref-type="bibr" rid="ref15">15</xref>
        ] with
conflicting goals and a multitude of stakeholders. This is
somehow related to the IoT problems of accommodating
services and a multitude of goals [27]. Indeed, the idea of
goal-oriented groups we have introduce somehow borrow from
the agent-oriented software engineering area. However, IoT
requires the introduction of specific concepts and abstractions
that AOSE, in general terms, do not address.
      </p>
      <p>
        General approaches for the engineering of self-organizing
computing systems have been proposed [
        <xref ref-type="bibr" rid="ref19">19</xref>
        ], [33], [
        <xref ref-type="bibr" rid="ref18">18</xref>
        ], [31],
[
        <xref ref-type="bibr" rid="ref10">10</xref>
        ]. There, the key issue is to engineering complex distributed
behaviours in large-scale systems lacking centralized control.
These two characteristics are mostly shared by IoT systems,
and indeed the problems of enabling self-organization of
specific behaviors have been outlined in the previous sections.
      </p>
      <p>
        Mainstream software engineering researches have recently
put great attention to the problem of promoting self-adaptive
features in software [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ], to attack the problem of increased
dynamically and impredictability of operational environments.
Such dynamics also affects IoT systems, in which the problem
of ensuring continuity in functionalities requires the
embedding of close control loops (along similar lines of those
promoted in self-adaptive systems researches) to continuously
monitor the activities of the system and its environment, and
eventually plan corrective actions.
      </p>
    </sec>
    <sec id="sec-11">
      <title>V. CONCLUSIONS AND FUTURE WORK</title>
    </sec>
    <sec id="sec-12">
      <title>Despite the large number of research works that attack</title>
      <p>specific problems related to the design and development of
IoT applications and services, a general software engineering
approach is still missing. This paper, by having proposed and
framed some key conceptual abstractions revolving about the
IoT universe, can represent a first small step towards a general
discipline for engineering IoT systems and applications.</p>
      <p>
        As IoT technologies mature, and real-world experiences
accumulate, more research in the area of software engineering
for IoT systems will be needed, possibly exploiting
contaminations with the related areas of agent-oriented software
engineering [32] and software engineering for self-adaptive
and self-organizing systems [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ], and eventually leading to the
identification of a widely accepted general methodology – and
associated tools – for the IoT-oriented software engineering.
      </p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <given-names>Harshit</given-names>
            <surname>Agrawal</surname>
          </string-name>
          , Sang-won
          <string-name>
            <surname>Leigh</surname>
            , and
            <given-names>Pattie</given-names>
          </string-name>
          <string-name>
            <surname>Maes</surname>
          </string-name>
          . L'
          <article-title>evolved: Autonomous and ubiquitous utilities as smart agents</article-title>
          .
          <source>In ACM International Joint Conference on Pervasive and Ubiquitous Computing</source>
          , pages
          <fpage>487</fpage>
          -
          <lpage>491</lpage>
          , New York, NY, USA,
          <year>2015</year>
          . ACM.
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <given-names>Luigi</given-names>
            <surname>Atzori</surname>
          </string-name>
          , Davide Carboni, and Antonio Iera.
          <article-title>Smart things in the social loop: Paradigms, technologies, and potentials</article-title>
          .
          <source>Ad Hoc Networks</source>
          ,
          <volume>18</volume>
          :
          <fpage>121</fpage>
          -
          <lpage>132</lpage>
          ,
          <year>2014</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <given-names>Luigi</given-names>
            <surname>Atzori</surname>
          </string-name>
          , Antonio Iera, and
          <string-name>
            <given-names>Giacomo</given-names>
            <surname>Morabito</surname>
          </string-name>
          .
          <article-title>The internet of things: A survey</article-title>
          .
          <source>Computer Networks</source>
          ,
          <volume>54</volume>
          (
          <issue>15</issue>
          ):
          <fpage>2787</fpage>
          -
          <lpage>2805</lpage>
          ,
          <year>2010</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <given-names>Payam</given-names>
            <surname>Barnaghi</surname>
          </string-name>
          ,
          <string-name>
            <surname>Wei</surname>
            <given-names>Wang</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Cory Henson</surname>
            , and
            <given-names>Kerry</given-names>
          </string-name>
          <string-name>
            <surname>Taylor</surname>
          </string-name>
          .
          <article-title>Semantics for the internet of things: early progress and back to the future</article-title>
          .
          <source>International Journal on Semantic Web and Information Systems</source>
          ,
          <volume>8</volume>
          (
          <issue>1</issue>
          ):
          <fpage>1</fpage>
          -
          <lpage>21</lpage>
          ,
          <year>2012</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [5]
          <string-name>
            <given-names>Jacob</given-names>
            <surname>Beal</surname>
          </string-name>
          , Danilo Pianini, and
          <string-name>
            <given-names>Mirko</given-names>
            <surname>Viroli</surname>
          </string-name>
          .
          <article-title>Aggregate programming for the internet of things</article-title>
          .
          <source>IEEE Computer</source>
          ,
          <volume>48</volume>
          (
          <issue>9</issue>
          ):
          <fpage>22</fpage>
          -
          <lpage>30</lpage>
          ,
          <year>2015</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [6] Ge´roˆme Bovet and
          <string-name>
            <given-names>Jean</given-names>
            <surname>Hennebert</surname>
          </string-name>
          .
          <article-title>Offering webof-things connectivity to building networks</article-title>
          .
          <source>In ACM Conference on Pervasive and Ubiquitous Computing - Adjunct Publication</source>
          , pages
          <fpage>1555</fpage>
          -
          <lpage>1564</lpage>
          , New York, NY, USA,
          <year>2013</year>
          . ACM.
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          [7]
          <string-name>
            <given-names>Yongcan</given-names>
            <surname>Cao</surname>
          </string-name>
          , Wenwu Yu,
          <string-name>
            <given-names>Wei</given-names>
            <surname>Ren</surname>
          </string-name>
          , and
          <string-name>
            <given-names>Guanrong</given-names>
            <surname>Chen</surname>
          </string-name>
          .
          <article-title>An overview of recent progress in the study of distributed multi-agent coordination</article-title>
          .
          <source>Industrial Informatics</source>
          , IEEE Transactions on,
          <volume>9</volume>
          (
          <issue>1</issue>
          ):
          <fpage>427</fpage>
          -
          <lpage>438</lpage>
          ,
          <year>2013</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          [8]
          <string-name>
            <given-names>B. H. C.</given-names>
            <surname>Cheng</surname>
          </string-name>
          and al.
          <article-title>Software engineering for selfadaptive systems: A research roadmap</article-title>
          .
          <source>In Software Engineering for Self-Adaptive Systems</source>
          , volume
          <volume>5525</volume>
          of Lecture Notes in Computer Science, pages
          <fpage>1</fpage>
          -
          <lpage>26</lpage>
          . Springer,
          <year>2009</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          [9]
          <string-name>
            <given-names>Rocco</given-names>
            <surname>De Nicola</surname>
          </string-name>
          , Diego Latella, Alberto Lluch-Lafuente, Michele Loreti, Andrea Margheri, Mieke Massink, Andrea Morichetta, Rosario Pugliese, Francesco Tiezzi, and
          <string-name>
            <given-names>Andrea</given-names>
            <surname>Vandin</surname>
          </string-name>
          .
          <article-title>The SCEL language: Design, imple- infrastructures for future smart social mobility services. mentation, verification</article-title>
          .
          <source>In Software Engineering for IEEE Intelligent Systems</source>
          ,
          <volume>29</volume>
          (
          <issue>5</issue>
          ):
          <fpage>78</fpage>
          -
          <lpage>82</lpage>
          ,
          <year>2014</year>
          .
          <source>Collective Autonomic Systems - The ASCENS Approach</source>
          , [
          <volume>26</volume>
          ]
          <string-name>
            <surname>Nathan</surname>
            <given-names>Schurr</given-names>
          </string-name>
          , Janusz Marecki, Milind Tambe, and Paul pages
          <fpage>3</fpage>
          -
          <lpage>71</lpage>
          . Springer Verlag,
          <year>2015</year>
          . Scerri.
          <article-title>Towards flexible coordination of human-agent</article-title>
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          [10]
          <string-name>
            <surname>J.L Fernandez-Marquez</surname>
            ,
            <given-names>G.</given-names>
          </string-name>
          <article-title>Di Marzo Serugendo, teams</article-title>
          .
          <source>Multiagent and Grid Systems</source>
          ,
          <volume>1</volume>
          (
          <issue>1</issue>
          ):
          <fpage>3</fpage>
          -
          <lpage>16</lpage>
          ,
          <year>2005</year>
          . S. Montagna,
          <string-name>
            <given-names>M.</given-names>
            <surname>Viroli</surname>
          </string-name>
          , and
          <string-name>
            <given-names>J.</given-names>
            <surname>Arcos</surname>
          </string-name>
          . Description and [27]
          <string-name>
            <given-names>N.</given-names>
            <surname>Spanoudakis</surname>
          </string-name>
          and
          <string-name>
            <given-names>P.</given-names>
            <surname>Moraitis</surname>
          </string-name>
          .
          <article-title>Engineering ambient composition of bio-inspired design patterns: a complete intelligence systems using agent technology</article-title>
          .
          <source>Intelligent overview. Natural Computing</source>
          ,
          <volume>12</volume>
          (
          <issue>1</issue>
          ):
          <fpage>43</fpage>
          -
          <lpage>67</lpage>
          ,
          <year>2013</year>
          . Systems, IEEE,
          <volume>30</volume>
          (
          <issue>3</issue>
          ):
          <fpage>60</fpage>
          -
          <lpage>67</lpage>
          , May
          <year>2015</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          [11]
          <string-name>
            <surname>Sara</surname>
            <given-names>Hachem</given-names>
          </string-name>
          , Animesh Pathak, and Vale´rie Issarny. [28]
          <string-name>
            <surname>Axel Van Lamsweerde</surname>
          </string-name>
          .
          <article-title>Goal-oriented requirements enService-oriented middleware for large-scale mobile par- gineering: A guided tour</article-title>
          .
          <source>In Fifth IEEE International ticipatory sensing. Pervasive and Mobile Computing, Symposium on Requirements Engineering</source>
          , pages
          <fpage>249</fpage>
          -
          <lpage>10</lpage>
          :
          <fpage>66</fpage>
          -
          <lpage>82</lpage>
          ,
          <year>2014</year>
          . 262. IEEE,
          <year>2001</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          [12]
          <string-name>
            <surname>Dries</surname>
            <given-names>Harnie</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Theo D'Hondt</surname>
            , Elisa Gonzalez Boix, and [29]
            <given-names>Lina</given-names>
          </string-name>
          <string-name>
            <surname>Yao</surname>
            ,
            <given-names>Q.Z.</given-names>
          </string-name>
          <string-name>
            <surname>Sheng</surname>
            , and
            <given-names>S.</given-names>
          </string-name>
          <string-name>
            <surname>Dustdar.</surname>
          </string-name>
          Web-based manWolfgang De Meuter.
          <article-title>Programming urban-area appli- agement of the internet of things. Internet Computing, cations for mobility services</article-title>
          .
          <source>ACM Transactions on IEEE</source>
          ,
          <volume>19</volume>
          (
          <issue>4</issue>
          ):
          <fpage>60</fpage>
          -
          <lpage>67</lpage>
          ,
          <year>July 2015</year>
          .
          <source>Autonomous and Adaptive Systems</source>
          ,
          <volume>9</volume>
          (
          <issue>2</issue>
          ),
          <year>2014</year>
          . [30]
          <string-name>
            <given-names>Franco</given-names>
            <surname>Zambonelli</surname>
          </string-name>
          .
          <article-title>Toward sociotechnical urban super-</article-title>
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          [13]
          <string-name>
            <given-names>J.</given-names>
            <surname>Heuer</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Hund</surname>
          </string-name>
          , and
          <string-name>
            <given-names>O.</given-names>
            <surname>Pfaff</surname>
          </string-name>
          .
          <article-title>Toward the web of organisms</article-title>
          .
          <source>IEEE Computer</source>
          ,
          <volume>45</volume>
          (
          <issue>8</issue>
          ):
          <fpage>76</fpage>
          -
          <lpage>78</lpage>
          ,
          <year>2012</year>
          . things:
          <article-title>Applying web technologies to the physical world</article-title>
          . [31]
          <string-name>
            <given-names>Franco</given-names>
            <surname>Zambonelli</surname>
          </string-name>
          and et al.
          <source>Developing pervasive Computer</source>
          ,
          <volume>48</volume>
          (
          <issue>5</issue>
          ):
          <fpage>34</fpage>
          -
          <lpage>42</lpage>
          , May
          <year>2015</year>
          .
          <article-title>multi-agent systems with nature-inspired coordination</article-title>
          .
        </mixed-citation>
      </ref>
      <ref id="ref14">
        <mixed-citation>
          [14]
          <string-name>
            <given-names>Marco</given-names>
            <surname>Iansiti</surname>
          </string-name>
          and
          <string-name>
            <given-names>Karin</given-names>
            <surname>Lakhani</surname>
          </string-name>
          .
          <source>Digital ubiquity: Pervasive and Mobile Computing</source>
          ,
          <volume>37</volume>
          ,
          <year>2015</year>
          .
          <article-title>How connections, sensors, and data</article-title>
          , are revolutionizing [32]
          <string-name>
            <given-names>Franco</given-names>
            <surname>Zambonelli</surname>
          </string-name>
          and
          <string-name>
            <given-names>Andrea</given-names>
            <surname>Omicini</surname>
          </string-name>
          .
          <article-title>Challenges business</article-title>
          .
          <source>Harvard Business Review</source>
          ,
          <year>2014</year>
          .
          <article-title>and research directions in agent-oriented software engi-</article-title>
        </mixed-citation>
      </ref>
      <ref id="ref15">
        <mixed-citation>
          [15]
          <string-name>
            <given-names>N. R.</given-names>
            <surname>Jennings</surname>
          </string-name>
          ,
          <string-name>
            <given-names>L.</given-names>
            <surname>Moreau</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Nicholson</surname>
          </string-name>
          , S. Ramchurn, neering. Autonomous Agents and
          <string-name>
            <surname>Multi-Agent Systems</surname>
            , S. Roberts,
            <given-names>T.</given-names>
          </string-name>
          <string-name>
            <surname>Rodden</surname>
          </string-name>
          ,
          <article-title>and</article-title>
          <string-name>
            <given-names>A.</given-names>
            <surname>Rogers.</surname>
          </string-name>
          Human-agent col-
          <volume>9</volume>
          (
          <issue>3</issue>
          ):
          <fpage>253</fpage>
          -
          <lpage>283</lpage>
          ,
          <year>November 2004</year>
          . lectives.
          <source>Commun. ACM ACM</source>
          ,
          <volume>57</volume>
          (
          <issue>12</issue>
          ):
          <fpage>80</fpage>
          -
          <lpage>88</lpage>
          , December [33]
          <string-name>
            <given-names>Franco</given-names>
            <surname>Zambonelli</surname>
          </string-name>
          and
          <string-name>
            <given-names>Mirko</given-names>
            <surname>Viroli</surname>
          </string-name>
          .
          <article-title>A survey on nature2014. inspired metaphors for pervasive service ecosystems</article-title>
          .
        </mixed-citation>
      </ref>
      <ref id="ref16">
        <mixed-citation>
          [16]
          <string-name>
            <given-names>E.</given-names>
            <surname>Latronico</surname>
          </string-name>
          ,
          <string-name>
            <given-names>E.A.</given-names>
            <surname>Lee</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Lohstroh</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C.</given-names>
            <surname>Shaver</surname>
          </string-name>
          , A. Wa
          <source>- Journal of Pervasive Computing and Communications</source>
          , sicek, and
          <string-name>
            <given-names>M.</given-names>
            <surname>Weber</surname>
          </string-name>
          .
          <article-title>A vision of swarmlets</article-title>
          .
          <source>Internet</source>
          <volume>7</volume>
          :
          <fpage>186</fpage>
          -
          <lpage>204</lpage>
          ,
          <year>2011</year>
          . Computing, IEEE,
          <volume>19</volume>
          (
          <issue>2</issue>
          ):
          <fpage>20</fpage>
          -
          <lpage>28</lpage>
          ,
          <year>Mar 2015</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref17">
        <mixed-citation>
          [17]
          <string-name>
            <given-names>M.</given-names>
            <surname>Mrissa</surname>
          </string-name>
          ,
          <string-name>
            <given-names>L.</given-names>
            <surname>Medini</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.-P.</given-names>
            <surname>Jamont</surname>
          </string-name>
          ,
          <string-name>
            <given-names>N. Le</given-names>
            <surname>Sommer</surname>
          </string-name>
          , and
          <string-name>
            <given-names>J.</given-names>
            <surname>Laplace</surname>
          </string-name>
          .
          <article-title>An avatar architecture for the web of things</article-title>
          .
          <source>Internet Computing</source>
          , IEEE,
          <volume>19</volume>
          (
          <issue>2</issue>
          ):
          <fpage>30</fpage>
          -
          <lpage>38</lpage>
          ,
          <year>Mar 2015</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref18">
        <mixed-citation>
          [18]
          <string-name>
            <given-names>Andrea</given-names>
            <surname>Omicini</surname>
          </string-name>
          and
          <string-name>
            <given-names>Mirko</given-names>
            <surname>Viroli</surname>
          </string-name>
          .
          <article-title>Coordination models and languages: From parallel computing to selforganisation</article-title>
          .
          <source>The Knowledge Engineering Review</source>
          ,
          <volume>26</volume>
          (
          <issue>1</issue>
          ):
          <fpage>53</fpage>
          -
          <lpage>59</lpage>
          ,
          <year>March 2011</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref19">
        <mixed-citation>
          [19]
          <string-name>
            <given-names>Van</given-names>
            <surname>Parunak</surname>
          </string-name>
          .
          <article-title>Go to the ant: Engineering principles from natural multi-agent systems</article-title>
          .
          <source>Annals of Operations Research</source>
          ,
          <volume>75</volume>
          :
          <fpage>69</fpage>
          -
          <lpage>101</lpage>
          ,
          <year>1997</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref20">
        <mixed-citation>
          [20]
          <string-name>
            <given-names>C.</given-names>
            <surname>Perera</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Zaslavsky</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P.</given-names>
            <surname>Christen</surname>
          </string-name>
          , and
          <string-name>
            <given-names>D.</given-names>
            <surname>Georgakopoulos</surname>
          </string-name>
          .
          <article-title>Context aware computing for the internet of things: A survey</article-title>
          .
          <source>Communications Surveys Tutorials</source>
          , IEEE,
          <volume>16</volume>
          (
          <issue>1</issue>
          ):
          <fpage>414</fpage>
          -
          <lpage>454</lpage>
          ,
          <year>First 2014</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref21">
        <mixed-citation>
          [21]
          <string-name>
            <given-names>M.</given-names>
            <surname>Phillips</surname>
          </string-name>
          .
          <article-title>The slothbot moving wall projects</article-title>
          , http://arch-os.com/projects/slothbot/.
        </mixed-citation>
      </ref>
      <ref id="ref22">
        <mixed-citation>
          [22]
          <string-name>
            <given-names>M. A.</given-names>
            <surname>Razzaque</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Milojevic-Jevric</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Palade</surname>
          </string-name>
          , and
          <string-name>
            <given-names>S.</given-names>
            <surname>Clarke</surname>
          </string-name>
          .
          <article-title>Middleware for internet of things: A survey</article-title>
          .
          <source>IEEE Internet of Things Journal</source>
          ,
          <volume>3</volume>
          (
          <issue>1</issue>
          ):
          <fpage>70</fpage>
          -
          <lpage>95</lpage>
          ,
          <year>Feb 2016</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref23">
        <mixed-citation>
          [23]
          <string-name>
            <given-names>C.</given-names>
            <surname>Sarkar</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.N.A.U.</given-names>
            <surname>Nambi</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R.V.</given-names>
            <surname>Prasad</surname>
          </string-name>
          ,
          <article-title>and</article-title>
          <string-name>
            <given-names>A.</given-names>
            <surname>Rahim</surname>
          </string-name>
          .
          <article-title>A scalable distributed architecture towards unifying iot applications</article-title>
          .
          <source>In IEEE World Forum on Internet of Things</source>
          , pages
          <fpage>508</fpage>
          -
          <lpage>513</lpage>
          ,
          <year>March 2014</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref24">
        <mixed-citation>
          [24]
          <string-name>
            <surname>Amardeo</surname>
            <given-names>C Sarma</given-names>
          </string-name>
          and
          <article-title>Joa˜o Gira˜o. Identities in the future internet of things</article-title>
          .
          <source>Wireless personal communications</source>
          ,
          <volume>49</volume>
          (
          <issue>3</issue>
          ):
          <fpage>353</fpage>
          -
          <lpage>363</lpage>
          ,
          <year>2009</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref25">
        <mixed-citation>
          [25]
          <string-name>
            <given-names>Andrea</given-names>
            <surname>Sassi</surname>
          </string-name>
          and
          <string-name>
            <given-names>Franco</given-names>
            <surname>Zambonelli</surname>
          </string-name>
          . Coordination
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>