Our middleware approach, Context-Oriented Software Middleware (COSM), supports context-dependent software with self-adaptability and dependability in a mobile computing environment. The COSM-middleware is a generic and platform-independent adaptation engine, which performs a runtime composition of the software's context-dependent behaviours based on the execution contexts. Our middleware distinguishes between the context-dependent and context-independent functionality of software systems. This enables the COSM-middleware to adapt the application behaviour by composing a set of context-oriented components, that implement the context-dependent functionality of the software. Accordingly, the software dependability is achieved by considering the functionality of the COSM-middleware and the adaptation impact costs. The COSM-middleware uses a dynamic policy-based engine to evaluate the adaptation outputs and verify the fitness of the adaptation output with the application's objectives, goals and the architecture quality attributes. These capabilities are demonstrated through an empirical evaluation of a case study implementation.
For a more complex context-aware system, the same context information would be triggered in different parts of an application and would trigger the invocation of additional behaviours. In this way, context handling becomes a concern that spans several application units, essentially crosscutting into the main application execution. A programming paradigm aiming at handling such crosscutting concerns (referred to as aspects) is AOP @cite_4 . DAOP has emerged to enforce Separation of concerns and support runtime adaptations through weaving code blocks in the application execution @cite_17 . The assumptions made by the COP and AOP approaches, i.e. that the developer knows all the possible software adaptations in advance and designs the application accordingly, is not sufficient to fulfil this need. In addition, in COP and AOP @cite_26 , the context model and the adaptation logic are explicitly hard-coded in the application's business code @cite_11 ; this often leads to poor scalability and maintainability @cite_10 . In contrast, cosd separates the context model and the adaptation logic from the application code, which provides the software with the ability to adapt different context models at runtime without maintaining or modifying the application's business code @cite_25 .
@cite_26 @cite_4 @cite_17 @cite_10 @cite_25 @cite_11
2091287679 1978875190 2122853526 2097271361
Context-oriented programming is an emerging technique that enables dynamic behaviour variation based on context changes. In COP, context can be handled directly at the code level by enriching the business logic of the application with code fragments responsible for performing context manipulation, thus providing the application code with the required adaptive behavior. Unfortunately, the whole set of sensors, effectors, and adaptation processes is mixed with the application code, which often leads to poor scalability and maintainability. In addition, the developers have to surround all probable behavior inside the source code. As an outcome, the anticipated adjustment is restricted to the amount of code stubs on hand offered by the creators. Context-driven adaptation requires dynamic composition of context-dependent parts. This can be achieved trough the support of a component model that encapsulates the context-dependent functionality and decouples them from the application's core-functionality. The complexity behind modeling the context-dependent functionality lies in the fact that they can occur separately or in any combination, and cannot be encapsulated because of their impact across all the software modules. Before encapsulating crosscutting context-dependent functionality into a software module, the developers must first identify them in the requirements documents. This requires a formal development paradigm for analyzing the context-dependent functionality; and a component model, which modularizes their concerns. COCA-MDA is proposed in this article as model driven architecture for constructing self-adaptive application from a context oriented component model. Index Terms— Adaptable middleware, Context oriented component, Self-adaptive application, Object. Context-oriented programming (COP) provides dedicated support for defining and composing variations to a basic program behavior. A variation, which is defined within a layer, can be de- activated for the dynamic extent of a code block. While this mechanism allows for control flow-specific scoping, expressing behavior adaptations can demand alternative scopes. For instance, adaptations can depend on dynamic object structure rather than control flow. We present scenarios for behavior adaptation and identify the need for new scoping mechanisms. The increasing number of scoping mechanisms calls for new language abstractions representing them. We suggest to open the implementation of scoping mechanisms so that developers can extend the COP language core according to their specific needs. Our open implementation moves layer composition into objects to be affected and with that closer to the method dispatch to be changed. We discuss the implementation of established COP scoping mechanisms using our approach and present new scoping mechanisms developed for our enhancements to Lively Kernel. Context has been playing an increasingly important role to improve the object detection performance. In this paper we propose an effective representation, Multi-Order Contextual co-Occurrence (MOCO), to implicitly model the high level context using solely detection responses from a baseline object detector. The so-called (1st-order) context feature is computed as a set of randomized binary comparisons on the response map of the baseline object detector. The statistics of the 1st-order binary context features are further calculated to construct a high order co-occurrence descriptor. Combining the MOCO feature with the original image feature, we can evolve the baseline object detector to a stronger context aware detector. With the updated detector, we can continue the evolution till the contextual improvements saturate. Using the successful deformable-part-model detector [13] as the baseline detector, we test the proposed MOCO evolution framework on the PASCAL VOC 2007 dataset [8] and Caltech pedestrian dataset [7]: The proposed MOCO detector outperforms all known state-of-the-art approaches, contextually boosting deformable part models (ver. 5) [13] by 3.3 in mean average precision on the PASCAL 2007 dataset. For the Caltech pedestrian dataset, our method further reduces the log-average miss rate from 48 to 46 and the miss rate at 1 FPPI from 25 to 23 , compared with the best prior art [6]. The increased complexity of performance-sensitive software systems leads to increased use of automated adaptation policies in lieu of manual performance tuning. Composition of adaptive components into larger adaptive systems, however, presents challenges that arise from potential incompatibilities among the respective adaptation policies. Consequently, unstable or poorly-tuned feedback loops may result that cause performance deterioration. This paper (i) presents a mechanism, called adaptation graph analysis, for identifying potential incompatibilities between composed adaptation policies and (ii) illustrates a general design methodology for co-adaptation that resolves such incompatibilities. Our results are demonstrated by a case study on energy minimization in multi-tier Web server farms subject to soft real-time constraints. Two independently efficient energy saving policies (an on off policy that switches machines off when not needed and a dynamic voltage scaling policy) are shown to conflict leading to increased energy consumption when combined. Our adaptation graph analysis predicts the problem, and our co-adaptation design methodology finds a solution that improves performance. Experimental results from a 17-server farm running the industry standard TPC-W e-commerce benchmark show that co-adaptation renders a cut-down in energy consumption by more than 50 , when workload is not high, while maintaining latency within acceptable bounds. The paper serves as a proof of concept of the proposed conflict-identification and resolution methodology and an invitation to further investigate a science for composing adaptive systems.