0% found this document useful (0 votes)
49 views

SERAPH: Service Allocation Algorithm For The Execution of Multiple Applications in Heterogeneous Shared Sensor and Actuator Networks

Seraph

Uploaded by

Anita Saha
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
49 views

SERAPH: Service Allocation Algorithm For The Execution of Multiple Applications in Heterogeneous Shared Sensor and Actuator Networks

Seraph

Uploaded by

Anita Saha
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 21

SERAPH: Service Allocation Algorithm

for the Execution of Multiple Applications


in Heterogeneous Shared Sensor
and Actuator Networks

Claudio M. de Farias, Wei Li, Flávia C. Delicato, Luci Pirmez,


Paulo F. Pires and Albert Y. Zomaya

Abstract Shared Sensor and Actuator Networks (SSAN) represent a new design
trend in the field of Wireless Sensor Networks (WSNs) that allows the sensing and
communication infrastructure to be shared among multiple applications submitted
by different users, instead of the original application-specific WSN design. In this
paper, with the goal of fully utilising the network infrastructure and inspired by a
service-oriented architecture, we modeled applications as sets of primitive services
to be provided by sensor nodes. By using such approach, sensor nodes can perform
different roles according to the services they offer and it is possible to identify
common services required by different applications so that leveraging service
sharing and optimizing the use of the network resources. With these premises, we
propose an adaptive service selection and allocation algorithm called SERAPH that
can efficiently utilise the underlying heterogeneous hardware resources, and yet

C.M. de Farias (&)  F.C. Delicato  L. Pirmez  P.F. Pires


PPGI-iNCE, DCC-IM, Universidade Federal do Rio de Janeiro, Rio de Janeiro, Brazil
e-mail: [email protected]
F.C. Delicato
e-mail: [email protected]
L. Pirmez
e-mail: [email protected]
P.F. Pires
e-mail: [email protected]
W. Li  A.Y. Zomaya
Centre for Distributed and High Performance Computing, School of Information
Technologies, The University of Sydney, Sydney, NSW 2006, Australia
e-mail: [email protected]
A.Y. Zomaya
e-mail: [email protected]

© Springer International Publishing Switzerland 2016 93


A. Guerrieri et al. (eds.), Management of Cyber Physical Objects
in the Future Internet of Things, Internet of Things,
DOI 10.1007/978-3-319-26869-9_5
94 C.M. de Farias et al.

provide the desired QoS level for multiple applications. Experimental results show
that SERAPH provides competitive performance regarding energy efficiency,
making it a promising task allocation algorithm for SSANs.

Keywords Wireless sensor networks  Shared sensor networks  Task allocation

1 Introduction

The Internet of Things (IoT) [1–3] has rapidly evolved in the last years as an
umbrella term envisioning a world in which every single object (the so-called
things) can be identified, controlled, and monitored through the Internet. These
heterogeneous objects are endowed with sensing and/or actuation capabilities, and
become able to capture data about physical variables, eventually process such data
in order to provide valuable information, and also to act upon the physical world as
a response to various stimuli. Smart objects communicate to each other and
seamlessly collaborate with other physical and/or virtual resources available in the
Internet to provide value-added information and new generation services for
end-users.
Wireless sensor networks (WSN) [4, 5] are a key component of IoT infras-
tructures. Such distributed networks are composed of intelligent sensor nodes (a
sub-set of smart objects), which work in a collaborative way, and are able to
introduce or improve a wide variety of services to be available to humans and
applications. However, in order to proper work as a core component of IoT,
Wireless Sensor Networks need to evolve from their traditional application-specific
design into a shared system design, where multiple applications simultaneously run
on top of the deployed nodes. Such evolution in the WSN design has raised the
emergent concept of Shared Sensor and Actuator Networks (SSANs) [6].
A recent research challenge of SSANs is how to allocate limited node resources
to potential contending applications running on the same infrastructure. This issue
has received notable attention from both academic and industry sides. One possible
solution for tackling this challenge is to employ task allocation algorithms, which
are responsible for looking for the best sensors (depending on the given criteria,
such as processing power or residual energy) to perform tasks but also considering
energy conservation of the network. By tasks, we mean the non-dividable units of
execution that, when composed together, consist of an application submitted by
users. Although several efforts have been made in the WSN field to develop task
allocation algorithms, most of them focus on the case of running one or more
applications in a single WSN with the main goal to achieve energy efficiency.
Differently from WSN, task scheduling algorithms [7] designed for SSANs should
not only pay close attention to the energy saving by tuning on/off different func-
tional modules of sensor nodes in their lifetime, but should also fully exploit the
common tasks from different applications so as to further improve the use of limited
SERAPH: Service Allocation Algorithm for the Execution … 95

node resources. This is potentially efficient since tasks from multiple applications
could run only once and the collected result be shared by all of them. Existing
common tasks, if not properly addressed by the scheduling algorithm, will consume
system energy in a less efficient way by repeatedly performing them. For instance,
let us consider two applications running simultaneously on SSAN, a meeting
detection application and a fire detection application [6]. A meeting detection
application requires a presence sensor and a temperature sensor to analyze if the
attendees are comfortable during a scheduled meeting. A fire detection application
and a meeting application can share a temperature sensing task and a temperature
threshold evaluation task.
Another concern that a task allocation algorithm must have is to assure the
application’s quality of service (QoS). A task allocation algorithm should be aware
of each application QoS requirements and network conditions to select the best
nodes that can satisfy the needs of application as much as possible.
The task scheduling approach [6–8] is one of the few early attempts to address
the aforementioned challenges. It models the applications as task graphs and
allocates the composite tasks to the candidate nodes that offer the requested func-
tionalities in the system. Our proposal builds on the existing task scheduling
solutions but goes a step further in the context of task representation. We argue that
modeling an application as a service composition [9–13] is a well-suited approach,
which abstracts the underlying heterogeneous sensor networks as a set of services
that represent all the available functionalities [14] in a standardized and common
way. Consequently, sensor nodes act as data providers and the set of WSNs
working as a whole in a shared infrastructure acts as service provider for end users.
Due to the well-known issues of limited hardware capabilities and energy resources
in WSNs, each sensor node typically provides one or few non-divisible function-
alities in its monitored area. In this paper, we call each kind of functionality as a
primitive service. Since it is often unlikely for a single type of node to perform an
application, we thus aim at using a group of different nodes to collectively provide
services for applications. Each application is composed of a suitable combination of
primitive services, which are selected from all the available services across WSNs.
WSNs operate in a highly dynamic environment. Sensor nodes often vary their
operation status for energy conservation; wireless links are unstable and subject to
several types of interferences, among other factors. In a SSN the dynamics is even
higher, since new applications can arrive and running applications can terminate.
Therefore, an adaptive service allocation approach [15] is required to make the
provided services to adapt to the dynamic underlying execution context without
explicit intervention from end-users at runtime. Moreover, it has to maintain the
quality of service (QoS) at an acceptable level to prevent high quality reduction
during the service time. In other words, the service allocation method should
comprise a dynamic and QoS-aware mechanism that guarantees the services pro-
vision at desired level most of the time.
Given these premises, we focus on developing a service selection algorithm
called SERAPH (SERvice allocation algorithm for multiple APplications execution
in Heterogeneous SSANs) that efficiently utilises the underlying resources in
96 C.M. de Farias et al.

service-oriented SSANs, and yet can provide a satisfactory level of QoS [16] from
heterogeneous sensor nodes within a dynamic environment. In summary, this paper
makes the following contributions:
1. An adaptive service-based approach is proposed to dynamically allocate
applications (composition of services) to heterogeneous sensor nodes across
multiple WSNs; the proposed solution is adaptive in the sense that it considers
residual energy of nodes as well as the current values of delay and data loss in
the network to make decisions on service allocation,
2. The allocation scheme is able to handle QoS requirements; current addressed
QoS parameters are delay and packet loss,
3. Different roles are dynamically assigned to sensor nodes and taken into con-
sideration when selecting the services for different applications; such roles
denote the type of services a node is able to provide.
The remainder of the paper is organized as follows: Sect. 2 describes the related
work and Sect. 3 introduces the models used in this work. Our proposed approach is
detailed in Sect. 4. Experimental results in Sect. 5 demonstrate the effectiveness of
our approach. Finally, Sect. 6 draws some conclusions and illustrates future work.

2 Related Work

Efstratiou et al. [17] was the first to propose the SSAN approach as an extension to
the traditional design of WSAN. The idea behind the approach is tried to decouple
the system infrastructure from application ownerships. A framework is created to
allow WSAN infrastructure to be shared among multiple applications, which are
potentially owned by different users. By achieving this goal, WSAN infrastructure is
viewed as an accessible resource, which can be dynamically re-purposed and
re-programmed by different authorities, in order to support multiple applications.
Supported by the results presented in [17], FRESNEL is a recently launched SSN
project focused on building a large scale federated sensor network with different
applications sharing the resources from the same underlying hardware infrastructure.
SenShare [6], as a part of the FRESNEL project, also presented an approach of
constructing overlay sensor networks that are not only responsible for providing the
most suitable members to perform an application, but also isolating the network
traffic of this application from the traffic generated by other applications or the
supporting mechanisms that are used to maintain the network overlay. For achieving
the goal of traffic isolation, SenShare intentionally applies a 6 bytes long application
routing header to each application packet, but the entire network message is still
formatted under the IEEE 802.15.4 standard. The application routing header con-
tains four sources of information, namely, app_id, seq_no, origin and destination,
where app_id is the unique identification for each application, seq_no works along
with other fields of the header to prevent the packet duplication, and origin and
destination represent the sender and the receiver addresses respectively.
SERAPH: Service Allocation Algorithm for the Execution … 97

There are several works in the SSANs field that address the task allocation
problem. In [18], the authors presented Utility-based Multi-application Allocation
and Deployment Environment (UMADE), which is a task allocation system for
distributing various applications based on QoM (quality of monitoring). QoM is a
distributed quality metric for monitoring a physical phenomenon of interest that is
based on the measurement accuracy. Thus, the quality of QoM depends on the
monitoring performed by all nodes allocated to an application. Unlike traditional
approaches that usually allocate nodes in the networks to a single application
according to metrics such as the amount of resources used, delay, processing and
power consumption, UMADE dynamically allocates nodes to multiple applications
according to the application’s QoM. An inherent property of an application is that
sensing data belonging to sensors that are allocated to a same application are
naturally correlated. As a consequence, the contribution of a sensor node for an
application QoM is dependent of other sensor nodes allocated for the same
application.
In [19], the authors propose a greedy algorithm to schedule applications onto a
specific SSAN. The algorithm performs the task allocation taking into account the
QoM of the applications. The applications’ QoM depends on the node to which the
application was allocated. Therefore, it is important that the allocation algorithm
seeks to optimize the allocation among multiple applications of a SSAN to maxi-
mize the QoM. The proposed work uses the property of QoM sub-modularity. The
QoM sub-modularity is due to the fact that the readings from the sensors of different
nodes are often correlated. For example, once the temperature readings from dif-
ferent nodes in the same room are correlated with each other, the assignment of a
new node in the room to perform the monitoring temperature does not produce a
considerable QoM improvement.
The work of [20] is an extension of [18] and presents a distributed
game-theoretic approach to application allocation in shared sensor networks. The
authors transform the optimal application allocation problem to a sub-modular
game and then develop a decentralized algorithm that only employs localized
interactions among neighbouring nodes. The authors prove that the network can
converge to a pure strategy Nash equilibrium with an approximation bound of 1/2.
The authors validated their results through simulations based on three real-world
datasets (Intel dataset, DARPA dataset and BWSN dataset) to demonstrate that their
algorithm is competitive against a state-of-the-art centralized algorithm in terms of
QoM. However, all of these approaches for task allocation are solutions that do not
address the latency issue which often occurs in practical WSN applications.
In [21] the authors introduce a real-time trust management module for an auction
based scheduling system that is able to validate the reliable bid value and determine
faulty nodes and malicious entities. The main objective of this task allocation
scheme is to maximize network lifetime by sharing tasks and network resources
among applications, while enhancing the overall application quality of service (e.g.,
application deadline). The authors also propose a heuristic two-phase winner
determination protocol to deal with the combinatorial reverse auction problem.
Task allocation for wireless sensor networks with multiple concurrent applications
98 C.M. de Farias et al.

(such as target tracking and event detection) requires sharing applications’ tasks
(such as sensing and computation) and available network resources. In this paper,
the authors model the distributed task allocation problem for multiple concurrent
applications by using a reverse combinatorial auction, in which the bidders (sensor
nodes) are supposed to bid cost values (according to their available resources) for
accomplishing the subset of the applications’ tasks. Trust management schemes
consist of a powerful tool for the detection of unexpected node behaviors (such as
faulty or malicious). It is critical for participants (i.e., bidders and auctioneer) to
estimate each other’s trustworthiness before initiating the task allocation procedure.
The main difference between SERAPH and [18–21] is that SERAPH shares all
kinds of tasks not only sensing tasks, what leads to better energy conservation.

3 Application and System Modeling

In this section, we present the application and system models used in our proposal.

3.1 Application Model

In our proposal, an application is defined as a 4-tuple hS; G; Dt; Qi, where S


denotes a list of ordered tasks and each task represents a required service. G is the
geographic area, determined by four geographic coordinates that define the
boundary of an area of interest which the application is required to monitor or
sense. Δt is used to specify how long the application should last, and Q represents
the QoS requirements of an application regarding its successful completion. Q is a
3-tuple hD; L; Ei representing the application requirements in terms of delay
(maximum end-to-end delay tolerated by an application), packet loss (maximum
percentage of data loss) and energy consumption (percentage of remaining energy
that a node must have to perform a service for this application). Those parameters
were extracted from [22–25].
In the context of our work, task and service have the same meaning. A service
indicates the action that can be performed by a sensor node so as to be requested to
accomplish the relevant task. A task si 2 S has the following properties:
hservice type; SsR; SdR; TP; EC i. The service_type element denotes the type of the
service a task requests. Each task is associated with one and only one service type.
We consider four types of services/tasks in our model: decision, routing, actuating
and sensing. SsR and SdR are two user-defined elements to characterize the service
provided by a node. SsR denotes the data receiving rate, meaning the time interval
between consecutive data readings the service requires to be suitably performed. It
has different meanings for each type of service. In a sensing service (for instance,
sensing values of temperature, light intensity, humidity, acceleration, etc.) it rep-
resents the frequency of data readings, while in a decision service it represents the
SERAPH: Service Allocation Algorithm for the Execution … 99

frequency of receiving readings as an input for the decision procedure. For a routing
service, it represents the frequency of messages to be forwarded by a node. Finally,
for an actuating service, it represents the frequency of messages that an actuator
should receive to perform an action. SdR denotes the data sending rate to indicate
the frequency of data sending during the time of service execution. The TP (Time to
perform) element denotes how long a task is to be in execution inside the WSN
[26]. In our work, Δt is the sum of the TPs of all tasks of an application. EC
represents the amount of energy consumed by each task. This amount is different
given each node platform. So, in order to calculate the amount of energy of each
platform the node uses the model presented in [27].
The WSN applications considered in this paper consist of one or more tasks; thus
an application may require a composition of services. Specifically, each of these
tasks is the finest-grained and non-divisible element to constitute the WSN appli-
cation. In this paper, we assume that tasks are heterogeneous. In this sense, we treat
each application as a chained list where a task is dependent of the completion of the
previous one. We also assume that once a task is initiated it cannot be interrupted
until its completion (non-preemptive task).

3.2 System Model

We assume that there are k WSNs in the system denoted by the set W = (W1, W2,…,
Wk), deployed into the target (monitored) area M to ensure that any event can be
detected by at least one sensor node. We call W an SSAN. Any given WSN is
modeled as an undirected graph G = (V, E), where V = (v1, v2,…,vn) represents the
set of sensor and actuator nodes (in this sense an actuator is only a node with
different capabilities) and E = (e1, e2,…,em) represents the set of all possible
communication links among the sensor nodes in the same WSN. Each WSN Wi has
a single sink node SNi and a number of sensor nodes V. Sink SNi is used as a
gateway between the WSNs and external networks (such as the Internet). The Sink
Node dispatches user requests to the selected sensor nodes, which are able to
provide the corresponding services in a given WSN. Sink maintains a data repos-
itory that describes the capabilities (services), the residual energy and the location
information of each sensor node (we are assuming that each node is capable of
announcing its location either by a GPS or a trilateration algorithm) [28]. Upon the
completion of services, the sink is in charge of communicating the results to the
applications. In addition, each sink SNi is also responsible for the communication
with others sinks to exchange data/intermediate result whenever this is required. All
nodes are synchronized having as base their correspondent SN.
Any sensor node can overlap the monitoring region of a set of other sensor
nodes. This indicates that some regions of the monitored area W are mutually
covered by multiple sensors that can perform a certain task. For any given sensor
node vi in V, i denotes the index of the sensor node that belongs to the WSN.
A sensor node vi is capable of providing one or more Services depending on their
100 C.M. de Farias et al.

capabilities to collect/sample different types of data, for instance, temperature, light,


smoke, and movement. Sensors in a same WSN are heterogeneous regarding their
provided Services. All sensor nodes are endowed with the same radio interface as
well as communication and sensing ranges. Moreover, sensors can detect all events
of interest occurred within their sensing range.
According to the various services embedded on the nodes, we assign different
roles to sensor nodes, namely: (i) relay nodes will receive only routing service;
(ii) sensor nodes: can receive sensing and routing task; (iii) decision nodes: can
receive a decision (any data processing task, such as a data fusion or any decision),
sensing and routing task and (iv) actuators: actuating, decision, sensing and routing
task. Please keep in mind, when the incoming user requests vary, the roles of the
sensor nodes will be changed accordingly. In addition, we assume that all the
sensors in the WSN have a valid communication path to reach their sink.
Communication interference between sensor nodes is not considered in this paper.

4 SERAPH

The algorithm presented in this section aims at performing allocation of multiple


applications over heterogeneous SSANs, while reacting to dynamic network con-
ditions. Our proposed algorithm is designed as a centralized approach, with the sink
node acting as a central decision node receiving information from all provisioning
services and deciding on the services to be used. This sink node also acts as a
coordinator when the underlying WSNs belong to different administrators so that
the desired services can be properly invoked at the run-time.
SERAPH encompasses four phases: initialization, node filtering, service
matching and service allocation. The pseudo-code of SERAPH is shown in Fig. 1.
First, in the initialization phase, records are created and populated in the sink
node with data required to operate the system. The data structure called Application
List is populated with the set of the 4-tuple hS; G; Dt; Qi, as defined in Sect. 3.
Another data structure called service List contains all services (as presented in
Sect. 3).
In the node filtering phase, we create a list of candidate WSNs, meaning WSNs
that have nodes able to execute the desired application according to the availability
function described in Eq. 1:

1; if a sensor is available
Aðs; x; y; i; cÞ ¼ ð1Þ
0; if a sensor is unavailable

where s is one of the services that an application requires, x and y are the geo-
graphical location for the node (to check if the node is in the application’s area of
interest G, as defined in Sect. 3), i is the index of the sensor and c represents the role
of the sensor. If the node’s role set is equal to the service type than a node is fit for
the task. Else the node is not available.
SERAPH: Service Allocation Algorithm for the Execution … 101

Fig. 1 The pseudo code of SERAPH

In the service matching phase, when a new application arrives, the sink node will
analyse the composition of the application. First, SERAPH puts all newly arrived
applications into a queue according to their arrival time. Then, it will search in the
newcomer applications for services that are common to the applications that are
already currently running in the system. Our algorithm excludes the common ser-
vices from the list of services required by the new applications. In order to avoid
losing data due to the reuse of a service [29], we have used the idea of session
persistence presented in [27] and used in [4, 26]. The rationale behind the solution
102 C.M. de Farias et al.

is to maximize the intersection of execution time of the same service from different
applications. For example, suppose that two sensor nodes p1 and p2 are able to
provide the same service S from a monitored area. A service S requested from
application A1 is assigned to the sensor p1. When a new application A2 arrives, it
contains the same service request for the same area. At the same time, the service S
of application A1 is still running on S1. Instead of initializing a new sensor p2 to
perform the task, we allocate this task to sensor p1, which is already providing the
same service to application A1. Before the service S of application A1 stops run-
ning, the collected data can be used for both application A1 and A2. In the
meantime, only one measurement of energy is drawn from the system, and the
longer intersection time for the applications, the more energy the system saves.
In the service allocation phase, we evaluate, in the sink node, each service in face
of the incoming application. We set the parameters of Eq. 2. For a given service, we
derive the following Eq. 2:

SV ¼ O  TP ð2Þ

where SV means the sensor value (the value that will be used in the algorithm to
select the best node to perform a task), TP means the topological distance, denoting
the number of hops between the node and the sink node. O is an objective function
that relates QoS parameters as it can be seen in Eq. 3:

O ¼ a  Dþb  Lþc  E ð3Þ

where a; c and b are coefficients for the normalized ([0, 1]) delay, data loss and
energy consumption, respectively. These three coefficients have a relationship
E ESi
a þ c þ b ¼ 1: L represents the loss in percentage (%), the parameter E ¼ residual
Eresidual
represents the residual energy of the WSN. ESi denotes the energy consumption
value for a given service. We use normalization because in a heterogeneous SSAN,
sensors may use different battery models. D represents the delay of the service
completion that is the duration of a given service, divided by the duration of a
whole application (the sum of the duration of all services in an application).
The three considered QoS parameters (D, L and E—presented in Sect. 3) are:
delay, data loss and energy consumption. The algorithm presented in Fig. 2 is used
to find the coefficients of Eq. 3. This equation model was extracted from [30] and it
is used due to its simplicity and low computational cost.

Fig. 2 Coefficient generator


SERAPH: Service Allocation Algorithm for the Execution … 103

Once the best node is found using the latest information about nodes in the
candidate sensor list, the sink node collects information about the allocated Services
of application Ai for updating the system about the network conditions until the next
arrival of application.

5 Experiments

The goal of the experiments is to assess: (i) SERAPH’s efficient use of sensor
resources (Sect. 5.3); (ii) SERAPH’s capacity of satisfying user’s QoS requirements
(packet loss and delay) (Sect. 5.4) and (iii) SERAPH’s adaptation
capability (Sect. 5.5).
The experiments were conducted in the SUN SPOT platform [31], a commercial
sensor platform that is particularly suitable for rapid development and demonstra-
tion of WSNs applications. The SUN SPOT SDK environment includes Solarium,
that contains a SPOT emulator that is useful for testing software created using
SUN SPOT and/or creating scenarios with a large number of nodes. In all the
following experiments, we used a mix of sensor nodes (real nodes and virtual nodes
emulated by Solarium) to ensure we can fully study how the proposed algorithm
performs in large scale WSNs. Every experiment was repeated 30 times and had a
confidence interval of 95 %.

5.1 Experimental Settings

In our experiments, we assumed that there are 1000 sensor nodes randomly dis-
tributed in a 1000 × 1000 m2 field, organized as ten (10) independent WSNs (100
nodes each) with a single sink node placed in the top right corner for each one. In
all experiments we varied the application number using 2, 4, 6, 8, and 10 appli-
cations. The values of QoS requirement of packet loss and delay are randomly
chosen in a [1, 10 %] interval and [10–50 ms] interval respectively. The values of
the intervals were chosen based on the applications presented in [32, 33].
As presented in Sect. 3, each application is composed of a set of services. In our
experiments, each application contains 2–60 services. In order to generate a random
set of services for each application, we have used a random graphs generation
procedure further explained in [34]. All experiments were performed with 2
common services among applications.
We used LQRP as routing protocol to exchange data in each WSN. Each sim-
ulation runs for 900 s. We adopted the energy consumption model described in
[27]. Interference issues are dealt by SUN SPOT MAC protocols and simulator and
are out of the scope of our work. As synchronization protocol we have used the one
presented in [31]. In our experiments, the area of interest of all applications cor-
responded to the same 1000 × 1000 m2 where the nodes are deployed. We have
104 C.M. de Farias et al.

compared SERAPH with a Naive Approach, the FRP algorithm [35] and
SACHSEN algorithm [26]. We have created a naive approach that is a scheme for
task scheduling as a baseline. In such scheme, each task is allocated in a random
way that only checks if the node is able to execute the selected task (in terms of
geographical position, required sensing interfaces and amount of energy to con-
clude the task). If the node randomly selected is not able to perform the task,
then another node will be randomly chosen [36]. We have used the default noise
generator from Sun SPOT.

5.2 Metrics

In our experiments, the network lifetime and the allocation successful rate
(ASR) were the metrics used to evaluate SERAPH’s efficient use of sensor
resources (Sect. 5.3). The delay and packet loss are the metrics used for the eval-
uation the SERAPH’s capacity of satisfying user’s QoS requirements (packet loss
and delay) (Sect. 5.4). In this paper, we adopted the same definition of network
lifetime used in [26], which is the time elapsed until the first node in the WSN is
completely depleted of its energy. As the network lifetime metric does not fully
reveal the performance of SERAPH, we used the metric ASR (Allocation Success
Rate). ASR was introduced in [18] and it is obtained from other two metrics: (i) the
number of executed services and (ii) the number of missed services. The number of
executed services is used to measure the total number of services that have been
successfully executed in the experiment. The number of missed services denotes the
number of services that fail to be performed due to various issues occurred in the
network, such as data loss, sensor malfunctioning and loss of connectivity. Using
these two metrics, we derive ASR as the ratio between executed services and the
total number of services (a value between 0 and 1).
Delay is defined as the ratio between elapsed time between submitting an
application into the SSAN and the result coming back to the Sink Node and the sum
of all services composing an application. Packet loss is defined as the ratio of
packets received by the Sink Node and the number of packets sent by source nodes.
The network lifetime and the allocation successful rate (ASR) were the metrics
used to evaluate SERAPH’s adaptation capability (Sect. 5.5).

5.3 Experiments Evaluating System Efficiency

We have performed a set of experiments in order to evaluate SERAPH’s efficient


use of sensor resources by varying the number of applications simultaneously
running in different WSNs.
The first goal of this set of experiments is to assess how long the WSNs last
using SERAPH and the other approaches considered in this work, by varying the
SERAPH: Service Allocation Algorithm for the Execution … 105

Fig. 3 Network lifetime with different number of applications

number of applications simultaneously running in different WSNs. The results of


this experiment (Fig. 3) show that with the increment of the number of applications
simultaneously running in WSNs, in all algorithms the network lifetime is reduced
accordingly. FRG has the worst network lifetime performance among all algo-
rithms. This is mostly due to the greedy design principle makes it to always search
for all nodes that can perform an application request regardless of the overall system
performance. SACHSEN and SERAPH showed better results in network lifetime
performance than Naïve Approach and FRG since both use service sharing, which
efficiently utilizes the hardware resources to execute WSN applications. The more
common service requests are simultaneously being performed within the WSNs, the
better performance the service-shared based algorithms will have. However, the
network lifetime of SERAPH is better than SACHSEN’s since SERAPH can adapt
itself to the changing network conditions and, so, it has more chance to select a
suitable node to perform the specific service from its role-assignment mechanism.
In the second set of experiments, we evaluate the ASR values for all algorithms
by varying the number of applications simultaneously running in different WSNs.
Figure 4 shows that as the number of applications increases, the ASR decreases for
all algorithms. The Naive Approach showed the worst results among all algorithms.
This occurred because the naive approach allocates tasks in a random way without
considering the QoS requirements. FRG algorithm is superior to all other approa-
ches, but this outcome is achieved sacrificing network lifetime to offer the best
allocation. Especially, when the number of applications reaches 10, FRG gets a
better performance than SERAPH (4 % better) but SERAPH has a much longer
network lifetime (almost 2.3 times better).
SERAPH showed similar results to SACHSEN when the number of applications
remains low in our experiments. However, our approach performed better when the
number of applications starts increasing. SERAPH outperforms SACHSEN because
106 C.M. de Farias et al.

Fig. 4 ASR with a different number of applications

SERAPH considers QoS parameters in order to allocate the nodes. As the number
of applications increases, also increases the number of messages sent, packets lost
and delay. As the number of applications increases, it becomes more important for
the allocation algorithm to consider the QoS parameters.

5.4 Experiments Evaluating SERAPH Capacity to Meet


QoS Requirements

We have performed a set of experiments in order to evaluate SERAPH’s capacity to


satisfy QoS requirements of the application by varying the number of applications
simultaneously running in different WSNs. In these experiments, we are trying to
verify if SERAPH is capable to meet the applications requirements in terms of delay
and packet loss.
First, we have performed an experiment to analyze if SERAPH is able to meet
the packet loss requirement of each application as the number of applications is
increased. We observed in Fig. 5 that as the number of applications simultaneously
running in different WSNs increases the packet loss also increases.
FRG is the least affected by packet loss (it had the same result as SERAPH)
since it is a greedy algorithm that chooses to allocate a task to a group instead of a
single sensor. Therefore, in case of losing a sensor to perform a task, there is a
replacement ready to be used. On the other hand, as seen in Fig. 3, this behavior
leads to high-energy consumption.
Naive Approach and SACHSEN had the worst results since neither of them
takes QoS into consideration in order to allocate nodes. The performance of
SERAPH: Service Allocation Algorithm for the Execution … 107

Fig. 5 Packet Loss with a different number of applications

SERAPH presents the best packet loss rate since it chooses the node to allocate the
tasks based on the QoS requirements. This mechanism requires that up-to-date
sensor node information is collected regularly. If any information of sensor nodes is
lost on the way to the sink, those nodes are automatically out of the set of eligible
nodes until such information becomes accessible again. Packet loss impact is
therefore reduced to a certain extent, making the performance of SERAPH matches
FRG (1 % of difference but with confidence interval of 2 %) with much higher
System Lifetime (almost 2.3 times higher in worst cases).
The main goal of the second set of experiments is to verify if SERAPH is able to
meet the delay requirements of each application as the number of applications
increases. We can observe in Fig. 6 that SERAPH has a better performance in terms
of delay compared to the other algorithms. As the number of applications simul-
taneously running in different WSNs increases, the data traffic and, consequently,

Fig. 6 Delay with a different number of applications


108 C.M. de Farias et al.

the packet loss rate also increase thus leading to message retransmissions or service
failure. Due to these factors there is an increase in the delay. In SERAPH, multiple
applications share nodes and services reducing data traffic on the WSNs and,
consequently leading to the delay reduction. We can see that while SERAPH’s
delay goes from 48 ms (2 APPS) to 122 ms as the number of applications increases,
the Naive Approach goes from 56 ms (2 APPS) to 157 ms (10 APPS). Although the
network delay can be reduced by sharing common services (tasks), the tasks
duration cannot be reduced in our experiments. FRG had the worst result, going
from 64 ms (2 APPS) to 183 ms (10 APPS), in relation to other algorithms since it
is a greedy algorithm that searches for all available nodes sacrificing not only
network lifetime but also increasing delay. SACHSEN presented delay values close
to SERAPH since both algorithms choose the best node according to their own
criteria. However, SERAPH presents a better delay result than SACHSEN since
SERAPH’s criteria includes delay as a factor for choosing the best node.
Taking into consideration the results of average packet loss rate and delay, in the
scenario with 10 applications, SERAPH was able to meet the specified QoS
requirements of 92 % of applications while Naive Approach, FRG and SACHSEN
were able to meet the specified QoS requirements of only 54, 81 and 84 % of
applications respectively. This leads us to the conclusion that SERAPH can
properly meet the applications requirements in terms of delay and packet loss.

5.5 Experiments Evaluating Adaptability

In order to evaluate the advantages of SERAPH’s adaptability, we have performed a


set of experiments by varying the number of applications simultaneously running in
different WSNs. In this set of experiments, we evaluated SERAPH’s efficient use of
sensor resources (in terms of ASR and network lifetime) with and without the role
adaptation feature. We have repeated the same set of experiment used in
(Sect. 5.3).
As shown in Fig. 7, we observed that the network lifetime values for Naïve
Approach and SERAPH approach with and without role adaptation decrease as the
number of applications increases. As Fig. 7 shows, we can also see that both
SERAPH approaches (with and without role adaptation) present better network
lifetime results than the Naïve Approach (at least 25 % of improvement) thanks to
its capacity of adapting to the network conditions in terms of packet loss and delay.
This happens because as the number of applications simultaneously running in
different WSNs increases, also increase the number of transmissions and thus the
packet loss and delay.
We can also see that SERAPH approach with role adaptation presents better
network lifetime results than the SERAPH approach without this feature (at least
SERAPH: Service Allocation Algorithm for the Execution … 109

Fig. 7 Adaptability impact in terms of network lifetime

10 % of improvement) since the latter has more chance to select a suitable node to
perform the specific service from its role-assignment mechanism.
As shown in Fig. 8, we observed that ASR values for Naïve Approach and
SERAPH approaches with and without role adaptation decrease as the number of
applications increases.
We can also see in Fig. 8 that both SERAPH approaches (with and without role
adaptation) present better ASR than the Naïve Approach (at least 8 % of
improvement) due to their capacity of adapting to the network conditions in terms
of packet loss and delay. This happens because as the number of applications
simultaneously running in different WSNs increases, the number of transmissions
increases and thus the packet loss and delay is also increased.

Fig. 8 Adaptability impact in terms of ASR


110 C.M. de Farias et al.

Table 1 Changes of node roles during the experiment


2 APPS 4 APPS 6 APPS 8 APPS 10 APPS
% of roles changes during the 8 15 23 38 48
experiment

We can also see that SERAPH approach with role adaptation presents better
ASRs than the SERAPH approach without role adaptation (at least 10 % of
improvement) since it has more chance to allocate a task to a suitable node. This
happens because SERAPH approach with role adaptation allows sensor nodes to
have multiple roles. Additionally, we can observe that the difference between the
ASR in SERAPH approach with role adaptation with 2 APPs and 10 APPs is 4 %
and the difference between the ASR in SERAPH approach without role adaptation
with 2 APPs and 10 APPs is 11 %.
Another interesting conclusion in Table 1 is how the role adaptation is important
to allocate tasks successfully. In the experiments, if we consider the percentage of
nodes that have changed their roles to accommodate the arriving applications, we
are able to see how important the adaptability is to SERAPH. As the application
number increases, the percentage of changes in nodes roles is increased from 8 %,
with 2 APPS, to 48 % with 10 APPS.

6 Conclusion

In this paper, we presented a service selection and allocation algorithm called


SERAPH for execution of multiple applications in heterogeneous service-oriented
SSNs. SERAPH exploits common services to make energy-efficient service-sensor
assignments. In addition, it explicitly takes full advantage of different sensor roles,
dynamically adapting such roles to network condition changes. Experimental
results show that SERAPH produces promising results in terms of ASR and net-
work lifetime.
In future work, we will extend the algorithm to work in distributed manner. In
such case, each node will have to contribute to evaluate the WSN, taking into
account that each service contributes with a different QoS value to the application,
and consumes different amount of network resources. Our algorithm will need to
decide which services have to be completed in real-time to meet the minimum
requirements of applications, while maximizing the system utility for all the
applications without using a centralized entity to make decisions.
SERAPH: Service Allocation Algorithm for the Execution … 111

References

1. Gubbi, J., Buyya, R., Marusic, S., Palaniswami, M.: Internet of things (IoT): a vision,
architectural elements, and future directions. Future Gener. Comput. Syst. 29(7), 1645–1660
(2013)
2. Billet, B., Issarny, V.: From task graphs to concrete actions: a new task mapping algorithm for
the future internet of things. In: 11th IEEE International Conference on Mobile Ad Hoc and
Sensor Systems (MASS), pp. 470–478, Oct 2014
3. Fortino, G., Guerrieri, A., Russo, W., Savaglio, C.: Middlewares for smart objects and smart
environments: overview and comparison. In: Internet of Things Based on Smart Objects,
pp. 1–27. Springer, Berlin (2014)
4. Li, W., Delicato, F.C., Zomaya, A.Y.: Adaptive energy-efficient scheduling for hierarchical
wireless sensor networks. ACM Trans. Sen. Netw. 9(3), 1–34 (2013)
5. Fortino, G., Giannantonio, R., Gravina, R., Kuryloski, P., Jafari, R.: Enabling effective
programming and flexible management of efficient body sensor network applications. Hum.
Mach. Syst. IEEE Trans. 43(1), 115–133 (2013)
6. Leontiadis, I., Efstratiou, C., Mascolo, C., Crowcroft, J.: SenShare: transforming sensor
networks into multi-application sensing infrastructures. In: Picco, G., Heinzelman, W. (eds.)
Wireless Sensor Networks, pp. 65–81. Springer, Berlin (2012)
7. de Farias, C.M., Pirmez, L., Delicato, F.C., Li, W., Zomaya, A.Y., De Souza, J.N.: A
scheduling algorithm for shared sensor and actuator networks. In: IEEE International
Conference on Information Networking (ICOIN), pp. 648–653, Jan 2013
8. Li, W., Delicato, F.C., Pires, P.F., Zomaya, A.Y.: Energy-efficient three-phase service
scheduling heuristic for supporting distributed applications in cyber-physical systems. In:
Proceedings of the 15th ACM International Conference on Modeling, Analysis and Simulation
of Wireless and Mobile Systems, Paphos, Cyprus, pp. 229–238 (2012)
9. Geyik, S., Szymanski, B., Zerfos, P.: Robust dynamic service composition in sensor networks.
Serv. Comput. IEEE Trans. 6(4), 1–1 (2012)
10. Bell, M.: SOA Modeling Patterns for Service Oriented Discovery and Analysis. Wiley,
London (2010)
11. Cheng, B.C., Lemos, R., Giese, H., Inverardi, P., Magee, J., Andersson, J., Becker, B.,
Bencomo, N., Brun, Y., Cukic, B., Marzo Serugendo, G., Dustdar, S., Finkelstein, A., Gacek,
C., Geihs, K., Grassi, V., Karsai, G., Kienle, H., Kramer, J., Litoiu, M., Malek, S., Mirandola,
R., Müller, H., Park, S., Shaw, M., Tichy, M., Tivoli, M., Weyns, D., Whittle, J.: Software
engineering for self-adaptive systems: a research roadmap. In: Cheng, B.C., Lemos, R., Giese,
H., Inverardi, P., Magee, J. (eds.) Software Engineering for Self-Adaptive Systems, pp. 1–26.
Springer, Berlin (2009)
12. Rouvoy, R., Eliassen, F., Floch, J., Hallsteinsen, S., Stav, E.: Composing components and
services using a planning-based adaptation middleware. In: Pautasso, C., Tanter, É. (eds.)
Software Composition, pp. 52–67. Springer, Berlin (2008)
13. Fortino, G., Guerrieri, A., Russo, W.: Agent-oriented smart objects development. In: IEEE
16th International Conference on Computer Supported Cooperative Work in Design
(CSCWD), pp. 907–912, May 2012
14. Rao, J., Su, X.: A survey of automated web service composition methods. In: Cardoso, J.,
Sheth, A. (eds.) Semantic Web Services and Web Process Composition, pp. 43–54. Springer,
Berlin (2005)
15. Fok, C.-L., Roman, G.-C., Lu, C.: Adaptive service provisioning for enhanced energy
efficiency and flexibility in wireless sensor networks. Sci. Comput. Program. 78(2), 195–217
(2013)
112 C.M. de Farias et al.

16. Paschoalino, R., Madeira, E.R.M.: A scalable link quality routing protocol for multi-radio
wireless mesh networks. In: Proceedings of 16th International Conference on Computer
Communications and Networks (ICCCN), pp. 1053–1058, 13–16 Aug 2007
17. Efstratiou, C., Leontiadis, I., Mascolo, C., Crowcroft, J.: A shared sensor network
infrastructure. In: Proceedings of the 8th ACM Conference on Embedded Networked
Sensor Systems (SenSys’10), pp. 367–368. ACM, New York (2010). doi:10.1145/1869983.
1870026
18. Xu, Y., Saifullah, A., Chen, Y., Lu, C., Bhattacharya, S.: Near optimal multi-application
allocation in shared sensor networks. In: Proceedings of the Eleventh ACM International
Symposium on Mobile Ad Hoc Networking and Computing, Chicago, pp. 181–190 (2010)
19. Bhattacharya, S., Saifullah, A., Lu, C., Roman, G.-C.: Multi-application deployment in shared
sensor networks based on quality of monitoring. In: 2010 16th IEEE Real-Time and
Embedded Technology and Applications Symposium, pp. 259–268 (2010). doi:10.1109/
RTAS.2010.20
20. Wu, C., Xu, Y., Chen, Y., Lu, C.: Submodular game for distributed application allocation in
shared sensor networks. In: Proceedings of IEEE Conference on INFOCOM, pp. 127–135,
Mar 2012
21. Edalat, N., Xiao, W., Motani, M., Roy, N., Das, S.K.: Auction-based task allocation with trust
management for shared sensor networks. Secur. Commun. Netw. 5(11), 1223–1234 (2012)
22. Siu-Nam, C., Chan, A.T.S.: Dynamic QoS adaptation for mobile middleware. Softw. Eng.
IEEE Trans. 34(6), 738–752 (2008)
23. Floch, J., Hallsteinsen, S., Stav, E., Eliassen, F., Lund, K., Gjorven, E.: Using architecture
models for runtime adaptability. Softw. IEEE 23(2), 62–70 (2006)
24. Geihs, K., Barone, P., Eliassen, F., Floch, J., Fricke, R., Gjorven, E., Hallsteinsen, S., Horn,
G., Khan, M.U., Mamelli, A., Papadopoulos, G.A., Paspallis, N., Reichle, R., Stav, E.: A
comprehensive solution for application-level adaptation. Softw. Pract. Experience 39(4), 385–
422 (2009)
25. Fortino, G., Guerrieri, A., O’Hare, G.M., Ruzzelli, A.: A flexible building management
framework based on wireless sensor and actuator networks. J. Netw. Comput. Appl. 35(6),
1934–1952 (2012)
26. Li, W., Delicato, F.C., Pires, P.F., Lee, Y.C., Zomaya, A.Y., Miceli, C., Pirmez, L.: Efficient
allocation of resources in multiple heterogeneous wireless sensor networks. J. Parallel Distrib.
Comput. 74(1), 1775–1788 (2014)
27. Li, W., Vesilo, R.: Modeling of session persistence in web server systems. In: Australian
Telecommunications Networks and Application Conference, Melbourne (2006)
28. Delicato, F., Protti, F., Pirmez, L., de Rezende, J.F.: An efficient heuristic for selecting active
nodes in wireless sensor networks. Comput. Netw. 50(18), 3701–3720 (2006)
29. Garlan, D., Shang-Wen, C., An-Cheng, H., Schmerl, B., Steenkiste, P.: Rainbow:
architecture-based self-adaptation with reusable infrastructure. Computer 37(10), 46–54
(2004)
30. Herrera, F., Herrera-Viedma, E.: Linguistic decision analysis: steps for solving decision
problems under linguistic information. Fuzzy Sets Syst. 115(1), 67–82 (2000)
31. Reyes, J.A.G., Robles, R.S., Recéndez, B.E.S., Olague, J.G.A.: Implementation of a
timestamping service for SunSPOT sensors. Procedia Technol. 7, 4–10 (2013). ISSN
2212-0173, http://dx.doi.org/10.1016/j.protcy.2013.04.001
32. Rowaihy, H., Johnson, M.P., Liu, O., Bar-Noy, A., Brown, T., Porta, T.L.: Sensor-mission
assignment in wireless sensor networks. ACM Trans. Sen. Netw. 6(4), 1–33 (2010)
33. Noh, A.S.-I., Lee, W.J., Ye, J.Y.: Comparison of the mechanisms of the zigbee’s indoor
localization algorithm. In: International Conference on Software Engineering, Artificial
Intelligence, Networking, and Parallel/Distributed Computing, 2008 (SNPD’08), pp. 13, 18,
6–8 Aug 2008. Ninth ACIS
SERAPH: Service Allocation Algorithm for the Execution … 113

34. Xiong, S., Li, J., Li, M., Wang, J., Liu, Y.: Multiple task scheduling for low-duty-cycled
wireless sensor networks. In: INFOCOM’11
35. Ting, Z., Mohaisen, A., Yi, P., Towsley, D.: DEOS: dynamic energy-oriented scheduling for
sustainable wireless sensor networks. In: Proceedings of IEEE on INFOCOM, pp. 2363–2371,
25–30 Mar 2012
36. Shuguang, X., Jianzhong, L., Zhenjiang, L., Jiliang, W., Yunhao, L.: Multiple task scheduling
for low-duty-cycled wireless sensor networks. In: Proceedings of IEEE on INFOCOM,
pp. 1323–1331, 10–15 April 2011

You might also like