tor the humidity in regular time intervals and to detect
in advance if the dehumidification system is powerful
enough to handle this exceptional situation. For that,
sensors need to be reprogrammed. With the extension
of the MuFFIN middleware proposed in this paper,
this reprogramming can be performed regardless of
the capabilities of the sensors.
3 RELATED WORK
We group the related literature on middleware tech-
nologies and on virtual machines. On what concerns
middleware, the Sensor Web Enablement standards
(SWE) from the Open Geospatial Consortium (OGC)
define a set of interfaces and metadata aimed at hiding
the details of communication and the heterogeneity
of sensors. The Sensor Event Service standard (SES)
manages subscriptions and filters; the Sensor Obser-
vation Service standard (SOS) provides a standard-
ized way to access data from observations of the de-
vices; the Observation and Mesurement standard (O&
M) provides a schematic representation of the mea-
surements and observations received from sensors;
and SensorML specifies models and XML schemas
to describe sensor networks.
1
Existing middleware systems provide sensor in-
formation through web services and interact with
sensor networks through gateways, which encapsu-
late sensor specificities (Valente, 2011; Kansal et al.,
2007; Br
¨
oring et al., 2011). In particular, the Mid-
dleware Framework For the Internet of Things (MuF-
FIN) (Valente, 2011; Valente and Martins, 2011) fol-
lows the SWE standard, including SOS for making
available sensor data to applications, the O&M for
storing the data from sensor networks, and the Web
Service Notification (WS-N) (Huang and Gannon,
2006) for notifying applications via web services.
MuFFIN is implemented on top of FuseESB
2
and its
modules follow the publish/subscribe paradigm. Fig-
ure 1 depicts the MuFFIN architecture.
As for virtual machines, Squawk (Simon and Ci-
fuentes, 2005) is a Java Virtual Machine (JVM) de-
signed to run on devices without an operating system
installed, having been tested on SunSPOT devices.
This virtual machine has the abilities to run multiple
applications simultaneously and to migrate applica-
tions to other devices as long as they run the same
virtual machine. Mat
´
e (Levis and Culler, 2002) is
a communication system based on a virtual machine
1
Open Geospatial Consortium —
http://www.opengeospatial.org/
2
Fuse ESB — http://fusesource.com/products/enterprise-
servicemix/
Figure 1: MuFFIN architecture.
for sensor networks, breaking complex programs into
small programs in order to reduce energy costs asso-
ciated with the transmission of programs. This vir-
tual machine runs on TinyOS and only requires 1kb
of RAM and 16KB of memory for instructions.
At last, the Callas Virtual Machine (CVM) runs
applications developed in the Callas programming
language (Martins et al., 2010), abstracting the hard-
ware and the software installed on the devices.
This virtual machine is available for Arduino and
SunSPOT devices. The Callas programming lan-
guage is strongly typed, avoiding certain kind of run-
time errors and enabling the reprogramming of sen-
sors remotely. This allows the remote updates to the
system without the need to physically access the de-
vices. We have implemented a proof of concept for
our proposal in MuFFIN, running the Callas Virtual
Machine.
4 MuFFIN WITH THE CALLAS
VIRTUAL MACHINE
This section presentes an extension to MuFFIN that
makes it possible to reprogram sensor devices homo-
geneously. We start by describing how MuFFIN ex-
ecutes code on behalf of real sensor devices and then
present how it simulates the communication between
simulated sensors.
MuFFIN allows for remote reprogramming of
sensor networks via web services, in case sensor de-
vices support this functionality. In order to make such
a functionality available for non-reprogrammable net-
works, we have integrated the CVM into MuFFIN
(MuFFIN-CVM component) to be able to run code on
behalf of sensor devices that are not reprogrammable.
Figure 2 presents the architecture of the MuFFIN-
CVM component.
When the reprogramming web service is invoked,
MuFFIN sends the code to the sensor network via its
gateway. If the network is not reprogrammable, the
gateway sends the code to the MuFFIN-CVM com-
SENSORNETS2014-InternationalConferenceonSensorNetworks
128