\chapter{Introduction}
\label{chap:introduction}

% the world is very dynamic now. 
% the existing software infrastructure is not prepared to deal with this dynamism yet
% there's some old research that can help us: dynamic configuration, software architecture.
% there are some new technologies that can help us: Java/Jini, CORBA.
% but this are not enough, we need more.
% To fill this gap we developed an architecture that is based on the explicit
% representation of inter-component dependence.

% roadmap

\begin{flushright}
There is nothing permanent except change.\\
\emph{Heraclitus of Ephesus (535-475 BC)}
\end{flushright}

As computer systems are being applied to more and more aspects of personal and
professional life, the quantity and complexity of software systems is
increasing considerably. At the same time, the diversity in hardware
architectures remains large and is likely to grow with the deployment of
embedded systems\index{embedded systems}, PDAs, and portable computing
devices. All these architectures will coexist with personal computers,
workstations, computing servers, and supercomputers. It is imperative that the
scientific and industrial communities develop techniques to support seamless
integration of highly heterogeneous environments. The construction of these
new software systems and applications in an easy and reliable way can only be
achieved through the composition of modular hardware and software.

Component technology has appeared as a powerful tool to confront this
challenge. Recently developed component architectures support the construction
of sophisticated systems by assembling together a collection of off-the-shelf
software components with the help of visual tools or programmatic interfaces.
Components will be the unit of packaging, distribution, and deployment in the
next generation of software systems.  However, there is still very little support
for managing the dependencies among components. Components are created by
different programmers, often working in different groups with different
methodologies. It is hard to create robust and efficient systems if the
dependencies between components are not well understood.

\vspace{5mm}

Mobile computing\index{mobile computing} and active spaces\index{active spaces}
seem to be among the next revolutions in information technology. Mobile
computing comprises systems as diverse as digital cellular telephony, road
traffic information, or simply web browsing via wireless connections. Active
spaces consist of physical spaces -- such as offices, lecture and meeting
rooms, homes, hospitals, campuses, train stations, cities -- that are
augmented with computing devices integrated into the environment. The
objective of these devices is to provide information to users of the space,
helping them to perform activities they would not be able to perform
otherwise, or helping them to perform conventional activities more easily.  In
addition, multimedia interfaces will play a fundamental role in human-computer
interaction. Applications will gradually abandon dull interfaces based on text
and static graphics and move towards interfaces with a more dynamic appearance
based on audio, video, and animations. We can also expect the migration of
services such as radio and TV to the personal computer. Within one decade,
there will probably be no distinction among the telephone, radio, TV, and data
networks. In the future, there will be no distinction between computer and
dedicated radio and TV receivers. Everything will be integrated into an
extension of today's Internet. The dynamic nature of multimedia, with its
stringent, time-sensitive resource requirements, will contribute to the
changes towards more dynamic computing environments.

Until recently, these highly-dynamic environments with mobile computers,
active spaces, and ubiquitous multimedia were only present in science fiction
stories or in the minds of visionary scientists like Mark Weiser
\cite{Weiser91,Weiser95}. But now, they are becoming a reality and one of the most
important challenges they pose is the proper \emph{management of
dynamism}. Future computer systems must be able to configure themselves
dynamically, adapting to the environment in which they are
executing. Furthermore, they must be able to react to changes in the
environment by dynamically \emph{re}configuring themselves to keep functioning
with good performance, irrespective of modifications in the
environment. Applications and systems must react to variations in resource
availability by dynamically adapting their algorithms, updating parts of the
system, and replacing software components when needed.

Unfortunately, the existing software infrastructure is not prepared to manage
these highly-dynamic environments properly. Conventional operating systems
already have a hard time managing static environments based on
components. Even Microsoft researchers say that they are ``well aware of how
difficult it is to install software on [Windows] NT and get it to work''
\cite{trend-wars-os99} because of the management problems that components
induce. In Solaris, a system administrator does not have a clean way of
upgrading software that is being executed by the users. When an executable
is replaced, the running versions of the old executable crash.

\section{The Heart of the Problem}
\index{dependence management}

Existing software systems face significant problems with reliability,
administration, architectural organization, and configuration.  The problem
behind all these difficulties is the lack of a unified model for representing
dependencies among system and application components and mechanisms for
dealing with these dependencies.

As systems become more complex and grow in scale, and as environments become
more dynamic, the effects of the lack of proper dependence management become more
dramatic.  Therefore, we need an integrated approach in which operating
systems, middleware, and applications collaborate to manage the components in
complex software systems, dealing with their dependencies properly.

\section{Thesis Contribution}
\index{contributions}

To solve the problem described in the previous section, this thesis introduces
an architecture that provides support for systems and applications to
reason about their own internal structural organization. We call this ability
\emph{architectural-awareness}\index{architectural-awareness} and we achieve
it with a framework that supports the explicit representation of dependencies
in component-based systems.  This representation can then be manipulated in
order to implement software components that are able to configure themselves
and adapt to ever changing dynamic environments.

By reifying the interactions between system and application components, system
software can recognize the need for reconfiguration to provide better support
for fault-tolerance, security, quality of service, and optimizations. In addition,
it gains the means to carry out this reconfiguration without compromising
system stability and reliability, with minimal impact on performance.

Our research builds on previous and ongoing work on software architecture and
dynamic configuration\index{dynamic (re)configuration} of distributed
systems. But, rather than simply looking at the architectural connections
among the components of a single application, our approach differs from
previous work in this area by reasoning about all the different kinds of
dependencies that relate each component to other application, middleware, and
system components.  In addition, instead of relying on architecture
descriptions defined \emph{a priori}, our framework is prepared to deal with
completely dynamic architectures that are only known at runtime.

In this thesis, we present a generic architecture for dependence
representation and management and describe a concrete implementation of this
architecture. The latter was deployed successfully in several distributed
systems and in a centralized system. This demonstrates the effectiveness of
our approach in improving the quality of component-based systems with respect
to dynamic configuration, reliability, architectural organization, and
management.

\section{Thesis Contents}

The remainder of this thesis is organized as follows. Chapter
\ref{chap:dep-management} discusses how dependence management in
component-based distributed systems can help to provide reliability,
quality of service, and dynamic configuration and reconfiguration.

Chapter \ref{chap:architecture} gives a general overview of our novel
architecture for dependence management. The architecture is divided in three
parts that are addressed in more detail by the three subsequent
chapters.  Chapter \ref{chap:autoconfig-service} describes the Automatic
Configuration Service, Chapter \ref{chap:comp-config} describes the component
configurator framework, and Chapter \ref{chap:reconfig-agents} describes the
reconfiguration agents framework.

Chapter \ref{chap:applications} describes, in detail, two application
scenarios where our architecture was deployed. Section \ref{sec:dtao}
describes the \dTAO reflective ORB and Section \ref{sec:reflector} describes a
scalable multimedia distribution system. Section \ref{sec:other-apps}
describes briefly three other ongoing projects that use the results of this thesis.

Chapter \ref{chap:experiments} presents the results of experiments with the
three major parts of our architecture. It discusses the performance, impact,
and overhead of dependence management in different contexts.

Chapter \ref{chap:related} describes related research in different Computer
Science fields, discusses their limitations, and shows how they compare to
the novel ideas introduced in this thesis.

Finally, Chapter \ref{chap:future-work} discusses several possibilities for
extending this work in the future and Chapter \ref{chap:conclusions} presents
our conclusions, emphasizing this thesis's original contributions.
