As the computing and communication infrastructure continues to expand and diversify, the need for adaptability in software is growing. Adaptability is especially important to pervasive computing, which promises anywhere, anytime access to data and computing resources. The need for adaptation in pervasive computing applications is particularly evident at the "wireless edge" of the Internet, where software in mobile devices must balance several conflicting concerns, including quality-of-service, security, fault-tolerance, and energy consumption. We say that an application is adaptable if it can change its behavior dynamically (at run time). Developing and maintaining adaptable software are nontrivial tasks, however. Even more challenging is to enhance existing programs so that they execute effectively in new, dynamic environments.; We propose a new programming model called transparent shaping , which supports dynamic adaptation in existing programs. The key insight in transparent shaping is the synergy resulting from the integration of four key fundamental technologies: aspect-oriented programming to enable separation of concerns at development time, behavioral reflection to enable software reconfiguration at run time, component-based design to enable independent development and deployment of adaptive code, and adaptive middleware to hide the adaptive behavior from the functional code. The major contributions of this dissertation can be summarized as follows.; First, we assess the effectiveness and expressiveness of language support in developing adaptable components separately from the functional code. In a case study, we use the Adaptive Java language to design and evaluate a component called MetaSocket, whose behavior and structure can be adapted at run time in response to external stimuli. We demonstrate how MetaSockets can be used to support adaptation in mobile computing environments.; Second, we investigate how to enhance existing application code transparently in order to support dynamic adaptation. We propose transparent reflective aspect programming (TRAP), a development model that enables partial behavioral reflection in existing object oriented programs. The reflection model provided enables separation of crosscutting concerns at run time with minimal overhead.; Third, we demonstrate the use of existing adaptive middleware frameworks to support transparent shaping of distributed applications. As a proof of concept, we propose the ACT framework, which enables new behavior to be added dynamically (and transparently) to running CORBA applications. We demonstrate how ACT can support both adaptation in pervasive computing contexts and interoperability with other middleware frameworks.; Fourth, we assess the potential role of transparent shaping beyond the domain of a single program, specifically to support application integration. We propose several alternative architectures that can be used to integrate heterogeneous applications, while the interoperation is transparent with respect to the applications and distribution middleware.
展开▼