<!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>A middleware for creating physical mashups of things</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Hernan Herrera</string-name>
          <email>h.herreraalvear@uandresbello.edu</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Romina Torres</string-name>
          <email>romina.torres@unab.cl</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Copyright c by the paper's authors. Copying permitted for</string-name>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Facultad de Ingenier a, Vin~a del Mar</institution>
          ,
          <country country="CL">Chile</country>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>private and academic purposes.</institution>
          ,
          <addr-line>In: Bustos, J. Cspedes, S.</addr-line>
          <institution>(eds.): Proceedings of the Spring, School of Networks 2017</institution>
          ,
          <addr-line>Pucon, Chile, 19{20-2017, published, at http://ceur-ws.org</addr-line>
        </aff>
      </contrib-group>
      <abstract>
        <p>Nowadays, \things" deployed in cities are crucial to gather data to support decision making systems. Unfortunately, there is a low level of reuse of \things" between smart city applications of di erent organizations because \things" were unknown to developers or because it was harder to reuse them than use new ones due to technical details. In this ongoing work, we propose to convert \things" into active entities capable of discovering and organizing themselves driven by the applications goals' satisfaction. Moreover, \things" are capable of collaborating between them in order to satisfy or maintain satis ed the published goals of applications. To validate the feasibility of our proposal, we are building mashThings, an Internet of Things (IoT) platform to build smart city applications as physical mashups, where the middleware layer is augmented by a multiagent layer of broker agents representing the available \things" in the city.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>-</title>
      <p>
        The Smart City vision is to make a better use of the
public resources, increasing the quality of the services
o ered to the citizens while reducing the operational
costs of the public administrations [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ]. IoT' devices
are crucial for smart cities, because they are used to
obtain data needed by decision making systems such
as transportation or surveillance systems [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ]. Almost
30 billions of connected devices (with processors
enabling communication over a network interface) are
forecast by 2022, where around 18 billion will be
connected cars, machines, meters, sensors, wearables, to
name a few examples of IoT' devices and 1.5 billion
will have cellular connection 1. Moreover, current
simulation results using realistic large-scale IoT ' service
scenario in a city showed that the 99% of devices
located deep indoors could be reached with new cellular
technologies for the IoT 2. The connectivity is only the
foundation to enable smart cities [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ]. Ubiquitous and
pervasive computing, sensing technologies and
embedded devices are also needed [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ].
      </p>
      <p>
        Currently, there are several IoT' platforms [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ] such
as OneM2M 3 or the FI-WARE project 4. Moreover,
several architectural reference models had been
proposed (e.g. IoT-A 5), where typically, several
layers had been considered (perception, network,
middleware, application and business layers)[
        <xref ref-type="bibr" rid="ref5">5</xref>
        ]. There
are proposals using known Web standards to wrap
\things" as Web APIs [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ] proposing that smart city
applications should be built as Web mashup of \things"
or physical mashups [
        <xref ref-type="bibr" rid="ref12">12</xref>
        ]. Other authors [
        <xref ref-type="bibr" rid="ref6 ref7">6, 7</xref>
        ] had
proposed to use a microservice architecture in order
to build a new application as a composition of a suite
of small services, each running in its own process and
communicating with lightweight mechanisms.
      </p>
      <p>The IoT paradigm is the facilitator for real and
digital worlds be continuously in a symbiotic
interaction. \Things" are not only for collecting data from
the environment and interact/control physical world,
but \things" must be interconnected exchanging data
1https://www.ericsson.com/assets/
local/mobility-report/documents/2017/
ericsson-mobility-report-june-2017.pdf</p>
      <p>
        2https://www.ericsson.com/en/mobility-report/
massive-iot-coverage-in-the-city
3http://onem2m.org
4http://fiware.org
5http://open-platforms.eu/standard_protocol/
iot-a-architectural-reference-model/
and information between them [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ]. Unfortunately, in
the previous revised platforms, \things" were modeled
as passive entities or simple data sources' providers.
      </p>
      <p>
        Agents and Multiagent systems has been used in
distributed problems where agents act as autonomous
entities to achieve individual and/or collaborative
goals. Unfortunately, even when they had been used
for transforming common applications based on the
Internet of Things on self-adaptive applications[
        <xref ref-type="bibr" rid="ref10 ref13">10, 13</xref>
        ],
\things" were always modeled as passive entities.
      </p>
      <p>In this ongoing work, we propose to wrap \things"
as autonomous agents, making them capable of
collaborating with other \things" in order to achieve and
maintain satis ed mashups' goals. To do that, we
propose to create a multiagent layer between middleware
and application layers of the IoT's reference
architecture.</p>
      <p>The rest of the paper is the following. Section 2
presents the proposal. Section 3 presents
implementations details. Section 4 presents conclusions and draws
current and future works.
2</p>
    </sec>
    <sec id="sec-2">
      <title>Proposal</title>
      <p>
        In this work, we reuse the concepts used in
MACOCO++ [
        <xref ref-type="bibr" rid="ref9">9</xref>
        ] for service-based systems, where a
market metaphor is used to allow agents representing Web
services' requesters and providers negotiate to obtain
the Web services' con gurations. Speci cally, we
propose to add a multiagent layer to the basic IoT
architecture [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ] as Figure 1 shows in order to extend
the middleware layer's capabilities with a new service
that provides a living catalog of the available \things"
in the city. In this layer, each \thing" is represented
by a provider agent, who has the relevant data of the
represented \thing" such as the available services, the
error range, the maximum throughput, to name a few.
      </p>
      <p>Each time, a \thing" is registered in the city, a
provider agent is created. Indeed, the Directory
Facilitator (DF) Agent is a dedicated agent for this task,
which resides inside of the multiagent system. The
provider agent allows to keep track of the availability
of the \thing" as well as access to its data.</p>
      <p>Each time, a developer publishes a mashup request,
a request agent is also created. This agent is in charge
of selecting a proper \things"' con guration to satisfy
the request from the several possible o ers received
from di erent virtual organizations of agents from the
multiagent system. Con gurations are created by the
self-organization of agents representing \things"; as in
MACOCO++, agents communicate between them to
achieve this aim negotiating and creating alliances.</p>
      <p>During runtime, if there is evidence that a
physical mashup is not satisfying its goals, then the same
request agent may trigger a new request in order to
To show the feasibility of our approach we are
building mashThings, an Internet of Things (IoT) platform
to build smart city applications as physical mashups,
where the middleware layer is augmented by a
multiagent layer of broker agents representing the available
\things" in the city. This extra layer is between the
middleware and application layer of IoT' platforms and
it was built using Jade 4.4.0 6. We built a Web
prototype using node.js to facilitate its use. Independent of
the IoT platform under use, each time a new \thing"
is registered in this Web application, a broker agent
is created in the multiagent layer and the \thing" is
registered in the corresponding IoT platform. Then,
when an application developer needs a con guration
of \things" to achieve the application's goals, request
is published into this Web application, where a request
agent is published into the multiagent system in order
to create a virtual organization with agents
representing the needed \things" for the physical mashup in
order to obtain authorized access to the data of the
things if it applies.</p>
      <p>The experiment setup is an application scenario
that consists of to keep track that the temperature,
humidity and/or pressure do not exceed a given
threshold in an o ce hall as well as in each one of three near
o ces. Each one of the three near o ces has a node
comprised of a plug computer and three di erent
sensors (temperature, humidity and pressure) connected
through an Arduino One. The o ce hall do not have
a node or any sensor.
4</p>
    </sec>
    <sec id="sec-3">
      <title>Conclusions and Future Work</title>
      <p>In this ongoing work, we proposed mashThings, an IoT
platform for building in the future, robust smart city
applications. mashThings is based on extending the
capabilities of the middleware layer of the IoT platform
by adding a multiagent layer that provides a living
catalog of functionally-equivalent things available over
the city, where things discover themselves to mashups
developers. Moreover, this middleware's service will
abstract developers of physical mashups of the details
of connections to these "things" in order to get the
data. It will also enable the owners of the things to
restrict their use only to authorized mashups if it is
built over an XMPP-based IoT platform 7.</p>
      <p>Currently, we are experimenting with di erent IoT
platforms. We are using FIWARE complemented
with Orion 8 to give broker agents access to the
latest data by using the publisher-subscribe mechanism.
In the short term, we will test a full XMPP-based
IoT platform footnotehttp://tno-iot.github.io/
ekster/ in order to address also security concerns.</p>
      <p>
        We believe in the short term that any user in the
city could create its own mashup from the available
infrastructure. Thus, as part of the roadmap, we will
include proposals [
        <xref ref-type="bibr" rid="ref11">11</xref>
        ] where users may provide their
goals and automatically obtain an executable
workow, in our case, representing the mashup.
      </p>
      <p>Also, in the future mashThings will allow smart
cities applications become fault tolerant mashups
through the self-organization of con gurations of
things when goals are not being satis ed by adding
them self-adaptation capabilities.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <given-names>A.</given-names>
            <surname>Zanella</surname>
          </string-name>
          ,
          <string-name>
            <given-names>N.</given-names>
            <surname>Bui</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P.</given-names>
            <surname>Castellani</surname>
          </string-name>
          ,
          <string-name>
            <given-names>L.</given-names>
            <surname>Vangelista</surname>
          </string-name>
          ,
          <string-name>
            <surname>M.</surname>
          </string-name>
          <article-title>Zorzi Internet of Things for Smart Cities IEEE Internet of Things Journal</article-title>
          , vol
          <volume>1</volume>
          , pp
          <volume>22</volume>
          {
          <fpage>32</fpage>
          ,
          <year>2014</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <given-names>J.</given-names>
            <surname>Heuer</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Hund</surname>
          </string-name>
          ,
          <string-name>
            <given-names>O.</given-names>
            <surname>Pfa</surname>
          </string-name>
          ,
          <article-title>"Toward the Web of Things: Applying Web Technologies to the Physical World"</article-title>
          ,
          <source>Computer</source>
          , vol.
          <volume>48</volume>
          , no. , pp.
          <volume>34</volume>
          {
          <issue>42</issue>
          ,
          <year>2015</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <given-names>S.</given-names>
            <surname>Li</surname>
          </string-name>
          ,
          <string-name>
            <given-names>W.</given-names>
            <surname>Mackaness</surname>
          </string-name>
          <article-title>A multi-agent-based, semantic-driven system for decision support in epidemic management Health Informatics Journal</article-title>
          ,
          <volume>21</volume>
          (
          <issue>3</issue>
          ):
          <volume>195</volume>
          {
          <fpage>208</fpage>
          ,
          <year>2015</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <given-names>E.</given-names>
            <surname>Borgia</surname>
          </string-name>
          ,
          <article-title>The Internet of Things vision: Key features, applications</article-title>
          and open issues Computer Communications,
          <year>2014</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [5]
          <string-name>
            <given-names>R.</given-names>
            <surname>Khan</surname>
          </string-name>
          . Future Internet:
          <article-title>The Internet of things architecture</article-title>
          ,
          <source>possible applications and key changes 10th International Conference on Frontiers of Information Technology</source>
          ,
          <year>2012</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [6]
          <string-name>
            <given-names>A.</given-names>
            <surname>Krylovskiy</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Jahn</surname>
          </string-name>
          ,
          <string-name>
            <surname>E.</surname>
          </string-name>
          <article-title>Patti Designing a Smart City Internet of Things Platform with Microservice Architecture 3rd</article-title>
          <source>International Conference on Future Internet of Things and Cloud</source>
          ,
          <year>2015</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          [7]
          <string-name>
            <given-names>A.</given-names>
            <surname>Krylovskiy</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Jahn</surname>
          </string-name>
          ,
          <string-name>
            <given-names>E.</given-names>
            <surname>Patti InterSCity: A Scalable</surname>
          </string-name>
          Microservice-based
          <source>Open Source Platform for Smart Cities 6th International Conference on Smart Cities and Green ICT Systems</source>
          ,
          <year>2017</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          [8]
          <string-name>
            <given-names>M.</given-names>
            <surname>Zdravkovic</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Trajanovic</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Sarraipa</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R.</given-names>
            <surname>Jardim-Goncalves</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Lezoche</surname>
          </string-name>
          , et al.
          <article-title>Survey of Internet-of-Things platforms</article-title>
          .
          <source>6th International Conference on Information Society and Technology</source>
          ,
          <year>2016</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          [9]
          <string-name>
            <given-names>R.</given-names>
            <surname>Torres</surname>
          </string-name>
          ,
          <string-name>
            <given-names>H.</given-names>
            <surname>Astudillo</surname>
          </string-name>
          <article-title>A market-based approach to the dynamic recon guration problem of service-based systems</article-title>
          <source>International Journal of Innovative Computing, Information and Control</source>
          ,
          <volume>10</volume>
          (
          <issue>1</issue>
          ),
          <volume>115</volume>
          {
          <fpage>132</fpage>
          ,
          <year>2014</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          [10]
          <string-name>
            <given-names>D.</given-names>
            <surname>Weyns</surname>
          </string-name>
          and
          <string-name>
            <given-names>M.</given-names>
            <surname>George</surname>
          </string-name>
          , \
          <article-title>Self-adaptation using multiagent systems" IEEE software vol</article-title>
          .
          <volume>27</volume>
          , no.
          <issue>1</issue>
          , pp.
          <volume>86</volume>
          {
          <issue>91</issue>
          ,
          <year>2010</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          [11]
          <string-name>
            <given-names>M.</given-names>
            <surname>Chechik</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Simmonds</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Liaskos</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Nejati</surname>
          </string-name>
          ,
          <string-name>
            <surname>M. Sabetzadeh R. Salay</surname>
            <given-names>PWWM</given-names>
          </string-name>
          :
          <source>A Personal Web Work ow Methodology" Lecture Notes in Computer Science, The Personal Web - A Research Agenda</source>
          , vol.
          <volume>7855</volume>
          , pp.
          <volume>11</volume>
          {
          <issue>48</issue>
          ,
          <year>2013</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          [12]
          <string-name>
            <given-names>Y.</given-names>
            <surname>Benatallah</surname>
          </string-name>
          ,
          <string-name>
            <given-names>F.</given-names>
            <surname>Casati</surname>
          </string-name>
          , and
          <string-name>
            <given-names>F.</given-names>
            <surname>Daniel</surname>
          </string-name>
          .
          <article-title>"Understanding mashup development"</article-title>
          .
          <source>IEEE Internet Computing</source>
          <volume>12</volume>
          (
          <issue>5</issue>
          ):
          <fpage>4452</fpage>
          ,
          <string-name>
            <surname>Sept</surname>
          </string-name>
          .
          <year>2008</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          [13]
          <string-name>
            <given-names>N.</given-names>
            <surname>Moraes</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C.</given-names>
            <surname>Pereira</surname>
          </string-name>
          .
          <article-title>"FIoT: An agentbased framework for self-adaptive and selforganizing applications based on the Internet of Things"</article-title>
          .
          <source>Information Sciences</source>
          <volume>378</volume>
          :
          <fpage>161</fpage>
          {
          <fpage>176</fpage>
          ,
          <year>2017</year>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>