Psychology

An aspect-oriented and model-driven approach for managing dynamic variability

Description
An aspect-oriented and model-driven approach for managing dynamic variability
Categories
Published
of 15
All materials on our website are shared by users. If you have any questions about copyright issues, please report us to resolve them. We are always happy to assist you.
Related Documents
Share
Transcript
  An Aspect-Oriented and Model-Driven Approach forManaging Dynamic Variability ⋆ Brice Morin 1 , Franck Fleurey 2 , Nelly Bencomo 3 ,Jean-Marc J´ez´equel 1 , Arnor Solberg 2 , Vegard Dehlen 2 , and Gordon Blair 3 1 IRISA/INRIA Rennes, Equipe Triskell, Campus de Beaulieu, 35042 Rennes Cedex, France 2 SINTEF, Oslo, Norway 3 Computing department, InfoLab21, Lancaster University, LA1 4WA, United Kingdom Abstract.  Constructing and executing distributed systems that can adapt to theiroperating context in order to sustain provided services and the service qualitiesare complex tasks. Managing adaptation of multiple, interacting services is par-ticularly difficult since these services tend to be distributed across the system,interdependent and sometimes tangled with other services. Furthermore, the ex-ponential growth of the number of potential system configurations derived fromthe variabilities of each service need to be handled. Current practices of writinglow-level reconfiguration scripts as part of the system code to handle run timeadaptation are both error prone and time consuming and make adaptive systemsdifficult tovalidate and evolve. In this paper, we propose to combine model drivenand aspect oriented techniques to better cope with the complexities of adaptivesystems construction and execution, and to handle the problem of exponentialgrowth of the number of possible configurations. Combining these techniquesallows us to use high level domain abstractions, simplify the representation of variants and limit the problem pertaining to the combinatorial explosion of pos-sible configurations. In our approach we also use models at runtime to generatethe adaptation logic by comparing the current configuration of the system to acomposed model representing the configuration we want to reach. 1 Introduction Context aware software systems that can automatically adapt to changes in their en-vironments play increasingly vital roles in society’s infrastructures. The demand foradaptive systems appears in many application domains, ranging from crisis manage-ment applications such as disaster and power management, to entertainment and busi-ness applications such as mobile interactive gaming, tourist guiding and business col-laborations.However, constructing and executing adaptive systems are highly complex tasksfacing several challenges. Adaptive software systems are typically deployed on dis-tributed platforms consisting of heterogeneous computing devices. The target platformsfor a single system can range from computer networks of any size to small portable de-vices, such as phones or PDAs. Furthermore, a system is composed of componentswith variable configurations that might have dependency relationships that need to be ⋆ This work was partially funded by the DiVA project (EU FP7 STREP)  resolved during adaptation; thus, compounding the complexity. Better techniques fortaming the complexity of adaptive software during development are needed. Anotherchallenge in adaptive system construction and execution is the issue of combinatorialexplosion. Adaptive systems are often developed by defining several variation points,which represents points in the software where different variants of the implementa-tion might be chosen to derive the final system configuration. Resolving these variationpoints leads to an exponential growth in the number of possible system configurations.This presents a major problem, since reasoning on a huge number of configurations tofind the best possible configuration for the current context becomes too time consumingwhen considering the often strict requirements to response times these systems face.Abstraction is the most fundamental principle applied in software engineering toencounter a continuously wider range of problems and increasing complexity [20]. InModel Driven Engineering (MDE), abstractions and transformations between levels areused to manage complexity. For example, the Model Driven Architecture (MDA) speci-fies three abstraction levels; a Computation Independent Model (CIM) describes the en-vironment and specifies requirements; a Platform Independent Model (PIM) describesthe parts that do not change from one platform to another; and a Platform SpecificModel (PSM) includes descriptions of platform dependent parts. Another principle thatare commonly applied in software engineering to handle complexity are separation of concern.AspectOrientedModeling(AOM)approachesprovidesadvancedmechanismsfor separation of concern such as mechanisms for encapsulating crosscutting featuresand for composing crosscutting features to form integrated models [9,13–15].In this paper we present a new approach where we address challenges in adaptivesystem construction and execution by combining certain aspect-oriented and model-driven techniques. In particular we use: –  Aspect-Oriented Modeling techniques in order to tackle the issue of the combina-torial explosion of variants. AOM allows us to encapsulate distinct variation pointsinto aspects which are separated from the base model of the system’s functionality.Then, distinct aspects might be composed into the base model in order to obtaindifferent configurations. This approach allows us to reason on a limited and lin-early increasing number of aspects, thus avoiding the problem of combinatorialexplosion seen in other approaches. –  Model-Driven techniques to automate and improve the creation of the reconfigu-ration script needed to make the running system evolve from one configuration toanother. Currently the adaptation logic of adaptive middleware relies on the exe-cution of low-level and hand-written reconfiguration scripts, which specify all thepossible transitions between the configurations. As these scripts decide how sys-tems - possibly critical to safety - are manipulated at runtime, they require rigorousvalidation. Such a process is both time consuming and, even worse, prone to humanerrors. Instead of manually writing these scripts, we apply model driven techniquesto generate them by analyzing the different variants of the system. In addition weapply model driven principles to provide models at run time for managing the exe-cution of the adaptation at a more abstract level. This enable us to provide abstrac-tions fine-tuned towards the adaptation task, reducing complexity. Furthermore, itmakes our approach applicable on many execution platforms since our models atruntime is provided as platform independent models.  The remainder of this paper is organized as follows. Section 2 introduces a runningexample and presents some background. Section 3 presents our methodology for man-aging dynamic variability. Section 4 details our approach using the running example.Section 5 presents related works and Section 6 provides our conclusion. 2 Motivating Example This section presents a brief background on management and support for variability inthe context of dynamic adaptive systems, based on [1]. We next discuss the limitationsof this approach and the solutions we propose. The discussion is in the context of mo-bile computing environments applications which need to dynamically discover servicesfrom a wide range of options that may be unknown during design. Such kind of appli-cations propose a simple yet powerful motivating example of systems that need supportfor dynamic variability.Traditionally, variability management has focused on variability that is solved atpredelivery time, i.e. from requirements to deployment. However, adaptive systems ex-hibit degrees of variability that depend on runtime fluctuations in their contexts. Thiskind of variability is called dynamic variability or runtime variability [1]. Reflectiveand adaptive middleware platforms offer powerful mechanisms to achieve dynamicvariability to enable adaptation at runtime. These mechanisms allow programmers tohard-code reconfiguration scripts to dynamically transform one component-based con-figuration into another. 2.1 Dynamic service discovery for mobile applications Mobile applications need to dynamically adapt according to changes in their operatingcontexts. Mobile devices such as PDAs, mobiles, or laptops are capable of detectingand notify the user about new available services according to his/her preferences. Thecomplexity arises from the fact that mobile adaptive applications are expected to sup-port unanticipated variants associated with user preferences and properties of operatingcontexts that inevitably will arise during execution. Furthermore, different designs forservice discovery protocols (SDPs) have been proposed. Hence, it may not be possi-ble to completely specify at design time user preferences, properties associated withthe contexts, or which protocols will be used to advertise services in a given contextexecution.[8] presents a solution to overcome the challenges posed by heterogeneous servicediscovery protocols. The solution offers a common core architecture that individualdiscovery protocols follow. Using the final architecture, discovery protocols can be im-plemented and dynamically plugged into the middleware platform. Hence, different ser-vice discovery protocols can be used to discover services advertised by heterogeneousplatforms. Furthermore, different policies can be uploaded during runtime to dynami-cally update the behavior of the application. Using this solution, the service discoveryinteraction platform from our example can take different roles that individual protocolscould assume:- User Agent ( UA )  to discover services on behalf of clients,- Service Agent ( SA )  to advertise services, and,  Fig.1.  Common Architecture and its Configurations - Directory Agent (  DA )  to support a service directory where  SA s register their ser-vices and  UA s send their service requests. A DA also announces positive matches of requests against advertisements.Depending on the required functionality, participating nodes might be required tosupport 1,2, or the 3 roles at any time. The common architecture, which is shown inFigure 1, has six components: -Advertiser Component:  used by  SA s to advertise its services and by  DA s to pro-cess incoming service advertisements storing them in cache. This component also dealswith the maintenance of a directory overlay network. -Request Component:  used by  UA  and  DA s to generate service requests. -Reply Component:  used by  UA s and  DA s to generate service replies. -Cache Component:  for common utility tasks such as management of temporarydata, service advertisements, and location of neighboring directories. -Policy Component:  this component stores and deals with user preferences, appli-cation needs and/or inclusive context requirements. -Network Component:  for the transmission of messages.  Network  ,  Cache  and  Policies  components will always be present in any valid config-uration. The other three components and their bindings will be part of the configurationor not, depending on the roles the protocol might perform (i.e.  SA ,  UA , or  DA ). Hence,roles (agents) directly define the configuration (variants). Figure 1 shows three differ-ent configurations which are compliant with the architecture to support either a  UA  or SA  role by restricting the number of components to only those required to provide thedetermined functionality. By using a complete framework configuration, a  DA  can alsobe supported.In [1,2], authors complement the solution shown above targeting the developmentof adaptive systems. This approach uses the Genie toolkit [1], to design stable runtimeconfigurations, as well as the possible triggers that initiate the reconfigurations. In thecase of the example above, the UA, SA, and DA are the possible configurations to beused by any specific SDP. At the end of the process, a state-machine model is producedwhere each state represents a configuration and each transition represents a conditionalreconfiguration that transforms the source configuration into the target configuration.  Essentially, this state machine model drives the execution of the system. Using theGenie toolkit and the state machine model, designers can automatically generate XMLfiles that represent the adaptation policies associated to transitions. Such policies can bedynamically introduce to change the behavior of the system during execution. Figure 2illustrates the state machine model for the dynamic service discovery application andan example of a generated adaptation policy associated with the arc (pointed by thearrow from the top arc of the model to the generated policy). The approach has alsobeen applied to consider configurations and reconfigurations associated with differentdomains such as routing protocols and networking technologies [2]. Fig.2.  Variants and transitions for the service discovery application 2.2 Limitations of existing approaches The approach described in [1] presents several limitations. First, the possible systemconfigurations need to be enumerated and fully specified. Secondly, the generated poli-cies mainly specify the trigger events and which reconfiguration scripts have to beloaded to adapt the system from one state mode (i.e. agent role) to another. These scriptsare currently hand-written using the API offered by the underlying execution platform.Finally, each state mode represents the whole system, in a given configuration. This isnot enough in some cases. For example, in the case of the dynamic service discoveryapplication described above, there is another variability dimension associated with thespecific protocol to use such as ALLIA, GSD, SSD, SLP [8]. Each of these proto-cols has its own terms and rules. Therefore, in order to get a service agent and a useragent understanding each other, they need to use the same protocol. Taking into accountdifferent protocols increments the number of configurations and rules needed. 2.3 Contributions The contribution of our proposed approach is twofold. Firstly, we argue that the recon-figuration scripts described above can also be inferred from the models, by comparing
Search
Related Search
We Need Your Support
Thank you for visiting our website and your interest in our free products and services. We are nonprofit website to share and download documents. To the running of this website, we need your help to support us.

Thanks to everyone for your continued support.

No, Thanks