Open Framework for the Dynamic Reconfiguration of Component-Based Software
M. Ketfi and N. Belkhatir
Proceedings of the International Conference on Software Engineering Research and Practice, SERP 2004, June 21-24, 2004, Las Vegas, Nevada, USA, Volume 2. CSREA Press 2004, ISBN 1-932415-29-7 (pages 948-951).
Open Framework for the Dynamic Reconfiguration of Component-Based Software
1. Open Framework for the Dynamic Reconfiguration of Component-based
Software
Abdelmadjid Ketfi, Noureddine Belkhatir
Adele Team Bat C
LSR-IMAG , 220 rue de la chimie
Domaine Universitaire, BP 53
38041 Grenoble Cedex 9 France
Abdelmadjid.Ketfi@imag.fr, Noureddine.Belkhatir@imag.fr
Abstract
Permanent and uninterrupted functioning can be
sometimes a requirement for some kinds of software
systems. This is especially true in the case of complex
and distributed systems where stopping and restarting
the system constitute a tedious and costly task, also
when the system must be highly available or when its
execution environment changes frequently. The
development complexity and cost constitute an
important problem in front of the creation of dynamic
software systems. We present in this paper a reusable
framework that helps to make software systems
dynamically reconfigurable. Our solution has been
implemented for Java systems respecting some lexical
conventions and allows to automatically enhance an
ordinary system by the dynamic reconfiguration
capabilities.
Keywords: Dynamic reconfiguration, Component,
Abstract, Generic.
1. Introduction
An important paradigm of component-based
development [1] is to build applications from well
defined entities called components. Its goal is to
simplify the development and to increase the
productivity by re-using existing components rather
than re-inventing the wheel each time. Non-stop and
highly available applications need to be dynamically
adapted to new conditions in their execution
environment, to new user requirements or to some
situations which can be unpredictable at build-time.
Bank, aeronautic, mobile and Internet services are well
known examples of applications requiring a dynamic
adaptation.
The development complexity and cost constitute an
important problem in front of the creation of dynamic
systems. The work we present in this paper is intended
to be a support to make software systems dynamically
reconfigurable.
This paper is organized as follows: Section 2
discusses the dynamic reconfiguration problem and
presents our main objectives. Section 3 discusses two
potential approaches to build a reusable dynamic
reconfiguration framework. Section 4 presents our
framework architecture, and before we conclude,
Section 5 presents the state of work.
2. Dynamically reconfigurable software
systems
In general a software system is developed according
to a specific context, this context constitutes the set of
constraints to be satisfied for a correct execution of the
system, for example the bandwidth, the quality of
service, the consistency and the correctness, the
security and so on. If one of these initial conditions
changes when the system is running two possibilities
can be considered: (1) stopping the software system
and introducing the needed modifications before
rebuilding and restarting it; (2) without stopping the
system, directly introducing the required modifications.
The second solution is required for some category of
software systems. One of the programming models that
simplifies the dynamic reconfiguration of software
systems is the component-oriented programming
model. It allows to build systems using a set of
interconnected entities (components) that work together
to provide the required functionality. In this case the
2. boundaries between components are well traced and
the structure of the system is more explicit which
simplifies the dynamic reconfiguration of systems by
plugging, unplugging and replacing well defined
entities. To take advantage of these features our
approach is based on an abstract reconfigurable
component model.
To build a reusable dynamic reconfiguration
framework two approaches can be potentially explored:
the top-down approach where we start from an abstract
application, and after a succession of refinements we
obtain a concrete application that can be executed and
dynamically adapted. The second vision consists of a
bottom-up approach. The idea is to start from a
concrete application, that can be executed but not able
to support the dynamic reconfiguration; an image of
this concrete application is then created according to a
canonical model. The canonical representation can then
be dynamically adapted. These two approaches are
discussed in the following section.
3. Top-down vs. bottom-up approach
This section briefly presents the top-down and the
bottom-up approaches.
3.1. Top-Down approach
The top-down approach is inspired from the Model
Driven Architecture (MDA) [2] proposed by the Object
Management Group (OMG). The idea is to consider a
generic component model as a starting point for any
development. This generic model can be seen as a
skeleton that will be completed, extended or
specialized as necessary to address a particular
component model.
Figure 1. Top-Down approach
In the top-down approach illustrated in Figure 1, the
user starts by specifying his application in an abstract
way according to the generic component model. This
abstract application is automatically associated to a
dynamic reconfiguration framework, responsible for its
dynamic reconfiguration. The abstract application and
the framework can be then submitted to a set of
refinements as necessary to obtain a concrete
application supporting the dynamic reconfiguration
thanks to the associated framework. The refinement
process can be guided by a set of dedicated tools which
guarantee that after each refinement step the
intermediary obtained application preserves the
required properties necessary for its reconfiguration.
3.2. Bottom-Up approach
The bottom-up approach is based on a canonical
model that integrates all concepts shared by the
different addressed component models and relevant to
the dynamic reconfiguration. For each component
model that must be covered by the reconfiguration
framework it is necessary to develop tools whose role
is to translate an application (developed according to
this component model) to the canonical representation.
After starting the application a view of its run-time
architecture can be discovered, the administrator can
then act on this view to dynamically reconfigure the
application.
In our work we investigated the second approach
more, therefore in the following section we will pay
particular attention to this approach on which our
framework is based.
4. Our approach
4.1. Overview
Recently we specified and developed a dynamic
reconfiguration framework for JavaBeans [3] based
systems [4]. The role of this framework is to take in
charge the dynamic reconfiguration of systems
developed according to JavaBeans component model.
The reconfiguration is performed almost transparently
and needs a minimal participation of the user. This
framework allows for example to replace a component
by another one, either having the same interface or not
(interface mapping facilities are supported), it allows
also to change the system architecture by changing the
connections between components, by adding or
removing components, it guarantees some consistency
of the reconfigured system by assuring the state transfer
between the old and the new component, passivating
and activating components as necessary.
In the context of another project in which we are
involved, we developed a similar dynamic
3. reconfiguration framework for OSGi [5], a component
model in which components plug into a basic
framework and allow to create software systems in an
incremental fashion at runtime [6,7].
After these experimentations on two specific
component models (JavaBeans and OSGi), we
generalized our approach by introducing an abstract
component model which is endowed by capabilities to
support the dynamic reconfiguration. This abstract
model is intended to be generic and constitutes a basic
step towards a generic dynamic reconfiguration
framework.
4.2. Generic dynamic reconfiguration
framework
By dynamic reconfiguration framework we mean the
software responsible for the dynamic reconfiguration of
a software system. The advantage of this isolation
between the software system and the framework
responsible for its reconfiguration is the factorization
of the common concepts and parts related to the
dynamic reconfiguration. It allows also the programmer
to take in charge only the business logic of his system.
The dynamic reconfiguration framework can be
considered separately and used independently to
perform the dynamic reconfiguration of different
software systems.
Our approach is based on an abstract component
model which captures the main logical concepts that
can be found in other component models like
JavaBeans and OSGi. The great benefit of a unified
representation of user systems according to a common
component model is that the dynamic reconfiguration
framework works on the same representation
independently of concrete user systems, in other words,
it can reach a high degree of genericity.
The logical decomposition of our framework is
presented in Figure 2. Three parts can be distinguished:
- The base-level: represents the concrete
application that provides the expected
functionalities and its execution
environment.
- The reconfiguration machine: the different
operational modules responsible for
achieving the reconfiguration, and the
meta-level which represents the reification
of the concrete application.
- The reconfiguration base: set of
information about the available
components organized in families of
components.
Figure 2. Our framework architecture
4.3. Supported reconfiguration operations
Among the important operations supported by the
current version of our framework we can quote:
- Adding a new component to the system.
- Creating a new component instance.
- Replacing a component instance by
another one. The replaced instance is
completely disconnected from the system
and the replacing one is plugged in its
place. If the internal state of the replaced
instance is significant (stateful instance:
information that can be specified
explicitly by the user) this state is
transferred, if possible, to the new
instance (if in its turn it is declared
stateful).
- Removing a connection between two
instance ports.
- Creating a new connection between two
instance ports. In this case the
environment checks if the connected ports
are compatible.
- Reconnecting a source port (already
connected) to another target port.
- Reconnecting a target port (already
connected) from another source port.
5. State of work
A preliminary version of the dynamic
reconfiguration framework specification describing the
main concepts is available. This version is currently
under improvement and will be completed and
extended to advanced concepts related to the dynamic
reconfiguration. To prove the feasibility of our
4. approach, an implementation of the preliminary
specification has been recently performed.
The implementation is now limited to two
component models: Java-Componentized which is
simply Java programming language restricted by some
lexical rules that allow to discover the application
architecture. That means that it is possible to start from
a Java application respecting the imposed lexical rules,
to automatically instrument it in order to connect it to
the dynamic reconfiguration framework, and finally to
dynamically adapt this application. The second
component model supported by our current
implementation is OSGi [5]. The same manipulation
process can be applied on an OSGi application to get
as a result a dynamically reconfigurable application
without any specific development.
6. Conclusion and perspectives
The demands of dynamicity is one of the key
challenges facing software developers today, this paper
describes an approach dealing with the dynamic
reconfiguration problem. The meta-modeling has
proved a real importance especially with the
appearance of many standards and methodologies. The
approach we presented in this paper lies within the
same scope, it is based on an abstract model that
provides an abstract view of concrete software systems
and allows to build a generic dynamic reconfiguration
framework.
Such a framework takes in charge the dynamic
reconfiguration and allows developers to focus only on
the business logic of their systems. Versions we
implemented for Java-Componentized and for OSGi
confirm the feasibility of our approach that seems to be
very promising.
All reconfiguration operations covered by our
framework are related to the functional code of
software systems, however much work remains to be
done to allow the dynamic reconfiguration of non-
functional services like transactions, security and so on.
As future work we plan to improve our framework
in order to experiment it for real-size applications. We
plan also to extend the framework for other component
models to validate its genericity.
7. References
[1] George T. Heineman, William T. Councill,
Component-based software engineering: putting the
pieces together, Addison-Wesley Longman Publishing
Co., Inc., Boston, MA, 2001.
[2] John D. Poole, "Model-Driven Architecture: Vision,
Standards, And Emerging Technologies", Position
Paper Submitted to ECOOP 2001, Workshop on
Metamodeling and Adaptive Object Models.
http://www.omg.org/mda/
[3] JavaBeans Architecture, Sun Microsystems.
http://java.sun.com/docs/books/tutorial/javabeans/
[4] A. Ketfi, N. Belkhatir and P.Y. Cunin, “Dynamic
updating of component-based applications”, SERP'02,
June 2002, Las Vegas, Nevada, USA.
[5] Open Services Gateway Initiative (OSGi)
http://www.osgi.org
[6] A. Ketfi, H. Cervantes, R. Hall, D. Donsez,
“Composants adaptables au dessus d'OSGi”, Journées
Systèmes à Composants Adaptables et extensibles,
Octobre 2002, Grenoble, France.
[7] A. Ketfi, N. Belkhatir, “Dynamic Interface Adaptability
in Service Oriented Software”, Eighth International
Workshop on Component-Oriented Programming
(WCOP'03), July 21, 2003 - At ECOOP 2003,
Darmstadt, Germany.