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
2161291379 1970558557 2109097634 2091287679 1978875190
Context-aware applications behave differently depending on the context in which they are running. Since context-specific behavior tends to crosscut base programs, it can advantageously be implemented as aspects. This leads to the notion of context-aware aspects, i.e., aspects whose behavior depends on context. This paper analyzes the issue of appropriate support from the aspect language to both restrict the scope of aspects according to the context and allow aspect definitions to access information associated to the context. We propose an open framework for context-aware aspects that allows for the definition of first-class contexts and supports the definition of context awareness constructs for aspects, including the ability to refer to past contexts, and to provide domain- and application-specific constructs. When using Aspect Oriented Programming in the development of software components, a developer must understand the program units actually changed by weaving, how they behave, and possibly correct the aspects used. Support for rapid AOP prototyping and debugging is therefore crucial in such situations. Rapid prototyping is difficult with current aspect weaving tools because they do not support dynamic changes. This paper describes PROSE (PROgrammable extenSions of sErvices), a platform based on Java which addresses dynamic AOP. Aspects are expressed in the same source language as the application (Java), and PROSE allows aspects to be woven, unwoven, or replaced at run-time. Context constitutes an essential part of service behaviour, especially when interaction with end-users is involved. As observed from the literature, context handling in service engineering has been during recent years a field of intense research, which has produced several interesting approaches. In this paper, we present research efforts that attempt mainly to decouple context handling from the service logic. We enumerate all context management categories, but focus on the most appropriate for service engineering, namely source code level, model-driven and message interception, taking also into account the fact that these have not been dealt with in detail in other surveys. A representative example is used to illustrate more precisely how these approaches can be used. Finally, all three categories are compared based on a number of criteria. 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.