Escolar Documentos
Profissional Documentos
Cultura Documentos
Sensor Networks
ABSTRACT 1. INTRODUCTION
Wireless Sensor Networks (WSNs) consist of sensor nodes After intensive research in the field of WSNs [2] in the past
(spots). In the frame of our ongoing ACOOWEE project we WSNs shall be programmed and used for real applications.
assay how spots can be programmed so that they collaborate For us the research challenge in the field of WSNs lies in the
and fulfil a common task. The novelty of our work is that coordination of a huge amount of spots (to avoid confusion,
we see activities as scripts that can be executed by spots. we use ”spots” for sensor nodes and ”nodes” in the context
Programming means to compose activity calls like bricks of UADs). In our vision many unreliable spots (hundreds,
by specifying their sequence (workflow description) and the thousands, ...) are programmed to cooperate, interact and
executing spot (action allocation). fulfil a common task. How can a programming model cope
We are developing a framework for Sun SPOTs. We use with this problem?
and adapt the expressiveness of UML2 Activity Diagrams The Unified Modeling Language 2 (UML2) [11, 12] was
(UADs) and program UADs with Papyrus UML. Our in- standardized by the Object Management Group to allow
terpreter executes them after a transformation. A successful modelling e.g. in the field of software engineering. It is wi-
example experiment with 6 Sun SPOTs indicates us that the dely used and so many tools are available [17]. The OMG
idea of the ACOOWEE-project could become interesting for has also standardized XMI2 (XML Metadata Interchange
programming distributed operation, concurrency, synchroni- 2 [10]). Among others, this specification shall allow an ex-
zation and data aggregation of WSNs. change of UML2 diagrams between different tools. To adapt
Currently we are extending our framework and increasing the syntax and semantics of the diagrams for the needs of
our network. To draw conclusions for WSNs in general, fur- a special domain, profiles can be specified. UML2 Activi-
ther research is necessary. ty Diagrams (UADs) are part of this standard ([12], Part
II) and describe behavior. They enable the user to model
workflows in a visual, structured and hierarchical manner.
Categories and Subject Descriptors The broad tool support, the standardization of the ex-
D.1.3 [Programming Techniques]: Concurrent Program- change data format, the adaptability of the diagrams and
ming—distributed programming; D.3.2 [Programming Lan- last but not least the possibility of visual programming are
guage]: Language Classification—uml2 activity diagrams, some reasons why we want to use UADs for our framework.
specialized application languages; C.2.4 [Computer - Com- We gained our first experiences to program systems using
munication Networks]: Distributed Systems—distributed UADs during the Master’s Thesis of Ipek [8]. He realized a
applications; D.3.3 [Programming Language]: Language prototype for Linux with C++ as a plugin (eXMIcutionU-
Constructs and Features—frameworks; D.1.7 [Program- nit) of a multi robot programming framework called RO-
ming Techniques]: Visual Programming BRAIN [1]. Damm has adapted this concept by implemen-
ting a framework for the Sun SPOT platform [14] in his Mas-
General Terms ter’s Thesis [3]. Our ongoing ACOOWEE project is based
on the results of these thesis, particularly on the implemen-
Languages
tation of Damm [4].
Sugihara and Gupta have written a detailed survey about
Keywords programming models for WSNs [13]. None of the listed mo-
ACOOWEE, activity oriented programming, wireless sensor dels uses UADs. Guerrero et al. have written a position pa-
networks per [7] discussing some theoretical aspects in the field of
workflow support for WSNs. To our knowledge a concrete
implementation is not available. Unlike to our proposal they
describe the workflows using state charts.
The remaining paper is organized as follows: In section 2
c ACM, (2010). This is the author’s version of the work. It is posted here we introduce the idea and the goals of our ongoing ACOO-
by permission of ACM for your personal use. Not for redistribution. The
definitive version was published in Proceedings of the 2010 ICSE Workshop
WEE project. Section 3 introduces our ACOOWEE frame-
on Software Engineering for Sensor Network Applications SESENA, Cape work. To illustrate and test our attempt we present an ex-
Town, South Africa, 2010, pp. 8-13. ample experiment in section 4. Finally section 5 concludes
ISBN 978-1-60558-969-5 this paper and gives a brief outlook to our further work.
http://doi.acm.org/10.1145/1809111.1809116
1) Activity 2) Passing Data 1) Activity Oriented Programming
input output output input
activity
A C workflow
activity activity activity
description
B
3) Start of an Activity action Legend:
initiator spot allocation action
h (brick)
1) execute(activity,input) s s
s s h host
s 2) process s s
s b
3) output s s b base
wsn s spot
Figure 1: Principle aspects of ACOOWEE.
s spot
2.1 Basic Idea
In the ACOOWEE (’Ac’tivity ’O’riented Pr’o’gramming use as
of ’W’ireless S’e’nsor N’e’tworks) project we pursuit the idea bricks
profile
that an activity is a script that can be executed by an in- activities describes
terpreter running on a spot. Activities can have an input to
receive data and an output to deliver data (fig. 1.1). Data <<root>>
are passed between activities, by connecting an output with activities
an input (fig. 1.2). An initiator starts the execution of an ac-
tivity by sending a request that contains the activity name repository
and the input data (fig. 1.3). As a result the spot proces-
ses the request and returns the output data. The initiator Figure 2: Conceptual aspects of ACOOWEE.
can be the spot itself (local action call) or RPC like (remote
procedure call) another spot or the user.
The start of an activity is an action which we see as a We can rudimentary describe work flows and data flows
brick. Fig. 2.1 shows the principle of Activity Oriented Pro- of one Sun SPOT as well as of the network using action
gramming of WSNs. Bricks are composed to new activities allocation.
by specifying their sequence (workflow description) and We are currently focusing our research on languages
their fulfilling spots (action allocation). This recursive for specifying the workflow and the action allocation. For
definition of an activity is finished by RootActivities. A the workflow description we assay how the syntax and se-
typical example for this type of activity is the read-out of mantics of UADs can be used or adapted to act as a glue
a sensor value. RootActivties of a spot can be compared for the composition of the activities. For the action alloca-
with the instruction set of a microprocessor. They have to tion we are working on a own syntax and semantics. In the
be written in the programming language which is offered by field of action allocation we are integrating dynamic and ex-
the spot. ploring action allocation mechanisms based on ”local neigh-
Action allocation can be static or dynamic. Static means, bors”, ”energy awareness” and ”probabilistic methods”. We
that the programmer specifies an exact mapping between are studying methodologies for dynamic reprogramming and
the activity and the executing spot (e.g. activity A runs on code adaption. In addition to the concept presented in [5] we
spot 1). Dynamic means that the programmer specifies a are enabling our Sun SPOTs to exchange code between each
rule how the executing spot must be selected during runti- other. We are building a network of 91 Sun SPOTs (fig. 3).
me (e.g. select randomly one spot from all local neighbors To gain mobility and heterogeneity we are developing and
that are reachable via one hop). If all activities are executed assembling robots that are controlled by Sun SPOTs.
locally the behavior of one spot is programmed, if actions We want to extend our framework with further UAD
are allocated to other spots the behavior of (a part of) the elements (e.g. signaling) and allow group allocation, consi-
WSN. An interpreter that executes an activity on a spot has dering different aggregation methods. Our goal is to abstract
to realize the specified workflow and the action allocations. and generalize our ideas and experiences gained form the de-
A spot can store activities and RootActivties in its repo- velopment of our framework and draw conclusions for WSNs
sitory (fig. 2.2). The content of the repository are the spot’s in general.
capabilities. They can be described by a profile and adapted
by adding, removing or replacing activities. Similar to the
execution of an activity the adaption can be initiated by the 3. THE ACOOWEE FRAMEWORK
spot itself and RPC like by another spot or by the user.
3.1 Components and Features
2.2 State of the Art, Activities and Goals Our framework consists of a tool for programming UADs
We have built a prototypical framework to visually pro- (IDE), an interpreter for UADs that runs on the Sun SPOTs
gram networks consisting of Sun SPOTs using a subset of (CORE), a transformation rule (RULE), and an access soft-
UAD elements. ware to the network for the user (ACCESS) that runs on a
Figure 4: Screenshot of IDE (Papyrus UML [6]).
2) Control Nodes
... ... 4) Hierarchy
activity name action activity
Initial ...
Node name1
Fork Join Fork & Join <<roo t>>
name2 actionA
Flow call
[x>0] [x>0] activity
Final Node
SpotTemp
temp
«root» (SpotTemp)
*edemo.GetTemp (c) temp
(a) (b)
[temp>=30.0]
«root»
(g)
(e)
*edemo.RedLED
«root» «root»
(d)
*util.Wait5sec *edemo.NoLED
«root» (h) (i) (j)
[else] *edemo.GreenLED
(f)
NetTemp6
temp result
«allocated» val1 (NetTemp6)
SpotTemp (p) netTemp
(m) «allocated,root»
(o) «allocated,root»
*util.MeanValue
«allocated» *edemo.RedLED «root»
val2 (t)
SpotTemp temp
(n) (s) (v) *util.Wait5sec
[result>=30.0] (w)
(k) «allocated,root»
«allocated,root»
*edemo.WhiteLED [else]
(q) (r) *edemo.NoLED
(x)
«root» «allocated,root»
(l) *edemo.BlinkLED *edemo.GreenLED
(z) (aa) (u) (y)
Figure 6: Example for the programming of WSNs using UADs. NetTemp6 and SpotTemp are two different UADs
which are programmed with Papyrus UML. The diagrams are composed of the elements offered by Papyrus
UML. NetTemp6 programs the behavior of the network, SpotTemp of a single Sun SPOT.
[4] C. Damm and G. Fuchs. Extended Abstract: [9] B. Oestereich. Die UML 2.0 Kurzreferenz für die
Programming Wireless Sensor Networks using UML2 Praxis. Oldenbourg Wissenschaftsverlag GmbH,
Activity Diagrams. In 8. Fachgespräche Sensornetze Munich, DE-BY, 4 edition, 2005.
der GI/ITG Fachgruppe ”Kommunikation und [10] OMG Object Management Group. MOF 2.0/XMI
Verteilte Systeme” (FGSN ’09), pages 75–78. TU Mapping, Version 2.1.1. OMG Available Specification
Hamburg-Harburg, Inst. für Telematik, Hamburg, without Change Bars formal/2007-12-01, Dec. 2007.
DE-HH, Aug. 2009. Tech. Report [11] OMG Object Management Group. OMG Unified
(urn:nbn:de:gbv:830-tubdok-5812). Modeling Language (OMG UML), Infrastructure,
[5] G. Fuchs, S. Truchat, and F. Dressler. Distributed V2.1.2. OMG Available Specification without Change
Software Management in Sensor Networks using Bars formal/2007-11-04, 2007.
Profiling Techniques. In Proc. of the IEEE/ACM [12] OMG Object Management Group. OMG Unified
COMSWARE 2006: 1st International Workshop on Modeling Language (OMG UML), Superstructure,
Software for Sensor Networks, pages 1–6. IEEE, 2006. V2.1.2. OMG Available Specification without Change
(SensorWare: New Delhi, IN-DL; Jan. 2006). Bars formal/2007-11-02, 2007.
[6] S. Gérard. Papyrus UML. [web: 2010/01/12] [13] R. Sugihara and R. K. Gupta. Programming models
http://www.papyrusuml.org/. for sensor networks: A survey. ACM Trans. Sen.
[7] P. Guerrero, D. Jacobi, and A. Buchmann. Workflow Netw., 4(2):1–29, 2008.
Support for Wireless Sensor and Actor Networks. In [14] Sun Microsystems. Sun SPOT. [web: 2010/01/12]
Proc. of the 4th International Workshop on Data http://www.sunspotworld.com/.
Management for Sensor Networks, volume 273 of [15] D. Veillard. The xsltproc tool. [web: 2009/05/27]
AICPS. ACM, 2007. (DMSN: Vienna, AT-09; Sept. http://www.xmlsoft.org/XSLT/xsltproc2.html.
2007). [16] W3C World Wide Web Consortium. XSL
[8] M. Ipek. Aufgabenbeschreibung für mobile Transformations (XSLT) Version 2.0. W3C
Roboterschwärme. Diplomarbeit, University of Recommendation REC-xslt20-20070123, Jan. 2007.
Erlangen-Nuremberg, Computer Science, Chair for [17] Wikipedia, The Free Encyclopedia. List of Unified
Computer Networks and Communication Systems; Modeling Language tools. [web: 2010/01/12].
Germany, May 2006.