<!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>Adaptation of Service-Based Context- Aware Applications with FraSCAti Platform</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Abdelkader Bouguessa</string-name>
          <email>abdelkader.bouguessa@gmail.com</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Boudjemaa Boudaa</string-name>
          <email>boudjemaa.boudaa@univ-tiaret.dz</email>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Leila Amel Mebarki</string-name>
          <email>leilamel.mebarki@gmail.com</email>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Department of Computer Science Ibn, Ibn Khaldoun University</institution>
          ,
          <addr-line>Tiaret</addr-line>
          ,
          <country country="DZ">Algeria</country>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>Department of Computer Science, Ibn Khaldoun University</institution>
          ,
          <addr-line>Tiaret</addr-line>
          ,
          <country country="DZ">Algeria</country>
        </aff>
      </contrib-group>
      <pub-date>
        <year>2014</year>
      </pub-date>
      <fpage>2</fpage>
      <lpage>4</lpage>
      <abstract>
        <p>- The dynamic adaptation of running service-based applications without stopping has long been shown to be more than a dream for designers and developers. Recently, several works have been proposed in the literature, where most of them do not have a clear and complete process of adaptation or count on a specific plat-form that decreases the use of these adaptable large-scale applications. This paper aims to present a context-aware dynamic adaptation that covers techniques for handling the impact of context changes onto the execution of context-aware applications. We propose a comprehensive solution with software architecture that enables the dynamic adaptation of services built by assembling components, depending on context execution. This architecture is based on SCA (Service Component Architecture) specification, and implemented with the FraSCAti platform. The SCA specification guarantees pure component assembly and the FraSCAti platform guarantees the automatic reconfiguration. A case study of a modern tourism agency is treated by the proposed adaptation solution in order to exhibit its feasibility.</p>
      </abstract>
      <kwd-group>
        <kwd>- Dynamic Adaptation</kwd>
        <kwd>Context-awareness</kwd>
        <kwd>Service-based applications</kwd>
        <kwd>FraSCAti</kwd>
        <kwd>MAPE</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>1. INTRODUCTION</title>
      <p>
        Advances in technology allow us to design
efficient applications, where their contextual
conditions are different. In order to meet specific
needs, components or services of these
applications can act synergistically and
communicate with each other within one or
different operating systems and across two or
more connected computers. The agility,
reliability, flexibility and reusability that the
service-based architecture (SOA) [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ] promises
are the main raisons of building service-based
applications (SBAs) on such an architecture. This
development, if properly designed and
implemented, will make these SBAs (such as
healthcare, travel, aerospace and defense
applications) able to discover and compose
services at runtime, thus fulfilling ever-changing
requirements. Based on the combination of
Service-Oriented Architecture (SOA) and
Component-Based Software Engineering
(CBSE) [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ] principles, the evolving paradigm
SCA [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ] is principally elaborated to realize
largescale systems and distributed applications.
Regardless to communication protocols or
programming languages, SCA standard aims to
define a set of services in one architecture that
stands on four specifications: assembly
language, component implementations, bindings,
and policies [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ]. This paper describes a support
to the execution of service-based applications
that may require adaptation to tackle changing
user context, or even altering environment. Due
to the situation where the services may become
available or not during the execution of the
application, this concept helps constructing
service-based applications that are capable to
autonomously adapting, and consequently
involve the evaluation of novel changes to its
current design. The goal is to propose a
complete process of adaptation that does not
count on a specific platform in order to increase
the use of these adapt-able large-scale
applications within open, dynamic, and
distributed environments.
A general definition of context provided by Dey et
al. [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ] is stated as “any in-formation used to
characterize the situation of entities (i.e., whether
a person, place, or object) that are considered
relevant to the interaction between a user and an
application, including the user and the application
themselves. Context is typically the location,
identity, and state of people, groups,
computational and physical objects”. The
Context-awareness concept that our solution
depends on, determines an application’s
behavior, it can be also defined as a response
component used to manage environmental
awareness issues as well as unforeseen
changes by providing better information to
designers, and hence they would dynamically
adjust their applications.
      </p>
      <p>
        The particularity of our proposal is to consider
the work of Dey et al. [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ] that introduced the idea
of adaptation by defining context-awareness as a
leading concept to the automation of a software
system, and to use the FraSCAti plat-form as a
run-time support for SCA, which offers
management features that allow us to easily
perform dynamic adaptation. Intended to
implement context-aware applications that can
dynamically change or adapt their behavior
based on their context, our proposed solution is
presented through an interesting Tourism
Agency System case study, where it seeks
mainly to help travelers finding their suitable
destinations in the appropriate time based on
monitored information provided by various
services. The rest of the paper is organized as
follows. Section 2 discusses related work.
Section 3 proposes a strategy of dynamic
adaptation for service-based applications in
which a functional architecture based on
adaptation module is detailed. Finally, section 4
reports our Tourism Agency System case study
while section 5 concludes this paper, and
indicates our future work.
      </p>
    </sec>
    <sec id="sec-2">
      <title>2. RELATED WORK</title>
      <p>
        Various researches found in the literature with
the objective to support the dynamic adaptation,
notably Context Toolkit [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ], SECAS [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ],
COSMOS [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ] and WildCAT [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ], have tried to
realize frameworks that make applications
adaptable. However, most of them proposed
incomplete adaptation approaches; where some
works performed dynamic adaptation depending
on a given infrastructure, and others are limited
to an application domain [
        <xref ref-type="bibr" rid="ref12">12</xref>
        ]. To the best of our
knowledge, SAFRAN [
        <xref ref-type="bibr" rid="ref9">9</xref>
        ] and Dynaco [
        <xref ref-type="bibr" rid="ref10">10</xref>
        ] are
two important works, which present clear
dynamic adaptation strategies. SAFRAN enables
the creation of self-adaptive applications, and
Dynaco offers an adaptation framework,
originally designed for applications on grids.
According to these two generic frameworks, the
adaptation is separated into phases in order to
perform several types of adaptations. The MAPE
model [
        <xref ref-type="bibr" rid="ref11">11</xref>
        ] becomes now a standard reference
for specifying a way to divide the different
adaptation phases. The limit of these two works
is that they are intended to the reconfiguration of
component-based applications. Concerning
dynamic adaptation of service-based
applications, we will consider the generic
framework presented by Andrés et al. in [
        <xref ref-type="bibr" rid="ref12">12</xref>
        ] to
specify different kinds of adaptation in various
environments. The authors tackled in detail the
four functionalities of the MAPE model [
        <xref ref-type="bibr" rid="ref11">11</xref>
        ] (see
section C). Nevertheless, the main difference
between their proposition and ours is the
technologies, techniques and infrastructure. Our
selection of FraSCAti platform is motivated by its
ability of customization depending on the
designer needs; also, it carries runtime
reconfiguration capabilities into a SCA
environment.
      </p>
    </sec>
    <sec id="sec-3">
      <title>3. A DYNAMIC ADAPTATION OF CONTEXT</title>
    </sec>
    <sec id="sec-4">
      <title>AWARE APPLICATIONS</title>
      <p>In this section, we will introduce and define the
elements of our solution, by mentioning the
adaptation fields. We will mention then existing
adaptation types, and discuss in detail the ones
that we focus on in our work. At the end of this
section, we will present our proposed solution,
which target dynamic adaptation for
contextaware application, and describe each phase of
the MAPE model. Cloud Computing, mobile
computing, and others are among the research
areas that introduce the challenge of applications
adaptation, and the ability to reconfigure them so
that they will be able to adapt themselves to their
executions environment. Adaptation can be
considered as the process of modifying an
application in order to fit new situations and
satisfy specific requirements. An application
should be adjusted if its execution context has
been changed. Context-aware applications
should adapt themselves at run-time, for many
different purposes, in particular, to deal with the
amount of available resources, and by using
more efficient program, the user needs will be
better satisfied. Note that introducing facilities for
context-aware adaptation in exiting code is a
very difficult task.</p>
    </sec>
    <sec id="sec-5">
      <title>3.1. Adaptation types</title>
      <p>
        Adaptation types can be defined as mechanisms,
which enable the application to react in order to
fulfill specific adaptation needs, regarding the
evolutions of the context. These are the five
possible types of adaptation strategies [
        <xref ref-type="bibr" rid="ref9">9</xref>
        ]:
parametric adaptation, functional adaptation,
structural adaptation, behavioral adaptation, and
the environmental adaptation. For the purpose of
better control the parametric adaptation [
        <xref ref-type="bibr" rid="ref13">13</xref>
        ], our
solution will touch only input and output service
parameters. The process of modifying those
parameters will be not only to ensure the proper
functioning but also to leverage new possibilities,
which can appear dynamically.
      </p>
      <p> Input parameter. This parameter
comprises the population of operation
parameters based on context. One or
more parameters values of the request
message are replaced with values
related to contextual information.
 Output parameter. Response
manipulation is also a context-based;
where the service responses can be
manipulated and modified. The
adaptation is done after the service has
executed and constructed a response.
This can have sorting or filtering
operations, for instance.</p>
    </sec>
    <sec id="sec-6">
      <title>3.2. Solution overview</title>
      <p>This paper presents a novel approach that
aims at dynamically adapting the execution of
the service-based applications at runtime in
case of context changes. As shown in Fig. 1,
our proposal relies on four main layers;
where, it is important to emphasize that the
observation process is done at each layer of the
architecture, and equally the adaptation
schedules may also be performed at different
layers as needed.
3.2.1.</p>
      <sec id="sec-6-1">
        <title>OS &amp; hardware layer</title>
        <p>This level is the infrastructure that constitutes
the context source. For example, in case new
OS policies become available, this level may
require dynamic adaptation.
3.2.2.</p>
      </sec>
      <sec id="sec-6-2">
        <title>FraSCAti Platform layer</title>
        <p>
          At this level, explorer can detect that a service
appears or disappears; that means keeping
under observation various services’ progresses.
FraSCAti [
          <xref ref-type="bibr" rid="ref14">14</xref>
          ], which is a reflective platform for
deploying, hosting, and managing SCA
applications, its different subsystems are
implemented as SCA components. FraSCAti
provides a homogeneous view of a middleware
software stack where the platform, the
nonfunctional services, and the applications are
uniformly designed and implemented with the
same component-based and service-oriented
paradigm. This platform has the particularity of
facilitating the process of dynamic adaptation of
SCA components. Our work is motivated by the
fact that FraSCAti is a general model, i.e. it is not
specific to an application domain [
          <xref ref-type="bibr" rid="ref15">15</xref>
          ]. Moreover,
it is an extension of the Fractal model, in other
words, it contains the various basic concepts
shared by most other models. Technically, the
FraSCAti model is very flexible, allowing for
many dynamic reconfigurations and especially is
designed primarily to be easily extended, and it
allows the addition of new features. Likewise, an
application built using FraSCAti is seen as a set
of components and services, these components
communicate with each other through referrals.
The extension of the FraSCAti model provides
better support for synchronization of different
application entities during the adaptation
process. This dynamic model offers also all the
basic functionalities we need without making it
more complex than necessary, allowing us to
easily integrate our work into the framework of
the model itself.
        </p>
      </sec>
      <sec id="sec-6-3">
        <title>3.2.3. Service-based applications layer</title>
        <p>
          The end user interacts directly with this layer,
which represents the application he is using; an
adaptation may be triggered via an adaptor, in
case the user changes his requirements, which
can be detected via an explorer. As obvious in
Fig. 1, the present layer contains service-based
applications (SBA) with Service Component
Architecture (SCA), which defines a general
approach that can exploit components, and
describe how they work together. In particular,
SCA specification defines how to create
components and how to combine them into
complete applications [
          <xref ref-type="bibr" rid="ref16">16</xref>
          ]. Regardless of the
language used to build the components of an
SCA application and beyond the component
technology used, SCA defines a common
assembly mechanism for specifying how these
elements are gathered within applications. The
SCA platform is a framework designed for the
development of service-based applications. The
main characteristic of this platform is that it
supports a wide variety of programming
languages for implementing and defining
interfaces as well as components. SCA does not
offer a new programming language, or a new
technology for accessed services, but it can
assemble all these existing technologies [
          <xref ref-type="bibr" rid="ref17">17</xref>
          ].
Beyond the advantages inherent to this
approach, SCA allows easy integration of
existing non-SCA development. One more
feature of the present platform is the policies
that are defined outside the code performing the
service may be changed without impact on the
application code, which will save time and
money by allowing the developer to focus on
business logic.
        </p>
      </sec>
      <sec id="sec-6-4">
        <title>3.2.4. Adaptation module layer</title>
        <p>
          WSensors in this level can listen multiple
explorers and push various events directly given
to the adaptation module, whose function is not
only to keep the application running, but also to
make the best reconfiguration based on the new
possibilities that may appear during its
execution. According to the MAPE model [
          <xref ref-type="bibr" rid="ref11">11</xref>
          ],
the adaptation module is divided into four main
phases: Monitoring or observation, Analysis or
Decision, Planning, and Execution.
        </p>
        <p>In the next section, we will describe in more
detail the MAPE module as well as techniques
and technologies related to each phase of it.</p>
      </sec>
    </sec>
    <sec id="sec-7">
      <title>3.3. Adaptation module</title>
      <p>
        This section will give some details about our
implementation that relies on the adaptation
module. This last is responsible for managing
the dynamic adaptation of context-aware
service-based application. The MAPE model
[
        <xref ref-type="bibr" rid="ref11">11</xref>
        ] divides this module into four phases (Fig. 1):
      </p>
      <sec id="sec-7-1">
        <title>3.3.1. The observation phase</title>
        <p>
          The first phase of the MAPE model corresponds
to the observation. It consists of monitoring the
context of the application in order to detect
changes that need adaptation. This context can
change from available system resources
(bandwidth, CPU, etc.) to the user preferences
and environmental properties (weather, time,
etc.) [
          <xref ref-type="bibr" rid="ref15">15</xref>
          ]. Monitoring the environment (execution
context) of the application and/or the application
itself is the detection of the occurrence of certain
circumstances requiring adaptation. This step
can be implemented using context-aware
adaptive application. The technology we used in
this phase is WildCAT, a Generic Framework for
Context-Awareness [
          <xref ref-type="bibr" rid="ref9">9</xref>
          ]. This Framework’s
objective is to offer a pragmatic approach to
ease the creation of Context-Aware applications.
Fig. 2 depicts the main function of the WildCAT
programming interface [
          <xref ref-type="bibr" rid="ref8">8</xref>
          ], which allows
discovering the characteristics of the context,
reason on it and automatically be notified when
specific events occur. The main reasons behind
our choice of this system is the simplicity of its
use by application programmers, and it’s
considered generic, i.e. it’s not tied to a specific
application domain, moreover this system
enables and allows an efficient and custom
implementations for particular domains. The
Adaptation module is connected with each layer
through two elements; an Explorer that
measures the level’s state and extracts new
information appearing in that layer, for example
at the OS &amp; Hardware layer. The Explorer can
determine this level’s properties, such as the
number of available processors as well as RAM
capacity.
        </p>
        <p>Second element is an Adaptor that is charged of
performing adaptation within layers if necessary.
In our case every Explorer is linked by a
"WSensor". In order to monitor the execution
context and detect its changing over time,
WildCAT gives a special implementation to the
used monitors and after a certain period, the
system collects the new contextual information
so it will be notified by the occurred events,
hence the application adapts to those changes
taking into account the new contexts.</p>
      </sec>
      <sec id="sec-7-2">
        <title>3.3.2. The decision phase</title>
        <p>
          Considering the current state of the application
and depending on the new contextual
circumstances detected in the first phase, the
application must decide reconfiguration
operations to perform so it adapts to new
situations. To do this, the second phase of the
MAPE model consists on reactivating an
adaptation policy, detecting events occurring in
the context and according to these events as
well as the current state of the system, an
adaptation has to be done for this application.
How decision is made and which actions must
be performed to execute the reaction are closely
related to the information received from the
previous phase and to the goal given to dynamic
adaptation. Adaptation policies can be realized
by a rules-based inference engine, in our case
they are implemented using the Drools system.
Drools [
          <xref ref-type="bibr" rid="ref18">18</xref>
          ] is a Business Rule Management
System with a rule-based engine, more correctly
known as a Production Rule System, which
execute actions based on conditions. Drools has
an enhanced and optimized implementation of
the Rete algorithm. One of the main reasons of
using Drools in our case, is that it is flexible
enough [
          <xref ref-type="bibr" rid="ref18">18</xref>
          ] to match the semantics of the
dynamic adaptation problem. Moreover, the
various parts that compose a Drools rule may be
extended to lend any domain- specific sense to
the rule. As depicted in Fig. 3, a Drools rule has
the following structure: A set of Events, which is
the conditional parts of the rule, and a set of
Actions, which is a block that allows specific
actions to be done. The decision phase is the
start point of our solution to perform adaptation;
it relies on gathered contextual information to
decide whether the current situation requires
adaptation or not. Once this phase has decided
that an adaptation should be done, it transmits
reaction to the planning phase. The reaction
describes what kind of adaptation should be
performed.
        </p>
      </sec>
      <sec id="sec-7-3">
        <title>3.3.3. The planning phase</title>
        <p>
          This third phase consists on establishing a plan
to apply reactions given from the Decision
phase, this plan is a set of actions of various
types (environmental, structural, functional,
behavioral, or even parametric) able to change
the current state of the application into its new
state. Before applying reconfiguration
operations, we must associate those operations
to their components, this step is called weaving
of adaptation policies. To do so, our approach is
based on the aspect paradigm. Aspect-Oriented
Programming (AOP) [
          <xref ref-type="bibr" rid="ref19">19</xref>
          ] gives us mechanisms
to achieve an adaptation as a Cross-Cutting
Concern, which means to separate the
adaptation code from the functional code of the
application. The aspect includes a code that can
be grafted (or weaved) in a source code through
a program called Weaver and cut-off points or
actions. The FraSCAti platform considers the
Aspect as a component named FraSCAti Aspect
Component (FAC for short). FAC is the mapping
of the general model [
          <xref ref-type="bibr" rid="ref20">20</xref>
          ] (aspect component
(AC), aspect domain, and aspect binding) on the
FraSCAti components model. Fig. 3 illustrates
how to implement an AC by a sample source
code. ACs apply the component methods shown
by the client and server interfaces. An
implementation of the IntentHandler interface is
required when declaring an AC. The invoke
method describes the behavior of the aspect.
The parameter of the Invoke method is a
reification of a FraSCAti interface invocation. It
provides a set of methods for a joint point
introspection. The argument of the invocation
can be changed. The code written in this method
will be executed around the join point. The
“proceed” call is the original method call.
The main advantage of considering our solution
as an Aspect system is that after the observation
of changes that are significant enough, and the
decision to react to those changes, the Aspect
Component model in particular, FraSCAti
component will be able to make a plan given to
the execution phase, which addresses the
dynamicity of the execution environment.
3.3.4.
        </p>
      </sec>
      <sec id="sec-7-4">
        <title>The execution phase</title>
        <p>
          Once the system knows to what state it has to
evolve, we must define how it should do it
(execution plan) and run the adaptation. The
implementation plan will define the list of
operations to be performed by the component to
achieve its new state. Thus the order of
executing these operations. This plan can be
managed by a set of rules for an initial state and
a final state given a list of actions to perform.
The implementation of the adaptation is the
most sensitive part. At this level, the component
knows the order of execution of adaptation
operations. Although it supports all the features
we need, the FraSCAti platform specified as a
set of application programming interfaces
(APIs). This form does not fit the way we use: it
is impossible to guarantee the consistency of
reconfigurations performed, the corresponding
code is very complex and incomprehensible and
specific concepts of FraSCAti does not exist
directly in Java. These limitations have led us to
choose FScript [
          <xref ref-type="bibr" rid="ref21">21</xref>
          ] a language dedicated for the
specification and the execution of application
and FraSCAti components reconfiguration,
FScript includes FPath [
          <xref ref-type="bibr" rid="ref21">21</xref>
          ] another language
used to navigate inside FraSCAti architecture.
FPath can only write expressions and does not
have control structures. An FPath expression
evaluates without side effects and always
returns a value, which can be one of the
following types: general classic types (numbers,
string and Boolean) and specific types for FPath
(homogeneous set of components of interfaces
or attributes). A path is a specific expression
FPath. This type of expression allows browsing
and selecting items inside FraSCAti
architectures, with another word FPath is a way
to select a set of node that meets certain criteria
by navigating along the arcs. To do this, a path
consists of a set of successive steps, separated
by a slash. Each of these steps is itself divided
into three parts: an axis, a test and a collection
of predicate possibly empty. The concrete
syntax of a path is:
        </p>
        <p>axe1::test1[pred1]/axe2::test2[pred2]/...
The axis is an indenting from a finite set, which
corresponds to the possible labels for arcs. The
test is either a name (identifier) or a star *.
Predicates are complete FPath expressions
evaluated for their Boolean values. We now
describe the FScript language. Compared to
FPath, FScript adds the ability to define new
functions (used in FPath expressions) and
especially reconfiguration actions, which unlike
functions are able to modify the architecture of
FraSCAti components. For this, FScript supports
a number of control structures and especially
enriches the FPath "standard library" with a set
of primitive actions that act on FraSCAti
components. An FScript program consists of a
set of functions and actions. The difference
between the two is that the functions are strictly
no side effect on the architecture FraSCAti: Only
actions can invoke other actions. The only
syntactic difference between functions and
actions appear in their definitions. Functions are
introduced by the keyword function while actions
use the keyword action. The body defining a
process consists of a sequence of instructions.</p>
      </sec>
    </sec>
    <sec id="sec-8">
      <title>4. Tourism agency case study</title>
      <p>Aimed at improving our proposed architecture
and its implementation, we have chosen
“Tourism agency System” as an illustrative case
study, which is one of the most important and
required services in the market at the global
scale. This web application shown in Fig. 4,
allows the visitor to find a destination among
different touristic regions or events belong to the
visited country, which is located by the system
based on the visitor IP address. It also provides
a chronological classification for each touristic
site so the visitor can easily move to the
selected destination. To get there, he can
choose a conveyance from a given list with the
price of each one, after that the total of the tour
is calculated automatically by the system. In
order to strengthen and develop a context-aware
Web application (reconfigurable), we have
added other functions to the previous features
by using the power of social networking tools
(Twitter or Facebook in our case) to gather the
user’s contextual information based on his
account preferences. At the end of the whole
process, the application offers a conversion of
the calculated total price using the currency of
the visitor in accordance with the exchange rate.
To more clarify the implementation of this
runtime adaptation, Fig. 4 illustrates the tourism
agency services composite, which covers four
components representing the following services:
The "Tourism Agency Component" encapsulates
all calls to other services; it also contains two
properties that describe the expected user input:
Twitter or Facebook account, plus the date of
the visit. The second service "Visiting Service
Component" displays the list of the touristic
areas according to the user preferences and his
current detected location from his IP address. It
also suggests indoors and outdoors places in a
specific order referring to the user favorites, and
time conditions; for example if the condition time
is good it proposes both of places, while only
indoors places will be recommended if the
condition time is bad. The "Travel Service
Component" displays the list of available means
of transport leading to the selected site and a
map between his current location and the
selected destination. The last service "Banking
Service Component" converts the calculated
total, which consists of two prices: the visit price,
and the transport price.</p>
      <p>Fig. 5 demonstrates two possible scenarios
seamlessly supported by our new architectural
solution. In the first scenario (Fig. 5.Case1), the
application starts by the observation phase and
shows (Fig. 5.A) in the home page. When the
user introduces no input information, i.e. no
contextual changes are applied; the system
displays his current location detected from his IP
address, as well as a brief description of that
area and its corresponding weather information.
After selecting the suitable site (Fig. 5.D); which
represents a contextual change for the
application, this last reacts by showing some
information about the located area and a table of
the current conditions and forecasts including
seven day outlook (Fig. 5.E). When the user
chooses a day from this showing table, which
means that the application has detected another
contextual change and needs to be adapted
again, the process of adaptation is applied for
the second time. The application shows a list of
means transports with their prices, a map that
helps the user to reach the visiting location will
be displayed as well (Fig. 5.F). The total prices
will be shown (Fig. 5.G) only after the selection
of a mean traveling. This scenario depends
always on the user interaction.</p>
      <p>In the second scenario (Fig. 5.Case2), the user
introduces his Facebook or Twitter username as
an input, which allows detecting contextual
changes during the first phase of the MAPE
model (the observation phase) as long as the
user updates his account settings and
preferences and attempt to use our web
application. Liked pages, visited areas, tweets,
and others factors can permit the application to
decide (at the decision phase) automatically and
then plans a new action (at the planning phase)
to propose when using the application. In the
end those plans will be executed (Fig. 5.B) at
the execution phase. The second one that
covers more dynamicity explains our
implemented solution (Fig. 5.C) which consists
of auto-charging different displayed information
such as the selected touristic area, the preferred
visiting day, and the mean of transport. All these
features will help the visitor to make suitable
decisions, save time and money.</p>
      <p>The strength of the services offered by the
“Tourism Agency” resides on the fact that
defining at design time all possible contexts and
their evolutions is not obligatory needed. That
means that the agency system will be drastically
able to plan and react even with the unexpected
context changes, hence specific user’s
requirements will be satisfied according to the
adaptation strategy.</p>
      <p>The main contribution of this proposal is the
strength architecture that has been illustrated
with the above-described case study, in which
we applied the MAPE Model for developing
adaptive service-based applications. We also
demonstrated how the specific features of the
FraSCAti platform could be exploited during the
application’s adaptation process, and then how
the defined dynamic adaptation strategy can be
used to develop high quality, flexible, and
scalable service-based applications.</p>
    </sec>
    <sec id="sec-9">
      <title>5. Conclusion</title>
      <p>The present work stands on the FraSCAti
Platform used to develop and adapt dynamically
the SCA-based context-aware applications. SCA
is a standard for the distribution of
ServiceOriented Architectures (SOA). The novelty of
FraSCAti is to bring the adaptation of
applications during their execution according to
changes in their context. The solution provided
in this work is performed by a case study on
tourism services by presenting a variety of
choices in order to satisfy customer’s needs.
Aiming at making the application benefit from
appearing contexts. In addition, other examples
can also verify the feasibility of the proposed
solution and demonstrate the effectiveness of
the dynamic adaptation using FraSCAti. Our
future work is to strengthen the flexibility, and
the semantic of the decision phase by utilizing
other
rule-based
engines
as
combining
Moreover,</p>
      <p>OWL, and
we
want to fully
achieve
scripts
rules
other
aspects of contextual adaptation by addressing
the behavioral aspect
component’s behavior),
(changes
and the
of SCA
structural
aspect of a SCA composite (changes in the
structure of the components).</p>
    </sec>
    <sec id="sec-10">
      <title>6. REFERENCES</title>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <given-names>N.</given-names>
            <surname>Bieberstein</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Bose</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Fiammante</surname>
          </string-name>
          ,
          <string-name>
            <given-names>K.</given-names>
            <surname>Jones</surname>
          </string-name>
          , and
          <string-name>
            <given-names>R.</given-names>
            <surname>Shah</surname>
          </string-name>
          , “
          <article-title>Service-Oriented Architecture Compass : Business Value, Plan-ning,</article-title>
          and Enterprise Roadmap,”
          <string-name>
            <surname>Prentice Hall</surname>
            <given-names>PTR</given-names>
          </string-name>
          , Upper Saddle River, NJ, USA,
          <year>2005</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <given-names>J.Q.</given-names>
            <surname>Ning</surname>
          </string-name>
          , “
          <article-title>Component-Based Software Engineering</article-title>
          (CBSE),
          <source>” In 5th International Symposium on Assessment of Software Tool (SAST'97)</source>
          ,
          <year>1997</year>
          , pp.
          <fpage>34</fpage>
          -
          <lpage>43</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <given-names>M.</given-names>
            <surname>Beisiegel</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Booz</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Colyer</surname>
          </string-name>
          and
          <string-name>
            <given-names>K.</given-names>
            <surname>Team</surname>
          </string-name>
          , “Service Component Architecture,” Novomber.
          <year>2007</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <given-names>D.</given-names>
            <surname>Fournier</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P.</given-names>
            <surname>Merle</surname>
          </string-name>
          , and al.,
          <string-name>
            <surname>“ANR SCOrWare Project: WP1 - SCA Platform Specification</surname>
          </string-name>
          ,” April.
          <year>2009</year>
          , www.scorware.org/.
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [5]
          <string-name>
            <given-names>A.</given-names>
            <surname>Dey</surname>
          </string-name>
          ,
          <string-name>
            <given-names>G</given-names>
            <surname>Abowd</surname>
          </string-name>
          and
          <string-name>
            <given-names>D</given-names>
            <surname>Salber</surname>
          </string-name>
          , “
          <article-title>A Conceptual framework and toolkit for supporting the rapid prototyping of context-aware applications</article-title>
          ,”
          <year>2001</year>
          , pp.
          <fpage>97</fpage>
          -
          <lpage>166</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [6]
          <string-name>
            <given-names>T.</given-names>
            <surname>Chaari</surname>
          </string-name>
          , “
          <article-title>adapt applications to new contexts of use”</article-title>
          .
          <source>SECAS Project: INSA Lyon</source>
          ,
          <year>2006</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          [7]
          <string-name>
            <given-names>C.</given-names>
            <surname>Sophie</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C</given-names>
            <surname>Denis</surname>
          </string-name>
          , and
          <string-name>
            <given-names>T</given-names>
            <surname>Cahantal</surname>
          </string-name>
          , “
          <string-name>
            <surname>Service Management Context</surname>
            <given-names>COSMOS</given-names>
          </string-name>
          ,” ADAPT09,
          <string-name>
            <surname>September</surname>
          </string-name>
          .
          <year>2009</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          [8]
          <string-name>
            <given-names>P.C.</given-names>
            <surname>David</surname>
          </string-name>
          and
          <string-name>
            <given-names>T.</given-names>
            <surname>Ledoux</surname>
          </string-name>
          , “
          <article-title>Wildcat: a generic framework for context-aware applications,” in MPAC '05: Proceedings of the 3rd international workshop on Middleware for pervasive and ad-hoc computing</article-title>
          . New York, NY, USA: ACM,
          <year>2005</year>
          , pp.
          <fpage>1</fpage>
          -
          <lpage>7</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          [9]
          <string-name>
            <given-names>P.C.</given-names>
            <surname>David</surname>
          </string-name>
          and
          <string-name>
            <given-names>T.</given-names>
            <surname>Ledoux</surname>
          </string-name>
          , “
          <article-title>An aspectorienteach for developing selfadaptive fractal components,” in Soft-ware Composition, ser</article-title>
          .
          <source>Lecture Notes in Computer Science</source>
          , vol.
          <volume>4089</volume>
          . Springer Berlin / Heidelberg,
          <year>2006</year>
          , pp.
          <fpage>82</fpage>
          -
          <lpage>97</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          [10]
          <string-name>
            <given-names>J.</given-names>
            <surname>Buisson</surname>
          </string-name>
          ,
          <string-name>
            <given-names>F.</given-names>
            <surname>André</surname>
          </string-name>
          , and
          <string-name>
            <given-names>J.L.</given-names>
            <surname>Pazat</surname>
          </string-name>
          , “
          <article-title>Supporting adaptable applications in grid resource management systems</article-title>
          ,” in 8th IEEE/ACM International Conference on Grid Computing, Austin, USA, pp.
          <fpage>19</fpage>
          -
          <lpage>21</lpage>
          ,
          <year>September</year>
          .
          <year>2007</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          [11]
          <string-name>
            <given-names>J. O.</given-names>
            <surname>Kephart</surname>
          </string-name>
          and
          <string-name>
            <given-names>D. M.</given-names>
            <surname>Chess</surname>
          </string-name>
          , “
          <article-title>The vision of autonomic computing</article-title>
          ,” Computer, vol.
          <volume>36</volume>
          , no.
          <issue>1</issue>
          .
          <year>2003</year>
          , pp.
          <fpage>41</fpage>
          -
          <lpage>50</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          [12]
          <string-name>
            <given-names>F.</given-names>
            <surname>André</surname>
          </string-name>
          , E. Daubert, and G. Gauvrit, “
          <article-title>Towards a Generic Context Aware Framework for Self-Adaptation of ServiceOriented Architectures,” in 5th International Conference on Internet and Web Applications</article-title>
          and Services, Barcelona, Spain,
          <year>2010</year>
          , pp.
          <fpage>309</fpage>
          -
          <lpage>314</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          [13]
          <string-name>
            <given-names>M.</given-names>
            <surname>Kapitsaki</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Kateros</surname>
          </string-name>
          ,
          <string-name>
            <given-names>N.</given-names>
            <surname>Prezerakos</surname>
          </string-name>
          , S. Venieris, “
          <article-title>Model-driven development of composite context- aware web applications</article-title>
          ,
          <source>” Information and Software Technology</source>
          <volume>51</volume>
          ,
          <year>2009</year>
          , pp.
          <fpage>1244</fpage>
          -
          <lpage>1260</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref14">
        <mixed-citation>
          [14]
          <string-name>
            <surname>R.</surname>
          </string-name>
          <article-title>M´elisson</article-title>
          , P. Merle,
          <string-name>
            <given-names>D.</given-names>
            <surname>Romero</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R</given-names>
            <surname>Rouvoy</surname>
          </string-name>
          , and
          <string-name>
            <given-names>L</given-names>
            <surname>Seinturier</surname>
          </string-name>
          .
          <article-title>“Reconfigurable run-time support for distributed service component architectures</article-title>
          ,”
          <source>Automated Software Engineering</source>
          , Tool Demonstration, Antwerp Belgique,
          <year>2010</year>
          . URL http://hal.inria.fr/inria-00499477/en/.
        </mixed-citation>
      </ref>
      <ref id="ref15">
        <mixed-citation>
          [15]
          <string-name>
            <given-names>L.</given-names>
            <surname>Seinturier</surname>
          </string-name>
          , P. Merle, “
          <article-title>A ComponentBased Middleware Platform for Reconfigurable Service-Oriented Architectures</article-title>
          ,” April.
          <year>2012</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref16">
        <mixed-citation>
          [16]
          <string-name>
            <given-names>C.</given-names>
            <surname>David</surname>
          </string-name>
          , “
          <string-name>
            <surname>Introducing</surname>
            <given-names>SCA</given-names>
          </string-name>
          ,” white paper, Chappell &amp; Associates, July.
          <year>2007</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref17">
        <mixed-citation>
          [17]
          <string-name>
            <given-names>L.</given-names>
            <surname>Seinturier</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P.</given-names>
            <surname>Merle</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Fournier</surname>
          </string-name>
          ,
          <string-name>
            <given-names>N.</given-names>
            <surname>Dolet</surname>
          </string-name>
          ,
          <string-name>
            <given-names>V.</given-names>
            <surname>Schiavoni</surname>
          </string-name>
          , and
          <string-name>
            <given-names>J.B.</given-names>
            <surname>Stefani</surname>
          </string-name>
          , “
          <article-title>Reconfigurable SCA Applications with the FraSCAti Platform,”</article-title>
          <source>In Proceedings of the 6th IEEE International Conference on Service Computing (SCC'09)</source>
          , pp.
          <fpage>268</fpage>
          -
          <lpage>275</lpage>
          ,
          <year>September</year>
          .
          <year>2009</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref18">
        <mixed-citation>
          [18]
          <article-title>Drools docs</article-title>
          . http://docs.jboss.org/drools/release/5.2.0.Fin al/droolsexpert-docs/html/ch05.html.
        </mixed-citation>
      </ref>
      <ref id="ref19">
        <mixed-citation>
          [19]
          <string-name>
            <given-names>G.</given-names>
            <surname>Kiczales</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Lamping</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Mendhekar</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C.</given-names>
            <surname>Maeda</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C.</given-names>
            <surname>Lopes</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.M.</given-names>
            <surname>Loingtier</surname>
          </string-name>
          , and
          <string-name>
            <given-names>J.</given-names>
            <surname>Irwin</surname>
          </string-name>
          , “
          <string-name>
            <surname>Aspect-Oriented</surname>
            <given-names>Programming</given-names>
          </string-name>
          ,”
          <source>In Proceedings of the 11th European Conference on Object-Oriented Programming (ECOOP'97)</source>
          , volume
          <volume>1241</volume>
          <source>of LNCS</source>
          , pp.
          <fpage>220</fpage>
          -
          <lpage>242</lpage>
          . Springer, June.
          <year>1997</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref20">
        <mixed-citation>
          [20]
          <string-name>
            <given-names>N.</given-names>
            <surname>Pessemier</surname>
          </string-name>
          ,
          <string-name>
            <given-names>L.</given-names>
            <surname>Seinturier</surname>
          </string-name>
          ,
          <string-name>
            <given-names>L.</given-names>
            <surname>Duchien</surname>
          </string-name>
          , and T. Coupaye, “
          <article-title>A Model for Developing Component-Based and</article-title>
          <string-name>
            <surname>Aspect-Oriented</surname>
            <given-names>Systems</given-names>
          </string-name>
          ”
          <source>In Proceedings of the 5th International Symposium on Software Composition (SC'06)</source>
          , volume
          <volume>4089</volume>
          <source>of LNCS</source>
          , pp.
          <fpage>259</fpage>
          -
          <lpage>274</lpage>
          . Springer, March.
          <year>2006</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref21">
        <mixed-citation>
          [21]
          <string-name>
            <given-names>P.C.</given-names>
            <surname>David</surname>
          </string-name>
          , “
          <article-title>Développement de composants Fractal adaptatifs : un langage dédié à l'aspect d'adaptation</article-title>
          ,”
          <source>PhD thesis</source>
          , University of Nantes / Ecole des Mines de Nantes,
          <year>2005</year>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>