<!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>Using Workflows to Build Compositions of Read-Write Linked Data APIs on the Web of Things</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Tobias Käfer</string-name>
          <email>tobias.kaefer@kit.edu</email>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Sebastian Lauber</string-name>
          <email>mail@slauber.de</email>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Andreas Harth</string-name>
          <email>andreas.harth@fau.de</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Friedrich-Alexander University Erlangen-Nuremberg</institution>
          ,
          <country country="DE">Germany</country>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>Institute AIFB, Karlsruhe Institute of Technology (KIT)</institution>
          ,
          <country country="DE">Germany</country>
        </aff>
      </contrib-group>
      <abstract>
        <p>We showcase an approach to use workflows for composing applications from components with Linked Data interfaces. Our approach consists in an ontology and corresponding operational semantics. We use the ontology to describe workflow models and workflow instances in Linked Data. To execute workflows, we developed operational semantics for the ontology using ASM4LD, a rule-based language for specifying computation in the context of Read-Write Linked Data. For our interactive showcase, we use as components: (1) networked devices with sensors and actuators from the Internet of Things / Web of Things, and (2) APIs from the Web that produce and consume RDF.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>Introduction</title>
      <p>
        The increasing distribution of information systems into decentralised
components poses new challenges for integration. Consider, e. g. the increasing amount
of devices on the Internet of Things (IoT) caused by the widespread availability
of cheap networked hardware3, the modularisation of software into microservices
caused by the need for component re-use in rapidly changing business
environments [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ], and decentralised social networks driven by the demand of users to
retain data ownership4. To equip components with Linked Data interfaces is a
first step towards integrated systems, as the Linked Data principles advocate the
use of web technologies in interfaces for large-scale integration: On the data level,
RDF allows for simple merging of data from different sources, and RDFS allows
for basic schema alignment using light-weight reasoning. On the interaction level,
HTTP provides an uniform interface to functionality on the web.
      </p>
      <p>
        Besides components with interfaces made for integration, we need a way to
compose applications from the components. Workflows are a way to create
applications that is highly suitable for intergration scenarios [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ]. To use workflows
in an environment requires a model of computation for the environment and
3 http://www.forbes.com/sites/oreillymedia/2015/06/07/
      </p>
      <p>
        how-the-new-hardware-movement-is-even-bigger-than-the-iot/
4 “Putting Data back into the Hands of Owners”, http://tcrn.ch/2i8h7gp
a corresponding workflow language with operational semantics [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ]. In previous
work, we have developed ASM4LD [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ], a model of computation for Read-Write
Linked Data. In this demo, we showcase WiLD, short for Workflows in Linked
Data, a workflow language with operational semantics in ASM4LD. The
language is closely related to standard workflow languages such as BPMN. Basic
assumptions around Linked Data are in contrast to established environments for
workflow systems, which poses peculiar challenges when providing operational
semantics of a workflow language for the environment of Linked Data:
Querying and reasoning under the open-world assuption Semantic Web
ontology languages such as RDFS and OWL make the open-world
assumption, whereas traditional workflow systems operate on relational data bases,
which make the closed-world assumption. To check whether something holds
for all parts of a workflow requires closedness.
      </p>
      <p>
        The lack of event data in REST HTTP supports the CRUD operations
(create, read, update, delete), but not the subscription to events. However, works
in workflow management traditionally use events as notifications of change.
We elaborate in our paper “Specifying, Monitoring, and Executing Workflows
in Linked Data Environments” [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ] how we address those challenges in WiLD,
provide the operational semantics, and evaluate WiLD empirically and formally.
      </p>
      <p>The contribution of this demo is a working system in the form of an
interactive demo5 of WiLD, which brings workflow-based composition to Linked
Databased components, e. g. on the Web of Things. In contrast to rule-based
composition typically found in IoT-based home automation scenarios, workflow-based
composition allows to specify compositions that require a notion of application
state. While the demo scenario is fairly small and the selection of components
may seem a bit made-up, we present an analogy of the demo scenario to a more
serious scenario of a digitised work environment in the conclusion.
2</p>
    </sec>
    <sec id="sec-2">
      <title>Related Work</title>
      <p>
        Unlike in other works around semantics, REST, and services, we do not study
how to derive compositions from descriptions, e. g. using a planner or proof
mechanism, but study the enactment of compositions. In other words, we study how
to execute a composition, be it generated automatically or manually, as for this
paper. For instance, in Semantic Web Services, on the Web of Things, or when
using RESTdesc [
        <xref ref-type="bibr" rid="ref9">9</xref>
        ], a major focus is on descriptions of functionality, prominently
inputs/outputs, and how to derive compositions from such descriptions.
      </p>
      <p>
        Unlike in Web Services, which are based on a model of computation where
service calls are first-class citizens, we work with REST, where state information
is the first-class citizen. Pautasso proposes an extension to BPEL [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ], a language
to specify executable compositions of Web Services, to regard REST calls as
BPEL service calls, thus retrofitting REST calls for state information as
function calls into BPEL. Our approach however is based on ASM4LD, a model of
5 Please find a video at http://people.aifb.kit.edu/co1683/2018/iswcdemo/
Title Suppressed Due to Excessive Length
visitor
registered
      </p>
      <p>Ask for
darkness</p>
      <p>Wait for
darkness</p>
      <p>Ask about
the weather</p>
      <p>
        Wait for
answer
give bad
comment
Correct
Wrong
give good
comment
end
computation that is built for state information. Similarly, scientific workflows,
another approach to bridge semantic technologies and workflows, work on
different models of computation, e. g. pipe-and-filter, or function calls [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ]. Our work
is based on a model of computation for REST.
      </p>
      <p>
        In a previous demo, we showed rule-based composition [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ], whereas in this
demo, we present workflow-based composition.
3
      </p>
    </sec>
    <sec id="sec-3">
      <title>Demo Walk-Through</title>
      <p>Visitors to our booth open their smartphone and find our WiFi network. They
connect and are directed to our registration form where they register their name
and home town. By registering, visitors create a workflow instance in a LDP
container. The instance is immediately executed and guides the visitor in the
following manner: At the first station, visitors are asked using a loudspeaker
connected to an IoT device to make it dark by covering another IoT device’s
light sensor. The request for darkness shall get the visitors closer to the devices
and familiarise them with the interactive scenario. Again using the loudspeaker,
the system thanks the visitor, and next asks the visitor how the weather is
at home. The visitors answer by placing a RFID card on RFID sensors, that
correspond to nice / not so nice ( / ), connected to another IoT device. Next,
the system evaluates the answer live using a weather API from the web and gives
a comment to the visitor, again using the loudspeaker. The underlying workflow
that our demo system executes is sketched in Fig. 1.
4</p>
    </sec>
    <sec id="sec-4">
      <title>Demo Components</title>
      <p>
        The demo consists of multiple IoT devices, all exposing data and functionality on
a (Read-Write) Linked Data interface: RFID readers, a light sensor, and a
loudspeaker. The devices are built using off-the-shelf IoT components such as Tessel
26. In terms of Web APIs, we use interfaces to Weather Underground, a weather
data service, and a registration form. We describe the workflow model for the
system as Linked Data using WiLD7, the ontology for our workflow language,
and put the workflow model in an LDP Container. Moreover, we maintain
workflow instances in the same LDP container. To execute the workflow instances, we
deploy the operational semantics for the workflow language [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ] on a rule engine
for ASM4LD, Linked Data-Fu [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ]. Fig. 2 shows an overview over the set-up.
6 https://tessel.io/
7 http://purl.org/wild/vocab
      </p>
      <p>Weather
Underground Wrapper
Tessel 2 with
Light Sensor</p>
      <p>LDP-Server
w/ WiLD Workflow
models and instances</p>
      <p>Tessel 2 with
Loudspeaker</p>
      <p>Station is the weather nice?</p>
      <p>Tessel 2 with
2 RFID readers</p>
      <p>Linked Data-Fu
w/ WiLD operational</p>
      <p>semantics</p>
    </sec>
    <sec id="sec-5">
      <title>Conclusion</title>
      <p>We presented our approach to use workflows to compose components that expose
Linked Data interfaces to an integrated application. Thus, our approach allows
to do composition in the context of the fundamental technologies of the Web of
Things. For the composition, we use a workflow language for Linked Data with
a formal grounding. The formal grounding allows to apply formal techniques
for workflow analysis, e. g. for liveness and deadlock properties. While the demo
looks somewhat made-up, our approach allows to build serious applications: For
instance, an assistance system for workers that work in an digitised environment:
Imagine the loudspeaker as virtual assistant that gives instructions to an order
picker. The tracking of the progress of the picker’s work can be done using light
and proximity sensors, or RFID sensors on shelf and tray.</p>
      <p>Acknowledgements This work is partially supported by the German BMBF
in AFAP (FKZ 01IS12051).</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <surname>Elmroth</surname>
            ,
            <given-names>E</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Hernández-Rodriguez</surname>
            ,
            <given-names>F</given-names>
          </string-name>
          , and
          <string-name>
            <surname>Tordsson</surname>
            ,
            <given-names>J:</given-names>
          </string-name>
          <article-title>Three fundamental dimensions of scientific workflow interoperability: Model of computation, language, and execution environment</article-title>
          .
          <source>Future Generation Computer Systems</source>
          <volume>26</volume>
          (
          <issue>2</issue>
          ) (
          <year>2010</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <surname>Jablonski</surname>
            , S and Bussler,
            <given-names>C</given-names>
          </string-name>
          : Workflow Management. International
          <string-name>
            <surname>Thomson</surname>
          </string-name>
          (
          <year>1996</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <surname>Käfer</surname>
            , T and Harth,
            <given-names>A</given-names>
          </string-name>
          :
          <article-title>Rule-based Programming of User Agents for Linked Data</article-title>
          .
          <source>In: Proc. 11th LDOW</source>
          (
          <year>2018</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <surname>Käfer</surname>
            , T and Harth,
            <given-names>A</given-names>
          </string-name>
          : Specifying, Monitoring, and
          <article-title>Executing Workflows in Linked Data Environments</article-title>
          .
          <source>In: Proc. 17th ISWC</source>
          (
          <year>2018</year>
          ). Accepted
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5. Keppmann, FL, Käfer,
          <string-name>
            <surname>T</surname>
          </string-name>
          , Stadtmüller,
          <string-name>
            <surname>S</surname>
          </string-name>
          , Schubotz,
          <string-name>
            <given-names>R</given-names>
            , and
            <surname>Harth</surname>
          </string-name>
          ,
          <string-name>
            <surname>A:</surname>
          </string-name>
          <article-title>High Performance Linked Data Processing for Virtual Reality Environments</article-title>
          .
          <source>In: Proc. Posters and Demos at the 13th ISWC</source>
          (
          <year>2014</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6.
          <string-name>
            <surname>Newman</surname>
            ,
            <given-names>S:</given-names>
          </string-name>
          <article-title>Building microservices - designing fine-grained systems</article-title>
          . O'
          <string-name>
            <surname>Reilly</surname>
          </string-name>
          (
          <year>2015</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          7.
          <string-name>
            <surname>Pautasso</surname>
            ,
            <given-names>C:</given-names>
          </string-name>
          <article-title>RESTful Web Service Composition with BPEL for REST</article-title>
          .
          <source>Data and Knowledge Engineering</source>
          <volume>68</volume>
          (
          <issue>9</issue>
          ) (
          <year>2009</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          8.
          <string-name>
            <surname>Stadtmüller</surname>
            ,
            <given-names>S</given-names>
          </string-name>
          , Speiser,
          <string-name>
            <surname>S</surname>
          </string-name>
          , Harth,
          <string-name>
            <given-names>A</given-names>
            , and
            <surname>Studer</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R</given-names>
            :
            <surname>Data-Fu</surname>
          </string-name>
          :
          <article-title>A language and an interpreter for interaction with R/W Linked Data</article-title>
          .
          <source>In: Proc. 22nd WWW</source>
          (
          <year>2013</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          9.
          <string-name>
            <surname>Verborgh</surname>
          </string-name>
          , R et al.:
          <article-title>Functional descriptions as the bridge between hypermedia APIs and the Semantic Web</article-title>
          .
          <source>In: Proc. 3rd WS-REST</source>
          (
          <year>2012</year>
          )
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>