=Paper=
{{Paper
|id=None
|storemode=property
|title=makeSense: Real-world Business Processes through Wireless Sensor Networks
|pdfUrl=https://ceur-ws.org/Vol-1002/paper6.pdf
|volume=Vol-1002
|dblpUrl=https://dblp.org/rec/conf/ipsn/DanielEFFGKMMOPRSTV13
}}
==makeSense: Real-world Business Processes through Wireless Sensor Networks==
https://ceur-ws.org/Vol-1002/paper6.pdf
makeSense: Real-world Business Processes
through Wireless Sensor Networks
Florian Daniel3 , Joakim Eriksson1 , Niclas Finne1 , Harald Fuchs4 , Andrea
Gaglione3 , Stamatis Karnouskos4 , Patricio Moreno Montero5 , Luca Mottola1 ,
Nina Oertel4 , Felix Jonathan Oppermann2 , Gian Pietro Picco3 , Kay Römer2 ,
Patrik Spieß4 , Stefano Tranquillini3 , and Thiemo Voigt1
1
SICS Swedish ICT, Kista, Sweden
2
University of Lübeck, Lübeck, Germany
3
University of Trento, Italy
4
SAP AG, Germany
5
Acciona Infraestructuras S.A., Spain
Abstract Wireless sensor networks (WSNs) have been a promising tech-
nology for quite some time. Their success stories are, however, restricted
to environmental monitoring. In the industrial domain, their adoption
has been hampered by two main factors. First, there is a lack of integra-
tion of WSNs with business process modeling languages and back-ends.
Second, programming WSNs is still challenging as it is mainly performed
at the operating system level. To this end, we provide the makeSense
framework, a unified programming framework and a compilation chain
that, from high-level business process specifications, generates code ready
for deployment on WSN nodes. In this paper, we present the makeSense
framework and the application scenario for our final deployment.
1 Introduction
Wireless sensor networks (WSN) are small, untethered computing devices equipped
with embedded sensors and actuators. WSNs can be deployed much more easily
than traditional wired sensors, and are able to coordinate and self-organize so
that some high-level application goal is achieved. Many of the early sensor net-
work deployments involved only sensors and realized environmental monitoring
applications, that reported aggregated data to a base station [1]. While sensor
networks have been successful in this domain, in other domains their adoption
has been rather limited.
Business back-end
not integrated with Unified,
WSNs comprehensive
Business Wireless
programming
Processes Sensor Networks framework still
missing
Figure 1. Open problems for using WSNs in business processes.
makeSense: Real-world Business Processes through Wireless Sensor Networks 59
Application Model Macro Macro WSN-ready
Model Compiler Program Compiler Binary
Application System
Capability Capability
Model Model
Figure 2. Compiling business process models into WSN-executable code.
As shown in Figure 1, we see two limiting factors that enable widespread
adoption of sensor networks: (i) there is a lack of integration of WSNs with
business process modeling languages and back-ends; (ii) programming WSNs is
still challenging as it is mainly performed at the operating system level since
there is no unifying comprehensive programming framework.
In the makeSense project [2], we tackle these two issues. We tackle the prob-
lem of integration by providing a holistic approach where application developers
“think” at the high abstraction level of business processes, but the constructs
they use are effectively implemented in the challenging reality of WSNs. Con-
cretely, we let the application developers specify the application in a WSN-
specific extension for Business Process Modeling Notation (BPMN). A model
compiler transforms the extended BPMN models into traditional and WSN-
specific code which allows to distribute process execution over both a WSN and
a standard business process engine.
To simplify WSN programming, many programming abstractions have been
developed [3], but they are hard to use since they typically focus on one specific
problem. To drastically simplify WSN programming, particularly for business
scenarios, we provide a broader approach that enables developers to use several
abstractions at once. Towards this end, we present a unified comprehensive pro-
gramming framework into which existing WSN programming abstractions can
blend smoothly. These abstractions are “glued” together using a core language,
a stripped-down version of Java tailored for WSNs. This macro-programming
language is also the target language of the model compiler mentioned above. It
can, however, also be used directly by WSN programmers. A macro compiler
takes the macro-programming code as input and compiles it down to plain Con-
tiki code that can be executed on WSN nodes or on the gateway between the
sensor network and the business process engines.
Effectively, this leads to two compilation steps as shown in Figure 2. The
model compiler takes as input the application model (in extended BPMN) and
an application capability model. The latter is a coarse-grained description of
the WSN, providing information such as the type of sensors/actuators available
and their operations. The macro compiler takes as input the macro-program
generated by the model compiler and a system capability model. The latter
provides finer-grained information on the deployment environment (e.g., how
many sensors of a given type are deployed at a location). The macro-compiler
generates executable code that relies only on the basic functionality provided by
the run-time support available on the target nodes. By leveraging the system
60 Daniel et al.
Figure 3. Deployment scenario for makeSense final deployment. An overview of the
scenario (left part), and the actuator with the flap (right part).
capability model, the macro compiler can generate different code for different
nodes, based on their application role.
As described in Section 6, the executable code runs atop a dedicated run-time
layer, which provides access to low-level functionality such as MAC protocols
and sensor devices. The run-time system also contains mechanisms enabling
self-optimization of the network functionality, also described in Section 6.
The paper proceeds as follows. In the next section, we briefly present our
deployment scenario. In Section 3 we discuss makeSense application modelling.
The subsequent sections present the makeSense macro-programming language
and the macro-compiler. We give an overview on the makeSense run-time system
in Section 6 and the conclude with some final remarks.
2 Deployment
The makeSense project’s deployment is in a student residence in Cadiz, Spain. As
shown in Figure 3 we implement a room ventilation scenario, where the actuator
(right part of the same figure) opens the flap in the student’s bathroom if the
measurement of the CO2 sensor is above a configurable threshold. The external
business process is managed by a room reservation system. We use an open
source reservation system to manage room reservations that interacts with the
sensor network through an occupancy interface. Hence, the sensor network can
save energy by not ventilating rooms when they are vacant.
3 Application Modeling
For the integration of WSNs with business processes, we do not just add a
service facade to the WSN or deploy middleware components on the gateway
as others have done [4]. Instead, we want to enable a process modeler to model
processes that are partially executed directly by the WSN itself and partially
by traditional business process execution engines. Towards this end, we use and
makeSense: Real-world Business Processes through Wireless Sensor Networks 61
extend the Business Process Modeling Notation (BPMN). We introduce new
attributes that allow the modeler to specify a new intra-WSN participant that
contains the logic executed by the WSN. Since the latter is resource-constrained
we allow only a subset of BPMN elements. Moreover, we introduce a special WSN
activity type to be used within the intra-WSN participant. The WSN activity is
(except for the message activity) the only allowed activity type there.
The WSN activity is backed by a meta-model that we describe in the next
section. As WSNs are inherently distributed systems, we also introduce a Target
attribute for lanes and activities within the intra-WSN participant, that allows
specifying where the respective logic should be executed, based on labels that
are relevant at the modeling layer. Finally, we add performance annotations,
expressing that the WSN should optimize its operation for a specific goal (e.g.,
system lifetime or reliability) within a certain subsets of activities. This is used
for the self-optimization in the run-time system as described in Section 6.
To assist the process modeler in creating correct, executable models, we use
a set of meta-models that describe the WSN in terms of the logical functionality
it provides, along with the way it is embedded into the physical set-up (e.g.,
which sensing or actuation is supported at which logical location). Instances of
these meta-models can be created either manually or through dynamic service
discovery.
At run-time, the BPMN process is executed in a distributed fashion. To ex-
ecute the intra-WSN process in the WSN, it is entirely transformed into macro-
code, compiled into C, and distributed by the run-time as described in the next
sections. For message exchange between the intra-WSN process and the other
process, the run-time uses a lightweight protocol, reducing encoded message size
by using message structure information on both sides. The compilation step au-
tomatically generates process communication endpoints that handle serialization
and deserialization of messages and implement process instance correlation.
4 Macro-programming Language
To bridge the gap between business processes and WSNs we defined a high level
intermediate macro-programming language where the abstractions contributing
to the language are decoupled, leverage on existing implementation, and can be
changed or extended easily to suit specific application needs.
The makeSense macro-programming language is based on a core set of meta-
abstractions which define the fundamental building blocks of the language as
units of functionality, reuse, and extensions. They are implemented through dif-
ferent “concrete” abstractions and provide the key concepts enabling interaction
with the WSN. The language serves as the “glue” among abstractions, whose
composition can be achieved by using common control flow statements. The core
language, in our case a stripped-down version of Java we tailored for WSNs, is
also the trait d’union between the macro-programming abstractions and the
BPMN business process model.
62 Daniel et al.
Meta-Abstraction
<