mdd approach for the design of context-aware applications

27
MDD approach for the Design of Context-Aware Applications

Upload: ann-lynch

Post on 29-Jan-2016

222 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: MDD approach for the Design of Context-Aware Applications

MDD approach for the Design of

Context-AwareApplications

Page 2: MDD approach for the Design of Context-Aware Applications

Outline

Problem Objectives MDD approach: overview MDD approach phases / UML profile

for context-aware applications Conclusion, Future Work

Page 3: MDD approach for the Design of Context-Aware Applications

Problem (1)

Design and development of context-aware applications is complex.

Context: Acquired from heterogeneous and distributed

sources (sensors, files, applications) Dynamic, require an additional interpretation

Adaptation process: Can be based on different types of mechanisms Can be related to the semantics of the application.

Context-aware applications need specific development mechanisms.

Page 4: MDD approach for the Design of Context-Aware Applications

Problem (2)

Several middleware products have been defined to ease the development of context-aware applications

Applications developed with the existing middleware: not portable Include technical details that are specific to a

given technology their reuse on a different technology require

their redevelopment.

Page 5: MDD approach for the Design of Context-Aware Applications

Objective

Concentrate efforts on application design

Modeling the application independently from the platform

Generate automatically the code for several platforms.

Need of specific design concepts and modeling tools for context-aware applications

Page 6: MDD approach for the Design of Context-Aware Applications

Outline

Problem Objectives MDD approach: overview MDD approach phases / UML profile

for context-aware applications Conclusion, Future Work

Page 7: MDD approach for the Design of Context-Aware Applications

MDD Approach: Overview

1- Identification of the required context information

Platform independent model of the context collection

Platform independent model of the application adaptation

Abstract model of the context platform

Abstract model of the adaptation platform

Platform specific models of the context collection, application adaptation, and non-functional

services variability

5- Definition of the target platform and model to model transformations

6- Code generation

Output/Input

Feedback

3- Identification of the context collection mechanisms

4- Identification of the adaptation mechanisms

2- Definition of application variability

Page 8: MDD approach for the Design of Context-Aware Applications

Phase1: Context Requirements

Context types Collection requirements Context quality: precision,

correctness, levelOfTrust, etc. Identification of the relevant

context states

Page 9: MDD approach for the Design of Context-Aware Applications

UML Extensions for Context Modeling

Page 10: MDD approach for the Design of Context-Aware Applications

Phase2: Application Variability

Specification: how the application reacts to the context

Types of adaptation: Architectural adaptation: consists in adding

and deleting objects to an application Structural adaptation: modifies the objects’

structure by for example adding or deleting methods or attributes to the objects.

Behavioral adaptation: adapts the behavior of the applications’ objects.

Page 11: MDD approach for the Design of Context-Aware Applications

Architectural Adaptation

Page 12: MDD approach for the Design of Context-Aware Applications

Structural Adaptation

Page 13: MDD approach for the Design of Context-Aware Applications

Behavioral Adaptation

Page 14: MDD approach for the Design of Context-Aware Applications

Profile Structure

<<stereotype>>

Optional<<stereotype>>

VariableStructure

<<stereotype>>

Variation

contextStateIds: Set

<<metaclass>>

Class

StaticAdaptationAspect

<<profile>> Context-Aware Profile

<<stereotype>>

VariableSequence<<stereotype>>

OptionalLine

<<stereotype>>

SequenceVariant

contextStateIds: Set

<<metaclass>>

Lifeline

DynamicAdaptationAspect

<<metaclass>>

Interaction

contextStateIds: Set

Page 15: MDD approach for the Design of Context-Aware Applications

Phase3: Context Collection Mechanisms

o Approach the platform that will be used to collect context

o Define an abstract model of the platform

o Types of sensors: physical sensors, logical sensors, virtual sensor

o Preprocessing : Aggregation/composition Reasoning

Page 16: MDD approach for the Design of Context-Aware Applications

UML Extensions for Context Collection Mechanisms Modeling

<<stereotype>>

PhysicalSensor

technology: String

<<stereotype>>

Sensor

properties: Setparameters: Set

<<stereotype>>

LogicalSensor

softwareEntity: String

<<metaclass>>

Class <<metaclass>>

Association

<<stereotype>>

collect

StaticContextMechanisms

<<profile>> Context-Aware Profile

<<stereotype>>

aggregate

<<stereotype>>

VirtualSensor

softwareEntity: String

Page 17: MDD approach for the Design of Context-Aware Applications

Phase 4: Adaptation Mechanisms

Approach the platform that will be used to perform adaptations

Define an abstract model of this platform. Identify the mechanisms that are required to

adapt the application: Reflection Contracts AOP Component-based paradigm

Page 18: MDD approach for the Design of Context-Aware Applications

UML Extensions for Adaptation Mechanisms Modeling

<<stereotype>>

StaticAdaptationMechanism

conditions: Set

<<metaclass>>

Class <<metaclass>>

Association

<<stereotype>>

RequiredMechanism

StaticAdaptationMechanisms

<<profile>> Context-Aware Profile

<<stereotype>>

DynamicAdaptationMechanism

conditions: Set

<<metaclass>>

Interaction

DynamicAdaptationMechanisms

Page 19: MDD approach for the Design of Context-Aware Applications

Step 5: Target Platform and Model to Model Transformations

Define abstract transformations that transform models without introducing technical details

Define concrete transformations to generate platform-specific models

Three steps: Definition of non-functional transformations Definition of the Target Platform Definition of technical Transformations

Page 20: MDD approach for the Design of Context-Aware Applications

Non-functional Transformations

Identify the non-functional services required by the application: distribution, security, deployment, etc.

Non-functional services are required to be adaptive.

Goal: automatically generate the variability models of non-functional services

Transformations of the application variability

Generate variability models of non-functional services

Page 21: MDD approach for the Design of Context-Aware Applications

Non-functional transformations

rule optional {from class : UML!Class (class.hasStereotypeApplied('Optional'))to optionalInteraction : UML!Interaction mapsTo class (

name <- 'deploy()', message <- deployMessage, message <- instantiateMessage, message <- deleteMessage, fragment <- combinedFragment),

variableSequenceStereotype : UML!Stereotype mapsTo class (name <- 'VariableSequence'),

--…

Page 22: MDD approach for the Design of Context-Aware Applications

Definition of the Target Platform

Study the existing context and adaptation platforms

Choose the one that best satisfies the required context and adaptation mechanisms

Extend the platforms according to the requirements

Page 23: MDD approach for the Design of Context-Aware Applications

Technical transformations

Generation for several platforms PIM to PSMs

Page 24: MDD approach for the Design of Context-Aware Applications

Implementation

Context-Aware Profile : MagicDraw UML 12.0

Context target platform: Context Toolkit

Adaptation target platform: CARISMA

Model to model transformations are implemented in ATL

UML to XML transformations in XSLT

Page 25: MDD approach for the Design of Context-Aware Applications

Conclusion(1)

Design and development of context-aware applications is complex. Require the identification of the context

information that has an impact on the application The specification of the various behaviors of the

application according to this context information. Apply an MDD approach in the design and

development of context-aware applications: Concentration of efforts on applications design. Facilitates the verification of the applications

before their integration. Reduces the risk of error and the complexity of

context-aware applications.

Page 26: MDD approach for the Design of Context-Aware Applications

Conclusion(2)

Phases cover preparation activities, structure and plan the work

Step by step approach provides extensibility and reusability

Transformations: more general sense of separation of concerns than just pure technical concerns

A context-aware UML profile to model context-aware applications independently from the platform.

Page 27: MDD approach for the Design of Context-Aware Applications

Future Work

Methods to check the consistency of the adaptation rules during the design of applications.