SlideShare a Scribd company logo
1 of 6
Download to read offline
Adapting Applications on the Fly
Abdelmadjid Ketfi, Noureddine Belkhatir, Pierre-Yves Cunin
Adele Team Bat C
LSR-IMAG , 220 rue de la chimie - Domaine Universitaire, BP 53
38041 Grenoble Cedex 9 France
Abstract
Traditionally, an application has to be stopped to be
adapted. This approach is not suitable for critical systems
that have to be non-stop and highly available like bank,
internet or telecommunication services. In these kinds of
systems the adaptation must take place at run-time and the
application should not be entirely stopped.
In Component-based software engineering, the old notion
of developing systems by writing code has been replaced
by assembling existing components. Adapting a
component-based application means adapting one or
more of its components, and in general, adapting a
component at run-time means disconnecting it from the
application and connecting a new version of this
component. The adaptation may also imply the
modification of the connections between components, the
migration of components from an execution site to another
or the modification of the services provided by a specific
component. In this paper, we start by a presentation of the
dynamic adaptation problem followed by a brief
description of some existing solutions. Our approach will
be presented in the last section.
1. Introduction
When it is necessary to adapt an application,
traditionally, the administrator must stop this application
for maintenance. This approach is not suitable for critical
systems that have to be non-stop and highly available like
bank, internet or telecommunication services. In these
kinds of systems the adaptation must take place at run-
time and the application should not be entirely stopped.
Some of the challenges of dynamic adaptation are how to
guarantee the consistency of the adapted application, how
to transfer the state of the old application into the new
one, how to do with the clients when the new application
does not provide the same services as the old one, etc.
Several adaptation approaches have tried to provide
efficient solutions to solve failures and introduce
modifications in a running application by affecting it as
minimal as possible. These approaches are different in
their performance, their degree of automation, their
consistency and in the granularity that they address. The
granularity means the basic entity that can be adapted.
Many solutions focused on how to replace a procedure, a
module or an object in a running application. Our work is
concentrated on component-based applications.
In Component-based software engineering, the old
notion of developing systems by writing code has been
replaced by assembling existing components. Therefore
applications would no longer be large monolithic
structures but assemblies of existing components,
competitively produced by different developers who
would have the specialized skills to concentrate on issues
such as quality and reliability for the components they
provide.
Adapting a component-based application means
adapting one or more of its components, and in general,
adapting a component at run-time means disconnecting it
from the application and connecting a new version of this
component. The adaptation may also imply the
modification of the connections between components, the
migration of components from an execution site to another
or the modification of the services provided by a specific
component. In the remainder of this paper, we start by a
presentation of the dynamic adaptation problem followed
by a brief description of some existing solutions. Our
approach will be presented in the last section.
2. Presentation of the dynamic adaptation
problem
In the defect removal community, four reasons of
software modification are well known: corrective,
adaptive, extending and perfective reasons. These reasons
can apply to dynamic adaptation of applications. In this
case the key difference is that modifications must be
performed at run-time and without shutting down the
system.
- Corrective adaptation: removes the faulty behavior of
a running component by replacing it with a new
version that provides exactly the same functionality.
- Adaptive adaptation: adapts the application in response
to changes affecting its environment (OS, hardware
components,…).
- Extending adaptation: extends the application by
adding new components to provide the new needed
functionalities.
- Perfective adaptation: aims to improve the application
even if it runs correctly. For example, replacing a
component by a new one with more optimized
implementation.
Several adaptation types may be identified and show
how dynamic adaptation can be done:
- Architecture adaptation: affects the structure of the
application. This can be performed by adding new
components, removing existing components or
modifying their interconnections.
- Implementation adaptation: motivated by performance,
correction reasons or environmental changes not
considered when the component was implemented.
Interfaces exposed by the component must be
maintained the same.
- Interface adaptation: modifies the list of services
provided by the component. In component-based
software, that can be performed by adding (removing)
an interface in (from) the list of interfaces supported
by the component.
- Deployment-architecture adaptation: That corresponds
to the migration of components from a site to another
one, to load balance for example. That does not affect
the application architecture, however, the
communication between the moved component and
other components should be adapted according to the
new location.
Multiple requirements must be satisfied to accurately
perform an adaptation.
- Consistency: the adaptation operation which is
instigated by the control application (the application
used to adapt the running application) has high
priority. However, that does not give all rights to the
control application to do anything at any time. The
adaptation operation must preserve the application
consistency. For instance, it is necessary to guarantee
that data or messages in transit (that have not reached
their destination) when the adaptation is performed are
not lost.
- Performance: the adaptation event becomes more and
more frequent during the running application life
cycle, therefore the adaptation should be efficient, and
its duration should be as minimal as possible. Also, the
number of components affected by the adaptation
operation should be minimal.
- Degree of automation: it represents the ability of an
application to adapt itself; this is possible because
during run-time, the application has all information
and capabilities needed to carry out such an operation.
In the next section, we present and briefly discuss some
works related to dynamic adaptation problem.
3. Some existing solutions
Dynamic adaptation is not a new problem, R. Fabry
[1] explained in 1976 how to develop a system in which
modules can be dynamically changed. Several other works
dealt with the dynamic adaptation such as Dynamic
Linking, Redundant Hardware and State Transfer. Other
more recent approaches are presented in this section.
These approaches are more specific to component-based
applications.
3.1. DCUP
Presentation
Many adaptation approaches associate to each
component one or more managers to ensure the
administration functionalities. In DCUP[2,3] (Dynamic
Component UPdating), each component defines one
component manager (CM) and one component builder
(CB), that are responsible of managing the associated
component. A component may have several
implementation objects and/or sub-components that
provide its functionality. A component is divided into two
parts: permanent part and replaceable part. Therefore, it
provides two kinds of operations, control operations and
functional operations.
Adapting a component means replacing its replaceable
part by a new version at run-time. The adaptation process
can be summarized as follows: the CM locks adapters and
sends an adaptation request to the CB; the CB stops the
execution of all functional objects, saves their states and
destroys the replaceable part; the CM downloads and
instantiates the new version of the CB, the new CB builds
the component (functional objects and sub-components).
Discussion
DCUP associates indirect links between objects, which
facilitates interconnections modification. However this
indirection decreases the application performance. About
the adaptation granularity, when a sub-component of a
global component has to be adapted, the whole component
is affected, and its replaceable part is redeployed,
therefore, we can imagine the consequence if a link
between two components at the top level of the
application is adapted: the entire application has to be
redeployed. DCUP does not provide any degree of
automation; all adaptation operations must be instigated
by the administrator. About the addressed adaptation
types, DCUP allows the implementation change, the
architecture change by adding, removing components and
modifying their interconnections.
3.2. OSGi
3.2.1. Presentation
In OSGi[4] all administration information of all
components is maintained and managed by a framework.
OSGi defines a component model in which components
plug into the framework, therefore, an application can be
developed in an incremental fashion at runtime. In OSGi,
a component is called a bundle; it is a JAR file containing
one or more classes and resources that implement one or
more services. A bundle may define an Activator class
that provides two methods: start and stop that allow the
framework to activate/deactivate the bundle.
A bundle can be dynamically installed, activated (started),
deactivated (stopped) and uninstalled.
3.2.2. Discussion
OSGi is an efficient development environment because
components can be added and updated at runtime. It
supports powerful event mechanisms.
The vision of implementation change in OSGi is
simplistic. When the update is instigated, the framework
deactivates the bundle to be updated, loads the new
classes and calls the start method. The programmer must
develop means to effectively stop the running object and
release the resources it holds such as files and windows.
OSGi does not take into account the state of a component
(bundle) when it is updated and does not support any
degree of automation. OSGi supports the implementation
change. About the application architecture, it is possible to
dynamically add new components, however, in case of
component removing, no new instances can be created,
but existing instances continue to be running.
3.3. OLAN
3.3.1. Presentation
OLAN [5] is an example of transactional based
approaches. Its aim is the building, execution and
administration of distributed component-based
applications. An application is organized hierarchically.
The hierarchy nodes are the composite components that
constitute the structuring units. Leaves are the units that
encapsulate applicative software (primitive components).
At run-time, to each composite corresponds a controller,
and to each primitive corresponds an administrable
component.
OLAN takes a particular care of the adaptation
automation. To perform reconfiguration, OLAN uses a
transactional model, the main aim is to ensure the
application consistency. Two kinds of transactions are
defined, reconfiguration and applicative. If a conflict is
detected, a reconfiguration transaction is always
authorized and the other is aborted.
3.3.2. Discussion
Unlike the two previous solutions, OLAN takes a
particular care of automation. Primitive components can
be implemented either in C, C++, or Python programming
language. Therefore, primitive components are not
dependent of a specific language. Using a transactional
model in adaptation decreases the administrated
application performance. A component that computes for
a long time, may be penalized if its applicative transaction
is aborted, and must later restart its computation entirely.
We can imagine if many other computations depend on
the aborted transaction, they must be aborted too.
Consequently this may stop the application for a long
time. We think that it is necessary to allow the adaptation
in near temporarily points that may be specified by the
programmer or discovered by the system. The different
adaptation types addressed by OLAN are the
implementation change (replacing a component by
another), and the architecture change (adding, removing
components and modifying their interconnections).
4. Our Approach
4.1. Description of the adaptation model
All presented approaches like many existing others are
based on specific component models. These models
associate in advance to each component two different
parts: functional part that provides the functionalities
requested from the component and the control part, which
defines the operations to manage the component life cycle.
In other words, the administration operations are defined
at design time and the component participates in its own
adaptation. Such approaches are suitable for new models
that have to be defined but cannot be applicable for
existing models that have not be designed to support the
dynamic adaptation.
In our approach we do not make any supposition on
the component model of the application to be adapted.
Thus we try to provide generic solutions independent of a
specific model. The question asked before adapting a
given component is "what are the components able to
replace this component and to provide the needed
services?” After the replacing components are identified,
the administrator should specify the script that must be
applied to effectively replace the component. Our
adaptation model defines an Adaptable relation that
associates to each component one or more other
components that may replace it at run-time, as presented
in figure 1.
Figure1: Relation 'Adaptable' between
components
The annotation Ann1 associated to the relation
between A and B describes three information types:
- Constraints that should be satisfied to replace A by B,
for example, some strategies impose that the services
provided by B must be a superset of those provided
by A and the services required by B must be a subset
of those required by A.
- Script that describes the mapping between A and B
states, as well as the mapping between their methods
and how to effectively replace A by B.
- Constraints or actions to be performed after replacing
A by B. For example, the new installed component
requires a new version of another one (dependency
between components).
4.2. Experimentation
4.2.1. The component model
One of our experimentations is based on JavaBeans
component model. A Bean is a reusable java software unit
that can be visually composed into composite components
or applications using visual application builder tools.
Beans expose their features (public methods and events)
to builder tools for visual manipulation. The Bean's
features are exposed because feature names adhere to
specific design patterns. Beans use events to communicate
with other Beans. A Bean that wants to receive events (a
listener Bean) registers its interest with the Bean that fires
the event (a source Bean).
In early work, we have extended the BeanBox [6],
which is a Beans test container (developed by Sun) to
support dynamic adaptation according to our model. The
BeanBox generates an adaptor (hookup) to allow the
communication between two beans. The class representing
the adaptor is generated, compiled and loaded on the fly.
We have mapped our solution on the BeanBuilder that
represents the new version of the BeanBox. The
BeanBuilder uses dynamic proxies to allow
communication between components. In the following
sections, we explain how we have extended the
BeanBuilder with dynamic adaptation mechanisms.
4.2.2. The functional architecture
The functional architecture of the BeanBuilder is
completely different of that of the BeanBox. The BeanTest
class constitutes the entry point of the BeanBuilder; it is
composed of three main parts:
- A component panel or a design panel where the
user creates its application.
- A component palette that contains in one hand a
standard list of components (swing), on the other
hand it contains the available components created
and loaded by the user. Any component present
in the palette can be dragged and dropped into
the design panel.
- A status bar that shows the selected component
properties.
To connect two components, the user should:
- Select the source component and drag the mouse until
the target one.
- The BeanBuilder displays the list of methods
belonging to the listener interface, the user should
select the listener method in this list.
- After this a list of methods implemented by the target
component is shown to allow the user to select the
target method that is called when the event occurred.
- A new constraint of the BeanBuilder that does not
exist in JavaBeans standard model is that the source
Bean must provide public methods that return the list
of arguments passed to the target method (if they
exist). This list of methods is provided and the user
should explicitly specify which method corresponds
to which argument.
When all previous information is specified, the
BeanBuilder creates a dynamic proxy that implements the
listener interface. This dynamic proxy represents the link
between the source and the target components.
The BeanBuilder like its predecessor the BeanBox does
not support dynamic operations, for example, it does not
allow to dynamically replace a component, to perform the
state transfer of the old component into the new one, to
change existing interconnections between components or
to preserve the consistency of the application when a
component is removed. Our extension aims to solve these
weaknesses.
To keep the model or the application structure, all
connections between components are intercepted. A set of
information is saved such as the source component, the
target component, the listener method, the target method,
the reference of the generated proxy, the reference of the
object that handles this proxy and so on. All this
information is needed to perform the adaptation at
runtime.
A
B
C
D
Ann1
Ann2
Ann3
Ann4
4.2.3. Extended proxies
The communication between Beans is indirect, each
two connected Beans communicate via an adaptor
dynamically created. The extended proxy handler supports
many functionalities related to dynamic adaptation.
- The target Bean is generic and not limited to the
current target Bean. This allows to update the target
Bean by any other Bean type.
- The target method is not definitively specified and can
be dynamically adapted according to the new target
Bean and to its target method.
- The adaptor can be either passive or active, it can be
passivated thanks to the passivate() method.
- When the adaptor is passivated, the received requests
(events) are stored in a waiting list.
- Because the waiting list is not global (one waiting list
associated to one adaptor), the stored events are
stamped, all stamps are automatically generated by a
specific class. A stamp is a number (the current time)
that specifies the order of the stored event. Passivating
a Bean can be performed by passivating all its source
adaptors. When the Bean is activated, the stamp allows
firing the stored events in the correct order.
4.2.4. Beans Mapping Base
Each adaptable Bean is associated with a relation
‘Adaptable’ to one or more other Beans that can replace it
at run-time. This relation specifies some constraints and
the mapping between the properties and methods of the
old and new Beans.
4.2.5. Beans updating
Figure 2 presents the interconnections between Beans
via adaptors. It shows also how these interconnections can
be dynamically modified to perform the adaptation.
Figure 2: Beans updating
Updating Bean1 (Model) by Bean2 (DiagonalModel)
can be performed in many steps:
- Bean1 must be declared updatable.
- If no mapping script is specified between Bean1 and
Bean2, the user is invited to specify it.
- Bean1 is passivated, therefore, all its source hookups
(H1, H2, H3, H4, H5) are passivated.
- If Bean1 and Bean2 are stateful, the state of Bean1 is
transferred into Bean2 according to the mapping script
(using Bean1 getters and Bean2 setters).
- The old target Bean reference in the source hookups
(H1, H2, H3, H4, H5) are updated with the new Bean
reference.
- The old target methods references are updated to the
corresponding new target methods according to the
mapping script. After these two last steps, all Bean1
source hookups will point on Bean2.
- All target Bean2 hookups (H6, H7) should subscribe to
Bean2 corresponding events and unsubscribe from
Bean1 events.
5. Conclusion
The article has described different concepts of the
dynamic adaptation problem in the context of component-
based applications. Critical non-stop applications should
be adapted on the fly and should be affected as minimal as
possible during adaptation. Adaptation approaches are
different in the adaptation granularity (procedure, module,
object, component), in the supported adaptation types
(implementation, architecture, interface, deployment-
architecture), and of course in performance (simplicity,
duration, automation and consistency). Many existing
approaches suppose that a component must be designed to
support administration operations and to participate in its
own adaptation. These approaches are not suitable for
existing models that have not been designed to support
dynamic adaptation. We try in our approach to separate
the adaptation operations from the component to provide
solutions independent from a specific model.
It is very hard to administrate an application if its
components do not participate in their adaptation (do not
define a control part). In this case, it is necessary to make
indirect connections between components to be able to
control their communications and to perform dynamic
reconnections. It is especially hard to perform the state
transfer between the old component and the new one, and
to specify what is exactly this state because that depends
on the semantic of the application. Therefore, some
adaptation operations can be automated and separated
from the component and some other operations needs the
participation of the component and must be taken into
account at design-time.
References
[1] R.S. Fabry, “How to design a system in which modules can
be changed on the fly”, Proc. 2nd lnt. Conf. on Soft.
Eng., pp. 470-476 (1976).
[2] Plasil, F., Balek, D., Janecek, R, “DCUP: Dynamic
Component Updating in Java/CORBA Environment”,
Tech. Report No. 97/10, Dep. of SW Engineering, Charles
University, Prague, 1997.
[3] F. Plasil , D. Balek, R. Janecek “SOFA/DCUP:
Architecture for Component Trading and Dynamic
Updating”, Proceedings of ICCDS'98, Annapolis,
Maryland, USA, IEEE CS Press, May 1998.
[4] Open Services Gateway Initiative (OSGi).
http://www.osgi.org/
[5] De Palma N., Bellissard L., Riveill M., "Dynamic
Reconfiguration of Agent-based Applications", European
Research Seminar on Advances in Distributed systems
(ERSADS'99), Madeira, Portugal, April 1999.
[6] JavaBeans Architecture, Sun Microsystems.
http://java.sun.com/docs/books/tutorial/javabeans/

More Related Content

What's hot

Engineering Software Products: 6. microservices architecture
Engineering Software Products: 6. microservices architectureEngineering Software Products: 6. microservices architecture
Engineering Software Products: 6. microservices architecturesoftware-engineering-book
 
Software Evolution and Maintenance Models
Software Evolution and Maintenance ModelsSoftware Evolution and Maintenance Models
Software Evolution and Maintenance ModelsMoutasm Tamimi
 
7. The Software Development Process - Maintenance
7. The Software Development Process - Maintenance7. The Software Development Process - Maintenance
7. The Software Development Process - MaintenanceForrester High School
 
Depandability in Software Engineering SE16
Depandability in Software Engineering SE16Depandability in Software Engineering SE16
Depandability in Software Engineering SE16koolkampus
 
Ch9-Software Engineering 9
Ch9-Software Engineering 9Ch9-Software Engineering 9
Ch9-Software Engineering 9Ian Sommerville
 
Software Maintenance and Evolution
Software Maintenance and EvolutionSoftware Maintenance and Evolution
Software Maintenance and Evolutionkim.mens
 
Engineering Software Products: 1. software products
Engineering Software Products: 1. software productsEngineering Software Products: 1. software products
Engineering Software Products: 1. software productssoftware-engineering-book
 
Software Change in Software Engineering SE27
Software Change in Software Engineering SE27Software Change in Software Engineering SE27
Software Change in Software Engineering SE27koolkampus
 
Chapter 9 software maintenance
Chapter 9 software maintenanceChapter 9 software maintenance
Chapter 9 software maintenancedespicable me
 
Cost Effectiveness of Software Reuse Alternatives
Cost Effectiveness of Software Reuse AlternativesCost Effectiveness of Software Reuse Alternatives
Cost Effectiveness of Software Reuse AlternativesProf. Amir Tomer
 
Legacy Systems in Software Engineering SE26
Legacy Systems in Software Engineering SE26Legacy Systems in Software Engineering SE26
Legacy Systems in Software Engineering SE26koolkampus
 
Ch16-Software Engineering 9
Ch16-Software Engineering 9Ch16-Software Engineering 9
Ch16-Software Engineering 9Ian Sommerville
 
Ch 5- Achieving Qualities
Ch 5- Achieving QualitiesCh 5- Achieving Qualities
Ch 5- Achieving QualitiesAsmat Zahra
 
Bse 3105 lecture 2- software change
Bse 3105  lecture 2- software changeBse 3105  lecture 2- software change
Bse 3105 lecture 2- software changeAlonzee Tash
 

What's hot (20)

Engineering Software Products: 6. microservices architecture
Engineering Software Products: 6. microservices architectureEngineering Software Products: 6. microservices architecture
Engineering Software Products: 6. microservices architecture
 
Software Evolution and Maintenance Models
Software Evolution and Maintenance ModelsSoftware Evolution and Maintenance Models
Software Evolution and Maintenance Models
 
7. The Software Development Process - Maintenance
7. The Software Development Process - Maintenance7. The Software Development Process - Maintenance
7. The Software Development Process - Maintenance
 
Depandability in Software Engineering SE16
Depandability in Software Engineering SE16Depandability in Software Engineering SE16
Depandability in Software Engineering SE16
 
Ch9-Software Engineering 9
Ch9-Software Engineering 9Ch9-Software Engineering 9
Ch9-Software Engineering 9
 
Software Maintenance and Evolution
Software Maintenance and EvolutionSoftware Maintenance and Evolution
Software Maintenance and Evolution
 
Engineering Software Products: 1. software products
Engineering Software Products: 1. software productsEngineering Software Products: 1. software products
Engineering Software Products: 1. software products
 
Software Maintenance
Software MaintenanceSoftware Maintenance
Software Maintenance
 
Software Change in Software Engineering SE27
Software Change in Software Engineering SE27Software Change in Software Engineering SE27
Software Change in Software Engineering SE27
 
Chapter 9 software maintenance
Chapter 9 software maintenanceChapter 9 software maintenance
Chapter 9 software maintenance
 
Cost Effectiveness of Software Reuse Alternatives
Cost Effectiveness of Software Reuse AlternativesCost Effectiveness of Software Reuse Alternatives
Cost Effectiveness of Software Reuse Alternatives
 
Software Evolution
Software EvolutionSoftware Evolution
Software Evolution
 
Legacy Systems in Software Engineering SE26
Legacy Systems in Software Engineering SE26Legacy Systems in Software Engineering SE26
Legacy Systems in Software Engineering SE26
 
12 software maintenance
12 software maintenance12 software maintenance
12 software maintenance
 
Ch2 sw processes
Ch2 sw processesCh2 sw processes
Ch2 sw processes
 
Ch16-Software Engineering 9
Ch16-Software Engineering 9Ch16-Software Engineering 9
Ch16-Software Engineering 9
 
Ch 5- Achieving Qualities
Ch 5- Achieving QualitiesCh 5- Achieving Qualities
Ch 5- Achieving Qualities
 
Bse 3105 lecture 2- software change
Bse 3105  lecture 2- software changeBse 3105  lecture 2- software change
Bse 3105 lecture 2- software change
 
Software maintenance
Software maintenanceSoftware maintenance
Software maintenance
 
Ppt cc
Ppt ccPpt cc
Ppt cc
 

Viewers also liked

February 2014 question of the month
February 2014 question of the monthFebruary 2014 question of the month
February 2014 question of the monthDeon Lucke
 
Aprendizajes esperados
Aprendizajes esperadosAprendizajes esperados
Aprendizajes esperadosmolina20
 
Prueba unica de informatica
Prueba unica de informaticaPrueba unica de informatica
Prueba unica de informaticaWilliam Castaño
 
Open Framework for the Dynamic Reconfiguration of Component-Based Software
Open Framework for the Dynamic Reconfiguration of Component-Based SoftwareOpen Framework for the Dynamic Reconfiguration of Component-Based Software
Open Framework for the Dynamic Reconfiguration of Component-Based SoftwareMadjid KETFI
 
REDES DE APRENDIZAJE
REDES DE APRENDIZAJEREDES DE APRENDIZAJE
REDES DE APRENDIZAJENEYLA1203
 
Composants Adaptables au dessus d'OSGi
Composants Adaptables au dessus d'OSGiComposants Adaptables au dessus d'OSGi
Composants Adaptables au dessus d'OSGiMadjid KETFI
 
The Evolution of Application Release Automation
The Evolution of Application Release AutomationThe Evolution of Application Release Automation
The Evolution of Application Release AutomationJules Pierre-Louis
 
Использование интерактивных игровых технологий на уроках химии
Использование интерактивных игровых технологий на уроках химииИспользование интерактивных игровых технологий на уроках химии
Использование интерактивных игровых технологий на уроках химииАлла Борзенко
 
презентация комнатные растения в интерьере
презентация комнатные растения в интерьерепрезентация комнатные растения в интерьере
презентация комнатные растения в интерьереАлла Борзенко
 
Demonstration of the 4C cost comparison tool
Demonstration of the 4C cost comparison toolDemonstration of the 4C cost comparison tool
Demonstration of the 4C cost comparison toolJisc RDM
 

Viewers also liked (14)

Informe 508
Informe 508Informe 508
Informe 508
 
1
11
1
 
February 2014 question of the month
February 2014 question of the monthFebruary 2014 question of the month
February 2014 question of the month
 
Aprendizajes esperados
Aprendizajes esperadosAprendizajes esperados
Aprendizajes esperados
 
Estrategias para la enseñanza
Estrategias para la enseñanzaEstrategias para la enseñanza
Estrategias para la enseñanza
 
Prueba unica de informatica
Prueba unica de informaticaPrueba unica de informatica
Prueba unica de informatica
 
Open Framework for the Dynamic Reconfiguration of Component-Based Software
Open Framework for the Dynamic Reconfiguration of Component-Based SoftwareOpen Framework for the Dynamic Reconfiguration of Component-Based Software
Open Framework for the Dynamic Reconfiguration of Component-Based Software
 
REDES DE APRENDIZAJE
REDES DE APRENDIZAJEREDES DE APRENDIZAJE
REDES DE APRENDIZAJE
 
Composants Adaptables au dessus d'OSGi
Composants Adaptables au dessus d'OSGiComposants Adaptables au dessus d'OSGi
Composants Adaptables au dessus d'OSGi
 
The Evolution of Application Release Automation
The Evolution of Application Release AutomationThe Evolution of Application Release Automation
The Evolution of Application Release Automation
 
Использование интерактивных игровых технологий на уроках химии
Использование интерактивных игровых технологий на уроках химииИспользование интерактивных игровых технологий на уроках химии
Использование интерактивных игровых технологий на уроках химии
 
презентация комнатные растения в интерьере
презентация комнатные растения в интерьерепрезентация комнатные растения в интерьере
презентация комнатные растения в интерьере
 
Demonstration of the 4C cost comparison tool
Demonstration of the 4C cost comparison toolDemonstration of the 4C cost comparison tool
Demonstration of the 4C cost comparison tool
 
Урок1
Урок1Урок1
Урок1
 

Similar to Adapting Applications on the Fly

Automatic Adaptation of Component-based Software - Issues and Experiences
Automatic Adaptation of Component-based Software - Issues and ExperiencesAutomatic Adaptation of Component-based Software - Issues and Experiences
Automatic Adaptation of Component-based Software - Issues and ExperiencesMadjid KETFI
 
A metamodel-based approach for the dynamic reconfiguration of component-based...
A metamodel-based approach for the dynamic reconfiguration of component-based...A metamodel-based approach for the dynamic reconfiguration of component-based...
A metamodel-based approach for the dynamic reconfiguration of component-based...Madjid KETFI
 
Adapting Software Components Dynamically for the Grid
Adapting Software Components Dynamically for the GridAdapting Software Components Dynamically for the Grid
Adapting Software Components Dynamically for the GridIOSR Journals
 
Software maintaince.pptx
Software maintaince.pptxSoftware maintaince.pptx
Software maintaince.pptxAmarYa2
 
Quality aware approach for engineering self-adaptive software systems
Quality aware approach for engineering self-adaptive software systemsQuality aware approach for engineering self-adaptive software systems
Quality aware approach for engineering self-adaptive software systemscsandit
 
SWE-401 - 11. Software maintenance overview
SWE-401 - 11. Software maintenance overviewSWE-401 - 11. Software maintenance overview
SWE-401 - 11. Software maintenance overviewghayour abbas
 
QUALITY-AWARE APPROACH FOR ENGINEERING SELF-ADAPTIVE SOFTWARE SYSTEMS
QUALITY-AWARE APPROACH FOR ENGINEERING SELF-ADAPTIVE SOFTWARE SYSTEMSQUALITY-AWARE APPROACH FOR ENGINEERING SELF-ADAPTIVE SOFTWARE SYSTEMS
QUALITY-AWARE APPROACH FOR ENGINEERING SELF-ADAPTIVE SOFTWARE SYSTEMScscpconf
 
Dynamically Adapting Software Components for the Grid
Dynamically Adapting Software Components for the GridDynamically Adapting Software Components for the Grid
Dynamically Adapting Software Components for the GridEditor IJCATR
 
term paper for cbd models
term paper for cbd modelsterm paper for cbd models
term paper for cbd modelsSukhdeep Singh
 
Software engineering Questions and Answers
Software engineering Questions and AnswersSoftware engineering Questions and Answers
Software engineering Questions and AnswersBala Ganesh
 
unit 5 cloud.pptx
unit 5 cloud.pptxunit 5 cloud.pptx
unit 5 cloud.pptxMrPrathapG
 
Software maintenance service strategies
Software maintenance service strategiesSoftware maintenance service strategies
Software maintenance service strategiesSIS Tech
 
A model for run time software architecture adaptation
A model for run time software architecture adaptationA model for run time software architecture adaptation
A model for run time software architecture adaptationijseajournal
 
Software Engineering
Software Engineering Software Engineering
Software Engineering JayaKamal
 
Mvc architecture driven design and agile implementation of a web based softwa...
Mvc architecture driven design and agile implementation of a web based softwa...Mvc architecture driven design and agile implementation of a web based softwa...
Mvc architecture driven design and agile implementation of a web based softwa...ijseajournal
 

Similar to Adapting Applications on the Fly (20)

Automatic Adaptation of Component-based Software - Issues and Experiences
Automatic Adaptation of Component-based Software - Issues and ExperiencesAutomatic Adaptation of Component-based Software - Issues and Experiences
Automatic Adaptation of Component-based Software - Issues and Experiences
 
A metamodel-based approach for the dynamic reconfiguration of component-based...
A metamodel-based approach for the dynamic reconfiguration of component-based...A metamodel-based approach for the dynamic reconfiguration of component-based...
A metamodel-based approach for the dynamic reconfiguration of component-based...
 
Adapting Software Components Dynamically for the Grid
Adapting Software Components Dynamically for the GridAdapting Software Components Dynamically for the Grid
Adapting Software Components Dynamically for the Grid
 
Software maintaince.pptx
Software maintaince.pptxSoftware maintaince.pptx
Software maintaince.pptx
 
Quality aware approach for engineering self-adaptive software systems
Quality aware approach for engineering self-adaptive software systemsQuality aware approach for engineering self-adaptive software systems
Quality aware approach for engineering self-adaptive software systems
 
SWE-401 - 11. Software maintenance overview
SWE-401 - 11. Software maintenance overviewSWE-401 - 11. Software maintenance overview
SWE-401 - 11. Software maintenance overview
 
QUALITY-AWARE APPROACH FOR ENGINEERING SELF-ADAPTIVE SOFTWARE SYSTEMS
QUALITY-AWARE APPROACH FOR ENGINEERING SELF-ADAPTIVE SOFTWARE SYSTEMSQUALITY-AWARE APPROACH FOR ENGINEERING SELF-ADAPTIVE SOFTWARE SYSTEMS
QUALITY-AWARE APPROACH FOR ENGINEERING SELF-ADAPTIVE SOFTWARE SYSTEMS
 
Dynamically Adapting Software Components for the Grid
Dynamically Adapting Software Components for the GridDynamically Adapting Software Components for the Grid
Dynamically Adapting Software Components for the Grid
 
1841 1843
1841 18431841 1843
1841 1843
 
1841 1843
1841 18431841 1843
1841 1843
 
term paper for cbd models
term paper for cbd modelsterm paper for cbd models
term paper for cbd models
 
INTEGRATIVE PROGRAMMING ch1.pptx
INTEGRATIVE PROGRAMMING ch1.pptxINTEGRATIVE PROGRAMMING ch1.pptx
INTEGRATIVE PROGRAMMING ch1.pptx
 
Software engineering Questions and Answers
Software engineering Questions and AnswersSoftware engineering Questions and Answers
Software engineering Questions and Answers
 
unit 5 cloud.pptx
unit 5 cloud.pptxunit 5 cloud.pptx
unit 5 cloud.pptx
 
Full Paper
Full PaperFull Paper
Full Paper
 
Waterfall model
Waterfall modelWaterfall model
Waterfall model
 
Software maintenance service strategies
Software maintenance service strategiesSoftware maintenance service strategies
Software maintenance service strategies
 
A model for run time software architecture adaptation
A model for run time software architecture adaptationA model for run time software architecture adaptation
A model for run time software architecture adaptation
 
Software Engineering
Software Engineering Software Engineering
Software Engineering
 
Mvc architecture driven design and agile implementation of a web based softwa...
Mvc architecture driven design and agile implementation of a web based softwa...Mvc architecture driven design and agile implementation of a web based softwa...
Mvc architecture driven design and agile implementation of a web based softwa...
 

Recently uploaded

Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...OnePlan Solutions
 
Odoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 EnterpriseOdoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 Enterprisepreethippts
 
PREDICTING RIVER WATER QUALITY ppt presentation
PREDICTING  RIVER  WATER QUALITY  ppt presentationPREDICTING  RIVER  WATER QUALITY  ppt presentation
PREDICTING RIVER WATER QUALITY ppt presentationvaddepallysandeep122
 
Unveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsUnveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsAhmed Mohamed
 
MYjobs Presentation Django-based project
MYjobs Presentation Django-based projectMYjobs Presentation Django-based project
MYjobs Presentation Django-based projectAnoyGreter
 
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...confluent
 
Best Web Development Agency- Idiosys USA.pdf
Best Web Development Agency- Idiosys USA.pdfBest Web Development Agency- Idiosys USA.pdf
Best Web Development Agency- Idiosys USA.pdfIdiosysTechnologies1
 
React Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaReact Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaHanief Utama
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureDinusha Kumarasiri
 
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)jennyeacort
 
What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWave PLM
 
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...Angel Borroy López
 
Xen Safety Embedded OSS Summit April 2024 v4.pdf
Xen Safety Embedded OSS Summit April 2024 v4.pdfXen Safety Embedded OSS Summit April 2024 v4.pdf
Xen Safety Embedded OSS Summit April 2024 v4.pdfStefano Stabellini
 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxTier1 app
 
Cloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEECloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEEVICTOR MAESTRE RAMIREZ
 
Cyber security and its impact on E commerce
Cyber security and its impact on E commerceCyber security and its impact on E commerce
Cyber security and its impact on E commercemanigoyal112
 
Folding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesFolding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesPhilip Schwarz
 
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样umasea
 
A healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdfA healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdfMarharyta Nedzelska
 

Recently uploaded (20)

Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
 
Odoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 EnterpriseOdoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 Enterprise
 
PREDICTING RIVER WATER QUALITY ppt presentation
PREDICTING  RIVER  WATER QUALITY  ppt presentationPREDICTING  RIVER  WATER QUALITY  ppt presentation
PREDICTING RIVER WATER QUALITY ppt presentation
 
Unveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsUnveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML Diagrams
 
MYjobs Presentation Django-based project
MYjobs Presentation Django-based projectMYjobs Presentation Django-based project
MYjobs Presentation Django-based project
 
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort ServiceHot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
 
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
 
Best Web Development Agency- Idiosys USA.pdf
Best Web Development Agency- Idiosys USA.pdfBest Web Development Agency- Idiosys USA.pdf
Best Web Development Agency- Idiosys USA.pdf
 
React Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaReact Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief Utama
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with Azure
 
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
 
What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need It
 
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
 
Xen Safety Embedded OSS Summit April 2024 v4.pdf
Xen Safety Embedded OSS Summit April 2024 v4.pdfXen Safety Embedded OSS Summit April 2024 v4.pdf
Xen Safety Embedded OSS Summit April 2024 v4.pdf
 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
 
Cloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEECloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEE
 
Cyber security and its impact on E commerce
Cyber security and its impact on E commerceCyber security and its impact on E commerce
Cyber security and its impact on E commerce
 
Folding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesFolding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a series
 
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
 
A healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdfA healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdf
 

Adapting Applications on the Fly

  • 1. Adapting Applications on the Fly Abdelmadjid Ketfi, Noureddine Belkhatir, Pierre-Yves Cunin Adele Team Bat C LSR-IMAG , 220 rue de la chimie - Domaine Universitaire, BP 53 38041 Grenoble Cedex 9 France Abstract Traditionally, an application has to be stopped to be adapted. This approach is not suitable for critical systems that have to be non-stop and highly available like bank, internet or telecommunication services. In these kinds of systems the adaptation must take place at run-time and the application should not be entirely stopped. In Component-based software engineering, the old notion of developing systems by writing code has been replaced by assembling existing components. Adapting a component-based application means adapting one or more of its components, and in general, adapting a component at run-time means disconnecting it from the application and connecting a new version of this component. The adaptation may also imply the modification of the connections between components, the migration of components from an execution site to another or the modification of the services provided by a specific component. In this paper, we start by a presentation of the dynamic adaptation problem followed by a brief description of some existing solutions. Our approach will be presented in the last section. 1. Introduction When it is necessary to adapt an application, traditionally, the administrator must stop this application for maintenance. This approach is not suitable for critical systems that have to be non-stop and highly available like bank, internet or telecommunication services. In these kinds of systems the adaptation must take place at run- time and the application should not be entirely stopped. Some of the challenges of dynamic adaptation are how to guarantee the consistency of the adapted application, how to transfer the state of the old application into the new one, how to do with the clients when the new application does not provide the same services as the old one, etc. Several adaptation approaches have tried to provide efficient solutions to solve failures and introduce modifications in a running application by affecting it as minimal as possible. These approaches are different in their performance, their degree of automation, their consistency and in the granularity that they address. The granularity means the basic entity that can be adapted. Many solutions focused on how to replace a procedure, a module or an object in a running application. Our work is concentrated on component-based applications. In Component-based software engineering, the old notion of developing systems by writing code has been replaced by assembling existing components. Therefore applications would no longer be large monolithic structures but assemblies of existing components, competitively produced by different developers who would have the specialized skills to concentrate on issues such as quality and reliability for the components they provide. Adapting a component-based application means adapting one or more of its components, and in general, adapting a component at run-time means disconnecting it from the application and connecting a new version of this component. The adaptation may also imply the modification of the connections between components, the migration of components from an execution site to another or the modification of the services provided by a specific component. In the remainder of this paper, we start by a presentation of the dynamic adaptation problem followed by a brief description of some existing solutions. Our approach will be presented in the last section. 2. Presentation of the dynamic adaptation problem In the defect removal community, four reasons of software modification are well known: corrective, adaptive, extending and perfective reasons. These reasons can apply to dynamic adaptation of applications. In this
  • 2. case the key difference is that modifications must be performed at run-time and without shutting down the system. - Corrective adaptation: removes the faulty behavior of a running component by replacing it with a new version that provides exactly the same functionality. - Adaptive adaptation: adapts the application in response to changes affecting its environment (OS, hardware components,…). - Extending adaptation: extends the application by adding new components to provide the new needed functionalities. - Perfective adaptation: aims to improve the application even if it runs correctly. For example, replacing a component by a new one with more optimized implementation. Several adaptation types may be identified and show how dynamic adaptation can be done: - Architecture adaptation: affects the structure of the application. This can be performed by adding new components, removing existing components or modifying their interconnections. - Implementation adaptation: motivated by performance, correction reasons or environmental changes not considered when the component was implemented. Interfaces exposed by the component must be maintained the same. - Interface adaptation: modifies the list of services provided by the component. In component-based software, that can be performed by adding (removing) an interface in (from) the list of interfaces supported by the component. - Deployment-architecture adaptation: That corresponds to the migration of components from a site to another one, to load balance for example. That does not affect the application architecture, however, the communication between the moved component and other components should be adapted according to the new location. Multiple requirements must be satisfied to accurately perform an adaptation. - Consistency: the adaptation operation which is instigated by the control application (the application used to adapt the running application) has high priority. However, that does not give all rights to the control application to do anything at any time. The adaptation operation must preserve the application consistency. For instance, it is necessary to guarantee that data or messages in transit (that have not reached their destination) when the adaptation is performed are not lost. - Performance: the adaptation event becomes more and more frequent during the running application life cycle, therefore the adaptation should be efficient, and its duration should be as minimal as possible. Also, the number of components affected by the adaptation operation should be minimal. - Degree of automation: it represents the ability of an application to adapt itself; this is possible because during run-time, the application has all information and capabilities needed to carry out such an operation. In the next section, we present and briefly discuss some works related to dynamic adaptation problem. 3. Some existing solutions Dynamic adaptation is not a new problem, R. Fabry [1] explained in 1976 how to develop a system in which modules can be dynamically changed. Several other works dealt with the dynamic adaptation such as Dynamic Linking, Redundant Hardware and State Transfer. Other more recent approaches are presented in this section. These approaches are more specific to component-based applications. 3.1. DCUP Presentation Many adaptation approaches associate to each component one or more managers to ensure the administration functionalities. In DCUP[2,3] (Dynamic Component UPdating), each component defines one component manager (CM) and one component builder (CB), that are responsible of managing the associated component. A component may have several implementation objects and/or sub-components that provide its functionality. A component is divided into two parts: permanent part and replaceable part. Therefore, it provides two kinds of operations, control operations and functional operations. Adapting a component means replacing its replaceable part by a new version at run-time. The adaptation process can be summarized as follows: the CM locks adapters and sends an adaptation request to the CB; the CB stops the execution of all functional objects, saves their states and destroys the replaceable part; the CM downloads and instantiates the new version of the CB, the new CB builds the component (functional objects and sub-components). Discussion DCUP associates indirect links between objects, which facilitates interconnections modification. However this indirection decreases the application performance. About the adaptation granularity, when a sub-component of a global component has to be adapted, the whole component is affected, and its replaceable part is redeployed, therefore, we can imagine the consequence if a link between two components at the top level of the application is adapted: the entire application has to be redeployed. DCUP does not provide any degree of
  • 3. automation; all adaptation operations must be instigated by the administrator. About the addressed adaptation types, DCUP allows the implementation change, the architecture change by adding, removing components and modifying their interconnections. 3.2. OSGi 3.2.1. Presentation In OSGi[4] all administration information of all components is maintained and managed by a framework. OSGi defines a component model in which components plug into the framework, therefore, an application can be developed in an incremental fashion at runtime. In OSGi, a component is called a bundle; it is a JAR file containing one or more classes and resources that implement one or more services. A bundle may define an Activator class that provides two methods: start and stop that allow the framework to activate/deactivate the bundle. A bundle can be dynamically installed, activated (started), deactivated (stopped) and uninstalled. 3.2.2. Discussion OSGi is an efficient development environment because components can be added and updated at runtime. It supports powerful event mechanisms. The vision of implementation change in OSGi is simplistic. When the update is instigated, the framework deactivates the bundle to be updated, loads the new classes and calls the start method. The programmer must develop means to effectively stop the running object and release the resources it holds such as files and windows. OSGi does not take into account the state of a component (bundle) when it is updated and does not support any degree of automation. OSGi supports the implementation change. About the application architecture, it is possible to dynamically add new components, however, in case of component removing, no new instances can be created, but existing instances continue to be running. 3.3. OLAN 3.3.1. Presentation OLAN [5] is an example of transactional based approaches. Its aim is the building, execution and administration of distributed component-based applications. An application is organized hierarchically. The hierarchy nodes are the composite components that constitute the structuring units. Leaves are the units that encapsulate applicative software (primitive components). At run-time, to each composite corresponds a controller, and to each primitive corresponds an administrable component. OLAN takes a particular care of the adaptation automation. To perform reconfiguration, OLAN uses a transactional model, the main aim is to ensure the application consistency. Two kinds of transactions are defined, reconfiguration and applicative. If a conflict is detected, a reconfiguration transaction is always authorized and the other is aborted. 3.3.2. Discussion Unlike the two previous solutions, OLAN takes a particular care of automation. Primitive components can be implemented either in C, C++, or Python programming language. Therefore, primitive components are not dependent of a specific language. Using a transactional model in adaptation decreases the administrated application performance. A component that computes for a long time, may be penalized if its applicative transaction is aborted, and must later restart its computation entirely. We can imagine if many other computations depend on the aborted transaction, they must be aborted too. Consequently this may stop the application for a long time. We think that it is necessary to allow the adaptation in near temporarily points that may be specified by the programmer or discovered by the system. The different adaptation types addressed by OLAN are the implementation change (replacing a component by another), and the architecture change (adding, removing components and modifying their interconnections). 4. Our Approach 4.1. Description of the adaptation model All presented approaches like many existing others are based on specific component models. These models associate in advance to each component two different parts: functional part that provides the functionalities requested from the component and the control part, which defines the operations to manage the component life cycle. In other words, the administration operations are defined at design time and the component participates in its own adaptation. Such approaches are suitable for new models that have to be defined but cannot be applicable for existing models that have not be designed to support the dynamic adaptation. In our approach we do not make any supposition on the component model of the application to be adapted. Thus we try to provide generic solutions independent of a specific model. The question asked before adapting a given component is "what are the components able to replace this component and to provide the needed services?” After the replacing components are identified, the administrator should specify the script that must be applied to effectively replace the component. Our adaptation model defines an Adaptable relation that associates to each component one or more other components that may replace it at run-time, as presented in figure 1.
  • 4. Figure1: Relation 'Adaptable' between components The annotation Ann1 associated to the relation between A and B describes three information types: - Constraints that should be satisfied to replace A by B, for example, some strategies impose that the services provided by B must be a superset of those provided by A and the services required by B must be a subset of those required by A. - Script that describes the mapping between A and B states, as well as the mapping between their methods and how to effectively replace A by B. - Constraints or actions to be performed after replacing A by B. For example, the new installed component requires a new version of another one (dependency between components). 4.2. Experimentation 4.2.1. The component model One of our experimentations is based on JavaBeans component model. A Bean is a reusable java software unit that can be visually composed into composite components or applications using visual application builder tools. Beans expose their features (public methods and events) to builder tools for visual manipulation. The Bean's features are exposed because feature names adhere to specific design patterns. Beans use events to communicate with other Beans. A Bean that wants to receive events (a listener Bean) registers its interest with the Bean that fires the event (a source Bean). In early work, we have extended the BeanBox [6], which is a Beans test container (developed by Sun) to support dynamic adaptation according to our model. The BeanBox generates an adaptor (hookup) to allow the communication between two beans. The class representing the adaptor is generated, compiled and loaded on the fly. We have mapped our solution on the BeanBuilder that represents the new version of the BeanBox. The BeanBuilder uses dynamic proxies to allow communication between components. In the following sections, we explain how we have extended the BeanBuilder with dynamic adaptation mechanisms. 4.2.2. The functional architecture The functional architecture of the BeanBuilder is completely different of that of the BeanBox. The BeanTest class constitutes the entry point of the BeanBuilder; it is composed of three main parts: - A component panel or a design panel where the user creates its application. - A component palette that contains in one hand a standard list of components (swing), on the other hand it contains the available components created and loaded by the user. Any component present in the palette can be dragged and dropped into the design panel. - A status bar that shows the selected component properties. To connect two components, the user should: - Select the source component and drag the mouse until the target one. - The BeanBuilder displays the list of methods belonging to the listener interface, the user should select the listener method in this list. - After this a list of methods implemented by the target component is shown to allow the user to select the target method that is called when the event occurred. - A new constraint of the BeanBuilder that does not exist in JavaBeans standard model is that the source Bean must provide public methods that return the list of arguments passed to the target method (if they exist). This list of methods is provided and the user should explicitly specify which method corresponds to which argument. When all previous information is specified, the BeanBuilder creates a dynamic proxy that implements the listener interface. This dynamic proxy represents the link between the source and the target components. The BeanBuilder like its predecessor the BeanBox does not support dynamic operations, for example, it does not allow to dynamically replace a component, to perform the state transfer of the old component into the new one, to change existing interconnections between components or to preserve the consistency of the application when a component is removed. Our extension aims to solve these weaknesses. To keep the model or the application structure, all connections between components are intercepted. A set of information is saved such as the source component, the target component, the listener method, the target method, the reference of the generated proxy, the reference of the object that handles this proxy and so on. All this information is needed to perform the adaptation at runtime. A B C D Ann1 Ann2 Ann3 Ann4
  • 5. 4.2.3. Extended proxies The communication between Beans is indirect, each two connected Beans communicate via an adaptor dynamically created. The extended proxy handler supports many functionalities related to dynamic adaptation. - The target Bean is generic and not limited to the current target Bean. This allows to update the target Bean by any other Bean type. - The target method is not definitively specified and can be dynamically adapted according to the new target Bean and to its target method. - The adaptor can be either passive or active, it can be passivated thanks to the passivate() method. - When the adaptor is passivated, the received requests (events) are stored in a waiting list. - Because the waiting list is not global (one waiting list associated to one adaptor), the stored events are stamped, all stamps are automatically generated by a specific class. A stamp is a number (the current time) that specifies the order of the stored event. Passivating a Bean can be performed by passivating all its source adaptors. When the Bean is activated, the stamp allows firing the stored events in the correct order. 4.2.4. Beans Mapping Base Each adaptable Bean is associated with a relation ‘Adaptable’ to one or more other Beans that can replace it at run-time. This relation specifies some constraints and the mapping between the properties and methods of the old and new Beans. 4.2.5. Beans updating Figure 2 presents the interconnections between Beans via adaptors. It shows also how these interconnections can be dynamically modified to perform the adaptation. Figure 2: Beans updating Updating Bean1 (Model) by Bean2 (DiagonalModel) can be performed in many steps: - Bean1 must be declared updatable. - If no mapping script is specified between Bean1 and Bean2, the user is invited to specify it. - Bean1 is passivated, therefore, all its source hookups (H1, H2, H3, H4, H5) are passivated. - If Bean1 and Bean2 are stateful, the state of Bean1 is transferred into Bean2 according to the mapping script (using Bean1 getters and Bean2 setters). - The old target Bean reference in the source hookups (H1, H2, H3, H4, H5) are updated with the new Bean reference. - The old target methods references are updated to the corresponding new target methods according to the mapping script. After these two last steps, all Bean1 source hookups will point on Bean2. - All target Bean2 hookups (H6, H7) should subscribe to Bean2 corresponding events and unsubscribe from Bean1 events. 5. Conclusion The article has described different concepts of the dynamic adaptation problem in the context of component- based applications. Critical non-stop applications should be adapted on the fly and should be affected as minimal as
  • 6. possible during adaptation. Adaptation approaches are different in the adaptation granularity (procedure, module, object, component), in the supported adaptation types (implementation, architecture, interface, deployment- architecture), and of course in performance (simplicity, duration, automation and consistency). Many existing approaches suppose that a component must be designed to support administration operations and to participate in its own adaptation. These approaches are not suitable for existing models that have not been designed to support dynamic adaptation. We try in our approach to separate the adaptation operations from the component to provide solutions independent from a specific model. It is very hard to administrate an application if its components do not participate in their adaptation (do not define a control part). In this case, it is necessary to make indirect connections between components to be able to control their communications and to perform dynamic reconnections. It is especially hard to perform the state transfer between the old component and the new one, and to specify what is exactly this state because that depends on the semantic of the application. Therefore, some adaptation operations can be automated and separated from the component and some other operations needs the participation of the component and must be taken into account at design-time. References [1] R.S. Fabry, “How to design a system in which modules can be changed on the fly”, Proc. 2nd lnt. Conf. on Soft. Eng., pp. 470-476 (1976). [2] Plasil, F., Balek, D., Janecek, R, “DCUP: Dynamic Component Updating in Java/CORBA Environment”, Tech. Report No. 97/10, Dep. of SW Engineering, Charles University, Prague, 1997. [3] F. Plasil , D. Balek, R. Janecek “SOFA/DCUP: Architecture for Component Trading and Dynamic Updating”, Proceedings of ICCDS'98, Annapolis, Maryland, USA, IEEE CS Press, May 1998. [4] Open Services Gateway Initiative (OSGi). http://www.osgi.org/ [5] De Palma N., Bellissard L., Riveill M., "Dynamic Reconfiguration of Agent-based Applications", European Research Seminar on Advances in Distributed systems (ERSADS'99), Madeira, Portugal, April 1999. [6] JavaBeans Architecture, Sun Microsystems. http://java.sun.com/docs/books/tutorial/javabeans/