• Keine Ergebnisse gefunden

7. Ausblick

2.2. Problem Statement

PCOM [BHSR04] represents an exemplary system that fulfills the requirements posed here. This component system initially was developed as a middleware for self-organizing software systems in Mobile Ad Hoc Networks (MANETs) without supporting infrastructure devices. However, the PCOM middleware provides auto-matic adaptation on system level. PCOM supports a wide range of end-user devices and can integrate additional infrastructure devices, but it does not take special care of their computation power and, hence, does not exploit available resources efficiently in many scenarios. Within the system, devices are represented by con-tainers: They host components and manage their dependencies, so they act as a distributed application execution environment. Containers re-use the discovery and communication capabilities of the communication middleware. More details about the specific algorithms and mechanisms as well as the system architecture can be found in Section 3.2.2.

2.2. Problem Statement

In the following, we first discuss the dynamic configuration (Section 2.2.1) of dis-tributed Pervasive Applications in heterogeneous environments, which represents the main challenge we focus on in this work. Based on this discussion, we derive the requirements for an adequate solution in Section 2.2.2.

2.2.1. Dynamic Configuration in Heterogeneous Environments

Configuration denotes the task of determining a valid composition of components that can be instantiated simultaneously as an application. Such a composition is subject to two classes of constraints: Structural constraints, describing the func-tionality that is required by the parent and provided by the children of a specific component for resolving a dependency (e.g., the access to a remote database), and resource constraints due to limited resources (e.g., a single display cannot be used by two applications simultaneously). The complexity of finding a configuration arises from the fact that both types of constraints must be fulfilled coevally. An applica-tion is successfully started if all dependencies have been resolved by a configuration algorithm such that for each contract, a suitable component which satisfies all re-quirements was found.

The problem of configuring an application in a distributed manner can be rep-resented as an NP-complete Distributed Constraint Satisfaction Problem (DCSP) [HBR05]. Generally, a DCSPis a mathematical problem that is defined as a set of objects whose state must satisfy a number of constraints. Backtracking algorithms from the domain of Distributed Artificial Intelligence [YDIK92] represent typical solutions to this problem. More details on Distributed Constraint Satisfaction will follow in Sections 3.1 and 4.1.1.

All of the algorithms considered within this work follow a depth-first search ap-proach. This means that an algorithm proceeds from the top to the bottom of the tree and, within a sublevel of the tree, from left to right. Whenever an algorithm

has found a suitable component for a contract dependency, this component is added to the so-calledassembly, which represents the configuration that has been found so far.

Dynamic configuration means that the validity of calculated configurations needs to be maintained even in environments where the availability of specific components dynamically changes, e.g., due to device failures or user mobility. In such situations, components which are part of the current application configuration may become unavailable during application execution. This induces that the respective parts of the configurations have to be adapted at runtime. Then, the corresponding con-tracts that are conflicted have to be identified by the configuration algorithm, and alternative components have to be found which can provide the same functionality.

Therefore, a currently instantiated component of another contract has to be stopped to free resources, and an alternative component that fulfills this contract’s require-ments with less resource consumption has to be instantiated afterwards. If it is not considered whether the adapted contract requires the same type of resource as the conflicted contract, it is possible that many adaptations are needless since they do not solve the problem. Then, the number of necessary adaptations increases and leads to an additional configuration latency. This undesired effect is calledthrashing and has to be avoided by providing efficient configuration algorithms.

While the configuration latency comprises the time between the user’s applica-tion start and the availability of the applicaapplica-tion to the user, the adaptation la-tency covers the time span between the unavailability of specific components until the re-execution of the application after alternative components have been found.

Configuration and adaptation latencies include the delays for (re-)calculating the configuration and instantiating all application components. Both latencies should be minimized to provide a seamless user experience even in dynamically changing scenarios.

The configuration and adaptation problems have already been solved for homo-geneous scenarios by providing decentralized algorithms for peer-based application composition (e.g., [HBR05, HHS+07]). However, decentralized schemes perform suboptimal in heterogeneous environments, since they do not exploit the scenario heterogeneity by distributing the configuration tasks in a resource-aware manner among the currently available devices. To provide such efficient heterogeneity sup-port, issues like distinguishing resource-rich from resource-poor devices, distributing the load in a unique manner among several devices, or the provision of configuration schemes tailored to specific scenarios and the automatic selection of a fitting scheme have to be regarded. In this article, we present solutions to these issues.

2.2.2. Non-functional Requirements

Besides the functional requirement of providing a valid composition in dynamic en-vironments, there are several non-functional requirements that an adequate solution has to fulfill. According to the challenges discussed above, we pose the following non-functional requirements to configuration and adaptation processes:

2.2. Problem Statement 47

• Adaptivity: Pervasive Computing scenarios are characterized by a high de-gree of dynamics, as they involve mobile devices with limited battery ca-pacities. Thus, the execution environment of an application may change dynamically. As different environments promote different configuration ap-proaches, the provision of approaches optimized for specific scenarios is manda-tory. Moreover, the most suitable approach has to be selected automatically.

This means that the chosen configuration algorithm needs to be automatically adapted in dynamically changing scenarios.

• Automation: Many related projects demand users or application program-mers to handle configuration and adaptation issues. However, providing an automated solution where only the system software is responsible for deter-mining valid configurations yields Pervasive Computing systems that are much more transparent to users and application developers.

• Efficiency: Configuration and adaptation calculations induce latencies which users perceive as undesired delays, as the application is not available before these processes are completed. To sustain the user’s interest for distributed applications, these distractions should be as low as possible. Thus, a major goal is to achieve efficiency by minimizing the arising configuration latencies.

• Resource-Awareness: In heterogeneous environments, the computation re-sources on the available devices differ significantly. To exploit this heterogene-ity effectively and avoid bottlenecks for the configuration, solutions have to be aware of the computation resources of the involved devices. Crucial tasks within a configuration should be performed by the resource-richest devices, as they can perform these tasks much faster than slow devices.

• Resource Conservation: Many scenarios involve a fixed set of applications and devices which are frequently used. As the involved devices undergo a sim-ilar configuration process whenever an application is launched, starting a com-position from scratch every time unnecessarily wastes computation resources on the configuration devices. Instead, theresults of previous configuration pro-cesses have to be analyzed, cached, and automatically integrated into future configurations to reduce the complexity of the configuration problem in terms of the number of components that have to be configured.

3

Related Work

In this chapter, we give an overview of those projects and research efforts dealing with issues which are also highlighted in this thesis. Initially, we describe algorithms that solve Constraint Satisfaction Problems in Section 3.1. Following in Section3.2, we present related research projects that also focus on service composition in Perva-sive Computing. Here, we distinguish between projects which rely on heterogeneous infrastructure-based environments (Section 3.2.1), and projects which concentrate on homogeneous mobile Ad Hoc scenarios (Section 3.2.2). As clustering a group of nodes is used in this thesis to separate different classes of devices, we give a summary of related work on clustering frameworks in Section 3.3. Finally in Section 3.4 of this chapter, we discuss projects that try to exploit the results gained from previous configuration runs, which is also one of the main issues here.

3.1. Algorithms for Solving Constraint Satisfaction