study and application of model driven development approach from web services to ubiquitous computing...

80
Study and application of Model Driven Development Approach From Web services to Ubiquitous computing Slimane Hammoudi ESEO Angers, France [email protected] http://perso.eseo.fr/~shammoudi/ 1

Upload: raulf-gallet

Post on 03-Apr-2015

105 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Study and application of Model Driven Development Approach From Web services to Ubiquitous computing Slimane Hammoudi ESEO Angers, France slimane.hammoudi@eseo.fr

Study and application of Model Driven Development Approach

  From Web services to Ubiquitous computing

Slimane HammoudiESEO

Angers, France

[email protected]

http://perso.eseo.fr/~shammoudi/

1

Page 2: Study and application of Model Driven Development Approach From Web services to Ubiquitous computing Slimane Hammoudi ESEO Angers, France slimane.hammoudi@eseo.fr

1. Introduction: Web Services, MDA and MDE

2. Transformation process: mapping versus transformation

3. MDA for Web services

4. Conclusion on MDA for Web services

5. Ubiquitous computing and context–aware services (CWS)

6. Context and context-awareness

7. Conceptual architecture for CWS

8. MDA for CWS

9. Transformation process: merging versus parameterization

10. Conclusion on MDA for CWS

11. Towards adaptable SOA : MDD, context and aspects

12. Towards a semi automatic transformation process in MDD

Contents

2

Page 3: Study and application of Model Driven Development Approach From Web services to Ubiquitous computing Slimane Hammoudi ESEO Angers, France slimane.hammoudi@eseo.fr

Network

Travel Agency Airlines

RentCar

Hotel

Client

Client

Client

- Interoperability on Internet ? - One Unique Middleware?

?

?

?

?

?

?

?

Internet/Intranet

XML-RPCDCOM/COM+

CORBA-IIOP

EDI-standards

CORBA-IIOP

DCOM/COM+

HTTP/HTMLCGI

RPCJava RMI

EDI-standards

CORBA-IIOPDCOM/COM+

Before the WebMiddleware «  Era  »

Web Services ! Standard (XML, SOAP, WSDL et UDDI)

W3C, OASIS

1. Introduction Web Services for E-Applications (B2B, B2C,…etc).

3

Page 4: Study and application of Model Driven Development Approach From Web services to Ubiquitous computing Slimane Hammoudi ESEO Angers, France slimane.hammoudi@eseo.fr

XML EVERYWHERE

Web Services : Main Technologies - Standard

1. Introduction:Web Services

SERVICE

4

Page 5: Study and application of Model Driven Development Approach From Web services to Ubiquitous computing Slimane Hammoudi ESEO Angers, France slimane.hammoudi@eseo.fr

1. Introduction:Web Services

5

Page 6: Study and application of Model Driven Development Approach From Web services to Ubiquitous computing Slimane Hammoudi ESEO Angers, France slimane.hammoudi@eseo.fr

1. Introduction: Model Driven Architecture

• First crisis: 1965 – Main problem: collective programming – Solutions: (NATO Summer School 1967 & 1968 in Garmisch-Partenkirchen)

• "Software engineering"• "Structured programming"• "Top-down approaches“

• Second crisis: 2000– Main problem: rapid platform evolution but, more generally,

complexity management – Solutions: (OMG November 2000 white paper):

• MDA : Decouple neutral business models from variable platforms• From code-centric to model-centric approaches • "Transformations as assets"

Bézivin, Guest Talk, UML’03

6

Page 7: Study and application of Model Driven Development Approach From Web services to Ubiquitous computing Slimane Hammoudi ESEO Angers, France slimane.hammoudi@eseo.fr

Raising Abstraction Level Raising Abstraction Level to Modelsto Models

Applications are Applications are constructed from modelsconstructed from models

• Less implementation Less implementation efforteffort

Whole system is Whole system is represented in a modelrepresented in a model

Code generators generate Code generators generate executable systemsexecutable systems

MDAMDA• OMG (MOF, UML, CWM)OMG (MOF, UML, CWM)

ModelModel Driven Engineering Driven Engineering• More generic, not OMG More generic, not OMG

specificspecific

1. Introduction: Model Driven Architecture

How Systems will be Built

7

Page 8: Study and application of Model Driven Development Approach From Web services to Ubiquitous computing Slimane Hammoudi ESEO Angers, France slimane.hammoudi@eseo.fr

Platform Independent Model (PIM)

PIM has role of source code

Platform Specific Models (PSM)

Platform code generated from PSM

PIM

PSM (1)Relational-DB

PSM (3)Web Service

System Code Oracle/DB2

System Code .NET/J2EE

PSM (2)EDOC_CCA

System Code EJB/CORBA-CCM

1. Introduction : Model Driven Architecture

8

Page 9: Study and application of Model Driven Development Approach From Web services to Ubiquitous computing Slimane Hammoudi ESEO Angers, France slimane.hammoudi@eseo.fr

CORBA

Java/EJB

C#/DotNet

Web/XML/SOAP

PIM

etc.

Platform-IndependentModel

Multi-targetcode generation

+ SVG, GML, Delphi, ASP, MySQL, PHP, etc.

data grid computingpervasive computingcluster computing

SMIL/Flash

1. Introduction : Model Driven ArchitectureWrite Once, Run AnywhereModel Once, Generate Anywhere

9

[Bézivin 2003]

Page 10: Study and application of Model Driven Development Approach From Web services to Ubiquitous computing Slimane Hammoudi ESEO Angers, France slimane.hammoudi@eseo.fr

UML/MOF

XML/SOAP

XMI/XSLTprojection

CORBA

IDLJava/EJB

JSR #40Java User

Community (Sun)

C#/DotNet

AbstractModelingSpace

ConcreteExecutionSpaces

Platform Independant Models

1. Introduction : Model Driven Architecture

Platform SpecificModels

10

Page 11: Study and application of Model Driven Development Approach From Web services to Ubiquitous computing Slimane Hammoudi ESEO Angers, France slimane.hammoudi@eseo.fr

PIM

PSM PSM

Platforms ofthe past

Platforms ofthe future

Platforms ofthe present

Legacy,Cobol, ADA, etc.

Java, EJB, J2EE, etc. ????

Grid, Cluster,P2P architectures

But also backward

1. Introduction : Model Driven Architecture

11

Page 12: Study and application of Model Driven Development Approach From Web services to Ubiquitous computing Slimane Hammoudi ESEO Angers, France slimane.hammoudi@eseo.fr

1. Introduction : Model Driven Architecture

12

From MDA to MDE

- Different framework- Different technological spaces

DBWareOntoWareModelWare……………

Page 13: Study and application of Model Driven Development Approach From Web services to Ubiquitous computing Slimane Hammoudi ESEO Angers, France slimane.hammoudi@eseo.fr

MDA Overview: (3 + 1 ) layers of Architecture

The MOF MMM

The EDOC MM The UML MM The CWM MM

A UML modelm1

A UML modelm2

A particularuse of m1

Another use ofm1

conformsTo

conformsToconformsToconformsTo

conformsTo conformsTo

representedByrepresentedBy

Leve

l M3

Leve

l M2

Leve

l M1

Leve

l M0

MMM : metametamodel MM : metamodel m : model

Real World

1. Introduction : Model Driven Architecture

13

PI

MVersus

PSM

Page 14: Study and application of Model Driven Development Approach From Web services to Ubiquitous computing Slimane Hammoudi ESEO Angers, France slimane.hammoudi@eseo.fr

The Metamodelling Stack & Main Technologies

PeugeotH-1234

UML Class

MOF Class

representedBy

conformsTo

M0: Objects/Data

ID: string

Type: string

Car

conformsTo

14

1. Introduction : Model Driven Architecture

M1

M2

M3 • MOF, UML, CWM – Modeling Baseline

• XMI– Representation for MOF/UML models

• JMI, EMF– APIs for Java, XMI

• OCL– Enhances models with formal descriptions

• QVT - A standard for model transformation

Page 15: Study and application of Model Driven Development Approach From Web services to Ubiquitous computing Slimane Hammoudi ESEO Angers, France slimane.hammoudi@eseo.fr

MOF

Transformation Metamodel

(ATL,…etc.)Target

Metamodel

Transformation Model (Program)

Source Model

Target Model

Transformation Engine

Source Metamodel

ConformsTo ConformsTo

ConformsToConformsTo

exec

source target

ConformsTo

Transformation : The Heart of MDA

M1

M2

M3

M0

ConformsTofrom to

PIM

PSM

Transformationengine

1. Introduction : Transformation in MDA

15

Page 16: Study and application of Model Driven Development Approach From Web services to Ubiquitous computing Slimane Hammoudi ESEO Angers, France slimane.hammoudi@eseo.fr

Transfo.Instanc

e

Transfo. function

Transf. model

Transfo.program

Transfo Progra.lang.

TransfoMeta-model

Transfo.Interpret

er

MDA GUIDE 1.0 Transfo. MappingInstance

MappingModel

Mappinglangage

MDA DISTILLED Mapping Mappingrule

Mappingfunction

MDA EXPLAINED Transfo. Mappi/Transf rule Transfo.definition

Transfotool

QVT DSTC«Tracking»

Transfo.rule

Transfo. TransfoModel Transf.engine

QVT Partners Transfo.Relation

MappingRelation

[Judso &al 03] Transfo. Transfo.Pattern

[Caplat 03] Mapping Model of Mapping

Mapping formalism

[Peltier 03] TransfoProcess

Transfodescr

« The concept of Transformation is not so clear, since this term can refer to many different concepts » [ Favre, UML 04]

1. Introduction : Transformation in MDA

16

Page 17: Study and application of Model Driven Development Approach From Web services to Ubiquitous computing Slimane Hammoudi ESEO Angers, France slimane.hammoudi@eseo.fr

2. Mapping Versus Transformation in MDA

17

DB Field : Model Management Project [P.Bernstein, MS Research ]

«We define a mapping to be a set of mapping elements, each of which indicates that certain elements of schema S1 are mapped to certain elements in S2. « ...transformation between models, requires an explicit representation of mappings, which describe how two models are related to each other ».

Ontology Field : OntoMerge Project [D.McDermott, Yale Univ]

«It's important to distinguish ontology translation from ontology mapping, which is the process of finding correspondence (mappings) between the concepts of two ontologies. If two concepts correspond, they mean the same thing, or closely related things.

Page 18: Study and application of Model Driven Development Approach From Web services to Ubiquitous computing Slimane Hammoudi ESEO Angers, France slimane.hammoudi@eseo.fr

Mapping versus Transformation[Lopes 2005]

In MDA, MDE

2. Mapping Versus Transformation in MDA

18

Mapping Specification

Transformation Definition

+attrA11:Type1+attrA12:Type2

A1

+attrA21:Type3+attrA22:Type4

A2

+attrB11:Type5+attrB12:Type6

B1

+attrB21:Type7+attrB22:Type8

B2

A2B

Aa2Bb

Source metamodel

Target metamodel

Mapping

Me

source

target Mapping Element

composition

Page 19: Study and application of Model Driven Development Approach From Web services to Ubiquitous computing Slimane Hammoudi ESEO Angers, France slimane.hammoudi@eseo.fr

A Graphical formalism for Mappings

PackageNameSpace

0..10..*+namespace+ownedElement

AssociationEnd

Attribute

Parameter

DataType

ModelElement

GeneralizableElement Generalization+specification

+generalization

+parent

+child0..*

Interface

MethodOperation

Class

+method+specification

0..*

0..*0..*

0..*0..*

JavaElement

JavaPrimitiveType

JavaMethod

JavaParameter

JavaInterface

JavaClass+implementedby+implements

0..*

0..*0..*

+owner+parameter

0..10..*

JavaPackageElementJavaPackage

JavaClassifier+modifier:Modifier+visibility:Visibility0..*

0..1

+super

+sub

+isOfType

+isOfType

JavaField

Ae2F

G2s

A2F

Dt2Pt

P2P

C2C

Pr2Pr

OM2M

UML meta-model Java meta-modelMappings

I2I

2. Mapping Versus Transformation in MDA

19

Page 20: Study and application of Model Driven Development Approach From Web services to Ubiquitous computing Slimane Hammoudi ESEO Angers, France slimane.hammoudi@eseo.fr

Approach Overview

Source M (UML / EDOC)

Source code (Java), Deployment

files, etc.

Source code(C#), Deployment

files, etc.

Model-to-Model

TransformationsTarget M (WS)

Source code (XML)« WSDL document »«  BPEL document  »

PSM

PIM

Code

Target M (J2EE) Target M (dotNet)

Model-to-Code

Transformations

Source code (XML)« WSDL document »«  BPEL document  »

- B2B/B2C as privileged applications- WEB SERVICES as implementation platforms- MDA as a development approach

3. MDA for Web Services

[Lopes 2005]

20

Page 21: Study and application of Model Driven Development Approach From Web services to Ubiquitous computing Slimane Hammoudi ESEO Angers, France slimane.hammoudi@eseo.fr

3. MDA for Web Services

Case study

HotelService

Hotel

CarHire

Bank

AirLinesTravel Agency

TravelService

AirLinesService

RentingCarService

BankService

21

Page 22: Study and application of Model Driven Development Approach From Web services to Ubiquitous computing Slimane Hammoudi ESEO Angers, France slimane.hammoudi@eseo.fr

Definition of Metamodels for PIMs

Definition of Metamodels for PSMs

Mapping Specification Between PIMs and PSMs -Metamodels

Transformation Definition Generation

Transformation Definition Execution (PIM to PSM) -Models

Complete the PSM

Code Generation, scripts, Deployment Files, etc (PSM to code)

[PSM is complete]

[Yes]

[No]

Methodology UML(EDOC)

Web Services

3. MDA for Web Services

22

Page 23: Study and application of Model Driven Development Approach From Web services to Ubiquitous computing Slimane Hammoudi ESEO Angers, France slimane.hammoudi@eseo.fr

WSDLElement Documentation

Type

Part

Message

Operation

PortType

Binding

BindingOperation

Port

Service

Definition

+_targetNameSpace+name

+types0..1

+types

+part0..*+message

0..*

+operation 0..*

+portType0..*+type

+binding0..*

+boperations0..*

+port0..*+service0..*

Package

DataElement

DataType

Attribute

<<boundary>>FlowPort

<<boundary>>Port

<<boundary>ProtocolPort

PortOwner

ProcessComponent

CompositeData+owner+feature1..*

<<boundary>>OperationPort

+type

+ports1..*

EDOC-CCA metamodel WSDL metamodel

3. MDA for Web Services

23

Page 24: Study and application of Model Driven Development Approach From Web services to Ubiquitous computing Slimane Hammoudi ESEO Angers, France slimane.hammoudi@eseo.fr

EDOC- CCAmetamodel

WSDL metamodelMappings

WSDLElement Documentation

Type

Part

Message

Operation

PortType

Binding

BindingOperation

Port

Service

Definition+_targetNameSpace+name

+types0..1

+types

+part0..*+message0..*

+operation 0..*

+portType0..*+type

+binding0..*

+boperations0..*

+port0..*+service0..*

Package

DataElementDe2T

DataType

Attribute

<<boundary>>FlowPort

<<boundary>>Port

<<boundary>ProtocolPort

PortOwner

ProcessComponent

CompositeData+owner+feature1..*

<<boundary>>OperationPort

+type

+ports1..*

P2D

A2P

Pc2S

F2M

O2O

P2PB

3. MDA for Web Services

24

Page 25: Study and application of Model Driven Development Approach From Web services to Ubiquitous computing Slimane Hammoudi ESEO Angers, France slimane.hammoudi@eseo.fr

3. MDA for Web Services

Service composition and orchestration:

- From UML (Activity diagramm, V1.4) to BPEL

problem:- semantic gap from UML to BPEL

solution:- profiles and Tagged values

Activity diagram

Example:

25

Page 26: Study and application of Model Driven Development Approach From Web services to Ubiquitous computing Slimane Hammoudi ESEO Angers, France slimane.hammoudi@eseo.fr

3. MDA for Web Services

J2EE platform (Java + JWSDP)

dotNET platform (C# + dotNET framework)

- Java Metamodel

- JWSDP Metamodel

- JWSDP template

-Mapping UML to JAVA

- C# Metamodel

- dotNET Metamodel

- dotNET template

-Mapping UML to C#

26

Page 27: Study and application of Model Driven Development Approach From Web services to Ubiquitous computing Slimane Hammoudi ESEO Angers, France slimane.hammoudi@eseo.fr

Specification of Mappings

TransformationDefinition

0..*

1+spec

Generated from

EDOCmetamodel

WSDLmetamodelMapping

WSDLElement Documentation

TypePart

Message

Operation

PortType

Binding

BindingOperation

Port

Service

Definition+_targetNameSpace+name

+types0..1

+types

+part0..*+message

0..*

+operation0..*

+portType0..*+type

+binding0..*

+boperations0..*

+port0..*+service

0..*

ModelElement

Namespace

Package

AssociationEnd

Class

Interface

Attribute

Operation

Method

Parameter

DataType

+specification+method

ModelElement

Namespace

Package

AssociationEnd

Class

Interface

Attribute

Operation

Method

Parameter

DataType

+specification+method

C2S

P2Part

O2O

M2Bo

Dt2T

P2D

A2T

module UML2WSDL;create OUT : WSDL from IN : UML;rule C2S{

from c : UML!Classto s : WSDL!Service(

name <- 'Service' + c.name,owner <- c.namespace,port <- pt

),*** } ***

4 . Prototyping: A Plug-in for Eclipse

27

Page 28: Study and application of Model Driven Development Approach From Web services to Ubiquitous computing Slimane Hammoudi ESEO Angers, France slimane.hammoudi@eseo.fr

A Metamodel for Mapping Specification

4 . Prototyping: A Plug-in for Eclipse

28

Page 29: Study and application of Model Driven Development Approach From Web services to Ubiquitous computing Slimane Hammoudi ESEO Angers, France slimane.hammoudi@eseo.fr

Mapping Specification: MMT Tool

from EDOC to WSDL

4 . Prototyping: A Plug-in for Eclipse

29

Page 30: Study and application of Model Driven Development Approach From Web services to Ubiquitous computing Slimane Hammoudi ESEO Angers, France slimane.hammoudi@eseo.fr

Transformation Process

ATL (Atlas Transformation Language), OCL based and MOF/QVT compliant

4 . Prototyping: A Plug-in for Eclipse

30

Page 31: Study and application of Model Driven Development Approach From Web services to Ubiquitous computing Slimane Hammoudi ESEO Angers, France slimane.hammoudi@eseo.fr

4 . Prototyping: A Plug-in for Eclipse

31

Page 32: Study and application of Model Driven Development Approach From Web services to Ubiquitous computing Slimane Hammoudi ESEO Angers, France slimane.hammoudi@eseo.fr

5 . Conclusion & Perspectives

UML(version 1.4)

EDOC(profil UML)

EDOC (métamodèle)

WSDL normal complex**straightforward

(almost)

BPEL complex* - -

J2EE(Java + JWSDP) normal complex**

straightforward(almost)

dotNET(C# + API) normal - -

PIMPSM

- EDOC versus UML

- dot NET versus J2EE

* Tagged values

** Profiles and stereotypes

32

Page 33: Study and application of Model Driven Development Approach From Web services to Ubiquitous computing Slimane Hammoudi ESEO Angers, France slimane.hammoudi@eseo.fr

• Model Driven Architecture allows the development of services by describing their technology-independent and technology-specific aspects in separate models.

• EDOC (CCA) is closer to WSDL than the UML metamodel and seems more suitable for the modeling of internet applications implemented on Web Services Platforms.

« MDA could be the best answer for the development of future Internet Applications on Web Services Platforms »

-lessons from the past«  There are no (lasting) one-fits-all technology solutions,

and therefore technologies will always differ and evolve »[OMG 05]

5 . Conclusion & Perspectives

33

Page 34: Study and application of Model Driven Development Approach From Web services to Ubiquitous computing Slimane Hammoudi ESEO Angers, France slimane.hammoudi@eseo.fr

MDA and Ubiquitous computing

(Weiser Vision 1991)Ubiquitous Computing:Weiser introduced the area of ubiquitous computing (ubicomp) and put forth a vision of people and environments augmented with computational resources that provide information and services when and where desired [Weiser 1991].

Ubiquitous Information Systems:The vision, where computers are everywhere and a person interacts (anytime and anywhere) with portable devices that are sensitive and responsive to him, has become a reality nowadays. [Satyanarayanan, 01].

34

Page 35: Study and application of Model Driven Development Approach From Web services to Ubiquitous computing Slimane Hammoudi ESEO Angers, France slimane.hammoudi@eseo.fr

MDA and Ubiquitous computing

Computer Systems Research Problems

[Satyanarayanan, 01].

Context aware mobile applications

35

Page 36: Study and application of Model Driven Development Approach From Web services to Ubiquitous computing Slimane Hammoudi ESEO Angers, France slimane.hammoudi@eseo.fr

Many different definitions for context “Any information that can be used to characterize the situation of an entity. An entity is a person, place, or object that is considered relevant to the interaction between a user and an application, including the user and application themselves”

[Dey 2001]

Context information are not universal but relative to some situation (application specific)

WeatherHoliday Planning

Context aware mobile applications

36

Page 37: Study and application of Model Driven Development Approach From Web services to Ubiquitous computing Slimane Hammoudi ESEO Angers, France slimane.hammoudi@eseo.fr

Context aware mobile applications

Context awareness

“a system is context-aware if it uses context to provide relevant information and/or services to the user, where relevance depends on the user’s task”.

Four main features of CW applications:

Contextual sensing

Contextual adaptation

Contextual resource discovery

Contextual augmentation

37

Page 38: Study and application of Model Driven Development Approach From Web services to Ubiquitous computing Slimane Hammoudi ESEO Angers, France slimane.hammoudi@eseo.fr

Context aware mobile applications

Conceptual Framework for Context aware systems

[Badaulf, 07]Application/Services

Storage/Management

Preprocessing

Raw Data Retrieval

Sensors

A separation between detecting and using context is necessary to improve extensibility and reusability of systems.

From a collection of different sensors to context aware services

38

Page 39: Study and application of Model Driven Development Approach From Web services to Ubiquitous computing Slimane Hammoudi ESEO Angers, France slimane.hammoudi@eseo.fr

Provide relevant information/services to users using context information

More friendly, adapted, and intelligent servicesrestaurant finding servicemuseum guide service road search service (maintained and considering

road conditions in a real time ) Most promising technology for mobile services

Context aware mobile services

A context aware service is considered as a smart Web service defined as: "a web service that can understand situational context and can share that context with other services" [Manes, 01]

39

Page 40: Study and application of Model Driven Development Approach From Web services to Ubiquitous computing Slimane Hammoudi ESEO Angers, France slimane.hammoudi@eseo.fr

Context aware mobile services

Basic components in a Web service-based context-aware system.

Context-aware services and applications:

Supporting components for context-awareness:

[Truong, 09]

40

Page 41: Study and application of Model Driven Development Approach From Web services to Ubiquitous computing Slimane Hammoudi ESEO Angers, France slimane.hammoudi@eseo.fr

MDA for context aware mobile service

COMODE: Principle and architecture.- Separation of concerns (business logic versus context)- Development process- Five views

41

Page 42: Study and application of Model Driven Development Approach From Web services to Ubiquitous computing Slimane Hammoudi ESEO Angers, France slimane.hammoudi@eseo.fr

MDA for context aware mobile service

Development process

42

Page 43: Study and application of Model Driven Development Approach From Web services to Ubiquitous computing Slimane Hammoudi ESEO Angers, France slimane.hammoudi@eseo.fr

MDA for context aware mobile services

Context view.

ContextView

ContextEntity

Actor

Environnement

Time

Location

Climate

MobileDevice

Profile

1..* 1..*

*

uses captures

belongsTo 1..* belongsTo involves 1..*

ComputationalEntity

user centered mobile applications

Context metamodel (CM)

43

Page 44: Study and application of Model Driven Development Approach From Web services to Ubiquitous computing Slimane Hammoudi ESEO Angers, France slimane.hammoudi@eseo.fr

Business Model(PIM)

Context Model(CM)

Contextual Platform Independant Model (CPIM)

Contextual Platform Specific Model (CPSM)

Run-time repository

CW Service mngt repository

XML

Web services concreteplatform

MODELS

CODE

Parameterized transformation Classical transformation

MDD ApproachForServiceAdaptability

Main models &Main TransformationTechniques

44

MDA for context aware mobile services

Context weaving and transformations

Page 45: Study and application of Model Driven Development Approach From Web services to Ubiquitous computing Slimane Hammoudi ESEO Angers, France slimane.hammoudi@eseo.fr

Context weaving and transformations

MDA for context aware mobile services

A separation between context information and business logic in individual models,

The integration of the context model into the business logic using suitable transformation techniques,

The mapping of the contextualized business logic model into a web service platform.

Two transformation techniques for context weaving:

- Model composition (Merging)

- Parametrized Transformation

45

Page 46: Study and application of Model Driven Development Approach From Web services to Ubiquitous computing Slimane Hammoudi ESEO Angers, France slimane.hammoudi@eseo.fr

Context weaving and transformation

SourceMetamodel

TargetMetamodel

TransformationMetamodel

TransformationModel

contextmodel

PIMModel

input

input

CPIMModel

CPSMModel

output

Modelcomposition

Parametrizedtransformation

46

Page 47: Study and application of Model Driven Development Approach From Web services to Ubiquitous computing Slimane Hammoudi ESEO Angers, France slimane.hammoudi@eseo.fr

Context weaving and transformation

Model composition: a signature based approach [Redhu 05]

47

Page 48: Study and application of Model Driven Development Approach From Web services to Ubiquitous computing Slimane Hammoudi ESEO Angers, France slimane.hammoudi@eseo.fr

Parametrized Transformations allow a designer to mark in the application model (PIM) the properties that will receive context information. These properties are the context_aware properties.

Context weaving and transformation

Parametrized transformation: [Frankel 02]

48

Page 49: Study and application of Model Driven Development Approach From Web services to Ubiquitous computing Slimane Hammoudi ESEO Angers, France slimane.hammoudi@eseo.fr

Conclusion and Perspectives

COMODE (Context Aware Model Driven Development) advocates Model Driven Development to promote reuse, adaptability and interoperability for context-aware applications development on a service platform.

Using model driven development, context models are built as independent pieces of application models and at different abstraction levels then attached by suitable transformation techniques.

Parameterized transformation technique allows the binding of context information to a service at a model level, and therefore, allows specifying which behavior should be weaved at execution level.

49

Page 50: Study and application of Model Driven Development Approach From Web services to Ubiquitous computing Slimane Hammoudi ESEO Angers, France slimane.hammoudi@eseo.fr

Towards Adaptable SOA:Model Driven Development, Context and Aspect

Slimane HAMMOUDIESEO, Computer Science Department

Angers, [email protected]

Valérie MONFORTUniversité Paris 1 - Panthéon – SorbonneUniversité Paris Dauphine LAMSADE CNRS,

[email protected]

50

Page 51: Study and application of Model Driven Development Approach From Web services to Ubiquitous computing Slimane Hammoudi ESEO Angers, France slimane.hammoudi@eseo.fr

Technologies are in constant evolution and Companies are often changing their organisation

Companies have to communicate with external Information Systems (IS) as clients, providers, partners using heterogeneous IS

SOA driven by a global methodology, seems the best solution for Companies to :

- Limit impacts of changes in there IS

- Provide interoperability between heterogeneous IS

Motivations (1):

51

Page 52: Study and application of Model Driven Development Approach From Web services to Ubiquitous computing Slimane Hammoudi ESEO Angers, France slimane.hammoudi@eseo.fr

Web service appears as the simplest solution to integrate IS;

Web services promote interoperability because they are based on XML standards:

XML EVERYWHERE

So, Web services seem to be the ideal solution for companies, The fitted technical solution used to support SOA.

but ...

Motivations (2):

52

Page 53: Study and application of Model Driven Development Approach From Web services to Ubiquitous computing Slimane Hammoudi ESEO Angers, France slimane.hammoudi@eseo.fr

Code is monolithic mixing concerns

Any change requires re deployment and is time consuming

Not a full flexibility and poor adaptability

Hence,

SOA Applications are faced to some important limitations concerning their adaptability to Business requirements changes

Problems met with Web services in SOA context

53

Page 54: Study and application of Model Driven Development Approach From Web services to Ubiquitous computing Slimane Hammoudi ESEO Angers, France slimane.hammoudi@eseo.fr

AOP is a paradigm that enables the modularization of crosscutting concerns into single units called aspects;

AOP allows to encapsulate the code of aspects into separate module –and then apply the code where it is needed.

AOP allows adding new behavior to an application without touching the base source code

Aspect Oriented Programming (1)

54

Page 55: Study and application of Model Driven Development Approach From Web services to Ubiquitous computing Slimane Hammoudi ESEO Angers, France slimane.hammoudi@eseo.fr

Aspect Oriented Programming (2)

55

Page 56: Study and application of Model Driven Development Approach From Web services to Ubiquitous computing Slimane Hammoudi ESEO Angers, France slimane.hammoudi@eseo.fr

Aspect-oriented languages are implemented over a set of definitions:

Joinpoints :

Pointcuts :

Advices :

Weaver merge aspect to base code

Aspect Oriented Programming (3)

56

Page 57: Study and application of Model Driven Development Approach From Web services to Ubiquitous computing Slimane Hammoudi ESEO Angers, France slimane.hammoudi@eseo.fr

Aspect Service Weaver (1)

57

Page 58: Study and application of Model Driven Development Approach From Web services to Ubiquitous computing Slimane Hammoudi ESEO Angers, France slimane.hammoudi@eseo.fr

In this first approach using AOP, a pragmatic solution for adaptable Web service was developed with server and client adaptability

However,

This technical solution is very complex for neophyte and requires to be a specialist : so one alternative would be to abstract technical complexity

Conclusion of this technical research work

58

Page 59: Study and application of Model Driven Development Approach From Web services to Ubiquitous computing Slimane Hammoudi ESEO Angers, France slimane.hammoudi@eseo.fr

Business Model(PIM)

Context Model(CM)

Contextual Platform Independant Model (CPIM)

Contextual Platform Specific Model (CPSM)

Run-time repository

CW Service mngt repository

XML

Web services concreteplatform

MODELS

CODE

Parameterized transformation Classical transformation

MDD ApproachForServiceAdaptability

Main models &Main TransformationTechniques

59

MDA and context for adaptable services

Context weaving and transformations

Page 60: Study and application of Model Driven Development Approach From Web services to Ubiquitous computing Slimane Hammoudi ESEO Angers, France slimane.hammoudi@eseo.fr

Context_Aware MDD &

Aspects as a new research

direction

Key Points60

Page 61: Study and application of Model Driven Development Approach From Web services to Ubiquitous computing Slimane Hammoudi ESEO Angers, France slimane.hammoudi@eseo.fr

61

Context modeling allows providing information and situation which intervene in the process of service adaptability.

Using model driven development, context models are built as independent pieces of application models and at different abstraction levels then attached by suitable transformation techniques.

Services are unaware of their context and the aspects adapt them to the current environment according to the current context.

Context-dependant behaviors are extracted into aspects and weaved with the base service during execution.

Parameterized transformation techniques allow binding context information to a service at a model level, and should help to determine which aspect should be weaved at execution level.

Key Points

Page 62: Study and application of Model Driven Development Approach From Web services to Ubiquitous computing Slimane Hammoudi ESEO Angers, France slimane.hammoudi@eseo.fr

Business Model(PIM)

Context Model(CM)

Aspect Model(AM)

Contextual PlatformIndependant Model

(CPIM)

XML

Contextual PlatformSpecific Model

(CPSM)

Run-timerepository

CW Service mngtrepository

Web Services Concrete Platform

Web Services Abstract Platform

First Ideas

62

Page 63: Study and application of Model Driven Development Approach From Web services to Ubiquitous computing Slimane Hammoudi ESEO Angers, France slimane.hammoudi@eseo.fr

We are convinced MDD is the fitted solution to abstract the complexity of our aspect based solution.

We have to clarify and formalize the process of « Aspect derivation » from a given context model.

We have to take into account dynamic models, weaving and composition.

We have to define models transformations and the fitted plate form to support our approach.

Conclusion

63

Page 64: Study and application of Model Driven Development Approach From Web services to Ubiquitous computing Slimane Hammoudi ESEO Angers, France slimane.hammoudi@eseo.fr

Towards a semi automatic transformation process in MDA:

Slimane HAMMOUDIESEO, Computer Science Department

Angers, [email protected]

Marianne HuchardUniversité de Montpellier II

-LIRMM – [email protected]

64

Page 65: Study and application of Model Driven Development Approach From Web services to Ubiquitous computing Slimane Hammoudi ESEO Angers, France slimane.hammoudi@eseo.fr

Motivations

La Transformation de modèle dans MDA/MDE− Ecriture manuelle des règles

− Maîtrise du langage de transfo et des métamodèles PIM et PSM

Les techniques de “matching”. Les techniques sont matures et la recherche est très active:− En Bases de Données “schema matching” P. Bernstein & al.− En Ontologies “techniques d’alignement d’ontologies ” J.Euzenat & al.

Vision très simplifiée d’un processus “Semi-automatic”

1. Mapping = Matching + Adaptation «Sur les métamodèles »

2. Transformation = Mapping + Dérivation «Génération des règles de transfos»

3. PSM = PIM + Transformation «Exécution des règles de transfos»

65

Page 66: Study and application of Model Driven Development Approach From Web services to Ubiquitous computing Slimane Hammoudi ESEO Angers, France slimane.hammoudi@eseo.fr

Sommaire

Processus de Transformation dans MDA Concepts clés et principaux problèmes

Une extension à l’architecture de base du processus Une 1ère Extension: Mapping Versus Transformation Découverte des mappings: “techniques de matching” Une 2ème Extension: Matching, Mapping et Transformation

Méthodologie pour un processus semi-automatique Les acteurs Processus de transformation: les différentes activités Activités et acteurs Adaptation et Dérivation

Prototypage

Conclusion & Travaux en cours

66

Page 67: Study and application of Model Driven Development Approach From Web services to Ubiquitous computing Slimane Hammoudi ESEO Angers, France slimane.hammoudi@eseo.fr

Processus de Transformation dans MDA

MOF

Transformation Metamodel

(ATL,…etc.)Target

Metamodel

Transformation Model (Program)

Source Model

Target Model

Transformation Engine

Source Metamodel

ConformsTo ConformsTo

ConformsToConformsTo

exec

source target

ConformsTo

M1

M2

M3

M0

ConformsTofrom to

PIM

PSM

Transformationengine

67

Page 68: Study and application of Model Driven Development Approach From Web services to Ubiquitous computing Slimane Hammoudi ESEO Angers, France slimane.hammoudi@eseo.fr

Une 1ère extension à l’architecture de base

Mapping versus Transformation[Lopes 2005]

En IDM

68

Page 69: Study and application of Model Driven Development Approach From Web services to Ubiquitous computing Slimane Hammoudi ESEO Angers, France slimane.hammoudi@eseo.fr

Une 1ère extension à l’ architecture de base

Mapping versus Transformation dans l’IDM

1. Les mappings spécification• Définis entre métamodèles

• Spécifiés « idéalement » de manière déclarative (graphiquement)• Un langage type OCL pour exprimer et compléter des mappings complexes• Peuvent être découverts par un processus de matching

2. Les transformations implémentation• Les règles sont générés automatiquement à partir des

mappings • Sont conformes à un métamodèle de transformation type

MOF/QVT• Exécutés à partir d’un modèle source PIM pour produire

un modèle équivalent cible PSM.class tablec2t

Rule C2T {from Class: UML!Classto Table: Oracle!Table (name Class.name…………………………………… )

69

Page 70: Study and application of Model Driven Development Approach From Web services to Ubiquitous computing Slimane Hammoudi ESEO Angers, France slimane.hammoudi@eseo.fr

Une 2ème extension à l’ architecture de base

Découverte des mappings : « les techniques de matching »

Matching

Mapping Transformation

update/adapt

produce derive

Schema matchingDBWare

Ontology matchingontoWare

Metamodel matchingmodelWare

AB C

D

A = True Positives B = False Negatives C = False Positives D = True Negatives

Real Matches Derived Matches

Approche Limites

structural semantic

70

Page 71: Study and application of Model Driven Development Approach From Web services to Ubiquitous computing Slimane Hammoudi ESEO Angers, France slimane.hammoudi@eseo.fr

Une 2ème extension à l’architecture de base

Trois métamodèles:• Le métamodèle de matching: techniques et algorithmes de matching • Le métamodèle de mapping: formalisme de spécification des correspondances • Le métamodèle de transformation: syntaxe abstraite du langage de transfo (QVT)

71

Page 72: Study and application of Model Driven Development Approach From Web services to Ubiquitous computing Slimane Hammoudi ESEO Angers, France slimane.hammoudi@eseo.fr

Méthodologie pour un processus semi automatique

Principaux utilisateurs

Knowledge builders: build knowledge repositories

Knowledge facilitators: assemble, combine and deploy knowledge

Knowledge users: apply knowledge

Architects Platform experts

Quality engineers

Methodology experts

Project manager Quality engineers

Designers Software engineers

(Gavras, 2004)

2 types d’utilisateurs

1) expert

Versus

2) concepteur

1) Gestion des métamodèles et des règles de transformations

2) Gestion des modèles métiers et transformation sur plateforme cible

72

Page 73: Study and application of Model Driven Development Approach From Web services to Ubiquitous computing Slimane Hammoudi ESEO Angers, France slimane.hammoudi@eseo.fr

Méthodologie pour un processus semi-automatique

Processus de transformation

1) Phase de préparation (l’Expert)

PIM metamodel specification

PSM metamodel specification

Apply the matching techniques

Adapt and validate mappings

Generation of transformation rules

Transformationprogram

Définition du métamodèle PIM métier de l’entreprise à partir des standards de MDA tels qu’UML ou EDOC (ou des profils).

Définition du métamodèle de la plateforme cible d’exécution PSM. Celui-ci est spécifié dans le même formalisme que le PIM,

Activité cruciale qui vise à sélectionner les algorithmes de matching appropriés afin de générer des mappings

L’expert valide ou modifie les mappings obtenus, il spécifie éventuellement des mappings que les techniques de matching n’ont pas pu déterminer.

Génération automatique des règles de transformations à partir des mappings. Ces règles sont spécifiées conformément au standard MOF2.0-QVT de l’OMG.

73

Page 74: Study and application of Model Driven Development Approach From Web services to Ubiquitous computing Slimane Hammoudi ESEO Angers, France slimane.hammoudi@eseo.fr

Méthodologie pour un processus semi-automatique

Processus de transformation

1) Phase d’Exécution (Concepteur)

Edition of a PSM Model

Transformation program Execution

Specification of a PIM Model

Complete PSM

ExecutableModel

[PSM is complete]

Y

N

Conformément au métamodèle PIM, un concepteur définit le modèle métier indépendant de toute plate-forme technique.

le programme de transformation obtenu dans la 1ère partie prend en entrée le modèle PIM et produit un PSM équivalent.

Edition, vérification et complétion du PSM

74

Page 75: Study and application of Model Driven Development Approach From Web services to Ubiquitous computing Slimane Hammoudi ESEO Angers, France slimane.hammoudi@eseo.fr

Méthodologie pour un processus semi-automatique

Activités et utilisateurs

Exécution UtilisateursMétamodèles PIM & PSM

manuel (éditeur graphique)

utilisateur-expert

Techniques de Matching

automatiqueprogramme de matching

(utilisateur-expert)

Validation/Mise à jour des

mappings

manuel (éditeur graphique)

utilisateur-expert

Génération de règles de Transformation

automatiqueprogramme de génération

(utilisateur-expert)

Modèle PIM manuel

(éditeur graphique)utilisateur-concepteur

Exécution des règles de Transformation

automatiqueprogramme de transformation

(utilisateur-concepteur)

PSM Finalmanuel

(éditeur de texte)utilisateur-concepteur

75

Page 76: Study and application of Model Driven Development Approach From Web services to Ubiquitous computing Slimane Hammoudi ESEO Angers, France slimane.hammoudi@eseo.fr

Adaptation & Dérivation

Adaptation

Dérivation

l’ utilisateur expert doit :

• valider les mappings considérés comme corrects

• corriger éventuellement les mappings incorrects

• spécifier les mappings non trouvés On devrait être capable de :

• générer automatiquement des règles de transformation à partir des mappings complétés

• Exprimer la sémantique des mappings en utilisant le langage OCL.

76

Page 77: Study and application of Model Driven Development Approach From Web services to Ubiquitous computing Slimane Hammoudi ESEO Angers, France slimane.hammoudi@eseo.fr

Prototypage: MT4MDE

MT4MDE: UML and C# metamodel (fragment) 77

Page 78: Study and application of Model Driven Development Approach From Web services to Ubiquitous computing Slimane Hammoudi ESEO Angers, France slimane.hammoudi@eseo.fr

Prototypage

MT4MDE: validation process for matched elements

78

Page 79: Study and application of Model Driven Development Approach From Web services to Ubiquitous computing Slimane Hammoudi ESEO Angers, France slimane.hammoudi@eseo.fr

Prototypage

UML-C#UML-Java

UML-WSDL

Schema similarity

0.74 0.84 0.84

Precision 0.71 0.86 1.0

Recall 0.68 0.68 0.62

F-Measure 0.69 0.76 0.76

Overall 0.40 0.57 0.62

[Hammoudi, 2010]

79

Page 80: Study and application of Model Driven Development Approach From Web services to Ubiquitous computing Slimane Hammoudi ESEO Angers, France slimane.hammoudi@eseo.fr

Conclusion

- La semi-automatisation: une première approche Une architecture intégrant le Matching et Mapping (entités de 1er Classe) Une méthodologie permet d’identifier les activités ainsi que les acteurs:

activités automatisables et manuelles experts et concepteurs Les acteurs et leurs activités

- Aujourd'hui, les règles de transformation sont spécifiées manuellement:

Travail fastidieux et enclin aux erreurs (coût en terme d’efficacité) Bonne maîtrise du langage de transformation Bonne connaissance des métamodèles Spécification des correspondances entre les métamodèles.

- La semi-automatisation: Vrai défi Algorithmes de matching pour les métamodèles Formalisme adéquat pour le mapping et processus de validation Génération automatique des règles de transformation

80