september 17th, 2002mda and ccm1 component based engineering in mda mda and ccm dr. philippe merle...
TRANSCRIPT
September 17th, 2002 MDA and CCM 1
Component Based Engineering in MDA
MDA and CCM
Dr. Philippe MerleCR1 INRIA Futurs Lille / LIFL – USTL
President of the ObjectWeb College of ArchitectsChair of the OMG Components 1.1 RTF
Leader of the OpenCCM project
Summer school “MDA for Embedded System Development”,
Brest, Brittany in France, September 17th, 2002
September 17th, 2002 MDA and CCM 2
Contents
From Software Components to MDA Components, component models, distributed object and
component middleware to MDA
The CORBA Component Model (CCM) A quick guided tour
New Component Models with MDA and CCM New PIM and transformation to CCM
How building MDA to CCM transformation platforms with OpenCCM
Conclusion MDA and CCM at OMG (current RFP and proposals)
September 17th, 2002 MDA and CCM 3
From Software Componentsto MDA
September 17th, 2002 MDA and CCM 4
Why Software Components?
Time to market Improved application productivity Reduced complexity Reuse of existing code
Programming by assembly (manufacturing) rather than development (engineering) Reduced skills requirements Focus expertise on domain problems Improving software quality
Key benefit with client-side & server-side development
September 17th, 2002 MDA and CCM 5
Why Software Component Models?
Deal with recurrent technical requirements e.g. CORBA = communication between distributed objects
Provide means to abstract technical requirements e.g. OMG IDL = interfaces and operations of distributed
objects
=> Abstraction instead of technical skills e.g. OMG IDL versus socket API
Product software components automatically e.g. stubs and skeletons for CORBA communication
=> Improve software productivity and quality => Reduce development costs
September 17th, 2002 MDA and CCM 6
Why Software Component Models?
Implementation neutral e.g. multi transport layers: TCP/IP, ATM, shared memory, … e.g. multi programming languages: C++, Java, IDLscript, … e.g. multi OS: Windows, Unix, Cray, PDA, RTOS, …
=> Portability and interoperability
Could be also efficient than ad hoc solutions! e.g. Real-Time ORBs like TAO, omniORB, Orbix/E, …
Requirements for tools and platforms in order to be really useable!
September 17th, 2002 MDA and CCM 7
From Distributed Objects …
Distributed Object Computing (DOC) Middleware e.g. CORBA – DCOM - Java RMI Rationalize software processes for defining, developing
and executing distributed applications Strongly used in industrial applications
No architectural vision of applications Object bindings are hidden in code Often not declared or configurable
No separation between functional / non functional aspects
All application aspects are programmed explicitly! Complexity for business domain experts
No packaging and deployment facilities Only ad hoc solutions!
September 17th, 2002 MDA and CCM 8
... To Distributed Components
DOC middleware evolution e.g. CCM - .NET - EJB Cover software processes for packaging, assembling and
deploying distributed applications Some architectural notions
Bindings are declared and configurable e.g. JavaBeans and ports in CCM
Better separation of functional / non functional aspects
Components / containers Described instead of programmed (e.g. XML descriptors)
Packaging for automatic deployment Standard format for binary archives API to control distributed deployment
September 17th, 2002 MDA and CCM 9
But No Universal Component Middleware!
CORBA EJB .NET . . .
Major Challenge!
for MDA?
September 17th, 2002 MDA and CCM 10
Challenges With Component Middleware
A lot of standard component middleware SUN = Java RMI, EJB, JMS, J2EE, Jini … Microsoft = OLE -> COM -> DCOM -> COM+ -> .NET W3C = HTTP -> XML -> SOAP -> Web services New ones appear, e.g. CCM, .NET, Web services, … When old ones disappear, e.g. COM, DCE, …
What is the “best” one? What is the “Next Best Thing”? How building software for the long term? How moving between component middleware? How preserving business application logic designs? How addressing the recurrent gap between
business requirements and component middleware artifacts?
September 17th, 2002 MDA and CCM 11
New orientation for OMG activities New step beyond the Object
Management Architecture (OMA)
Models are centric! Target middleware is not important!
Focus on Platform Independent Models (PIM) Without middleware details
Abstract Platform Specific Models (PSM) Including all middleware details
Define PIM to PSM transformations
Preserving PIM when new middleware appears!
Model Driven Architecture
September 17th, 2002 MDA and CCM 12
Current MDA Technologies
Meta Object Facility (MOF)
Unified Modeling Language (UML)
XML Model Interchange (XMI)
Common Warehouse Meta-model (CWM)
Software Process Engineering Meta-model (SPEM)
Action Semantics Language (ASL)
Various UML profiles
. . .
September 17th, 2002 MDA and CCM 13
All are (Meta-)Models in MDA
UML MOF
XML
XMI
UMLCWM
CCMEAI
EC
UMLCWM
CCMEAI
EC
MOF CWMCCM
EvaluatingCORBA Med
UML
EJB Java UML Profile forEDOC...
IDLUML4CORBA
Submissions
Standards
Life Sciences
ElectronicCommerce
MDC OIM
Enterprise App Integration
DocumentManagement
Etc.
SPEM
CIAS
September 17th, 2002 MDA and CCM 14
PIM, PSM, and Transformations in MDA
TRANSFORMATION RULES
Platform Specific Model(PSM)
Platform Specific Model(PSM)
Platform Independent Model(PIM)
Platform Independent Model(PIM)
Platform Specific Model(PSM)
Platform Specific Model(PSM)
September 17th, 2002 MDA and CCM 15
PIM to PSM TransformationExamples with MOF/XMI
UML Model (PIM)
Auto
Color : StringDoor : IntegerEngine : Integer
<Auto> <Color> Red </Color> <Door> 4 </Door> <Engine> 2 </Engine></Auto>
XMI Document (PSM)
XMI
<!Element Auto (Color*, Door*, Engine*)>
XMI DTD, Schema (PSM)
XM
I
MO
F
interface Auto { };
IDL, Java… (PSM)
Class Auto {public String color; public int Door; public int Engine; }
September 17th, 2002 MDA and CCM 16
Transformation Models in MDA
PIM Software
InfrastructurePSMJ2EE
PIM HealthCare BusinessApplication (CIAS)
UML
UML
.Net
PIM to PSMTransformation
Model
J2EE
PSM.Net
UML.Net
UML4EJB
September 17th, 2002 MDA and CCM 17
Could Transformation Models be Considered as MDA-oriented?
Model forModel Transformation
Model forModel Transformation
. . .. . .XSLTXSLTCode for
Rational RoseCode for
Rational RoseJ code for
ObjecteeringJ code for
Objecteering
PIM = Abstract Model for Model Transformation PSM = Concrete Transformation Technologies
TRANSFORMATION RULES
September 17th, 2002 MDA and CCM 18
Could OMG IDL be Considered asMDA-oriented?
MAPPING RULES
PIM = Abstract Interface Definition Language PSM = Concrete Programming Languages
OMG IDLOMG IDL
C++C++ JavaJava IDLscriptIDLscript . . .. . .
September 17th, 2002 MDA and CCM 19
Could OMG IDL be Considered asMDA-oriented?
PIM = Abstract Interface Definition Language PSM = Concrete Network Transport Syntaxes
OMG IDLOMG IDL
GIOPGIOP ESIOPESIOP SOAPSOAP
MAPPING RULES
September 17th, 2002 MDA and CCM 20
Could GIOP be Considered asMDA-oriented?
PIM = Abstract Network Transfer Syntax PSM = Concrete Network Transport Layers
GIOPGIOP
IIOPIIOP UDPUDPSharedMemorySharedMemory
. . .. . .
MAPPING RULES
September 17th, 2002 MDA and CCM 21
MDA Applied To Component Middleware
TRANSFORMATION RULES
PIM = Abstract Component Model for enterprise computing PSM = Concrete Standard Component Middleware
Entreprise DistributedObject Computing
(EDOC)
Entreprise DistributedObject Computing
(EDOC)
. . .. . ..NET.NETEJBEJBCORBACORBA
September 17th, 2002 MDA and CCM 22
The CORBA Component Model (CCM)
September 17th, 2002 MDA and CCM 23
TO BE COMPLETED
September 17th, 2002 MDA and CCM 24
New Component Modelswith MDA and CCM
September 17th, 2002 MDA and CCM 25
Why New Component Models?
Often application designers want to use concepts not present in PSM e.g. CCM has no active JavaBeans properties
1) Creating a new PSM but also requires to develop the associated middleware Very expensive and time consuming!!!
2) Creating a new PIM and defining PIM to PSM transformation rules
September 17th, 2002 MDA and CCM 26
The Message Filtering Example
A filter has 1 input for receiving messages to filter Configurable filtering properties 1 filtering function 1 output for accepted messages 1 output for rejected messages
FilterP1 = V1P2 = V2
F = M.C1 == P1 or M.C2 > P2
OK
NO
September 17th, 2002 MDA and CCM 27
Application = Assembling Filters
September 17th, 2002 MDA and CCM 28
The Message Filtering Example With CCM
eventtype Message { . . . Message fields . . . };component Filter { consumes Message input; publishes Message accepted; publishes Message rejected; . . . Configurable filtering properties . . .
};home FilterHome manages Filter { factory create_filter(. . .);};
September 17th, 2002 MDA and CCM 29
Problems
All must be done manually! Defining OMG IDL for message eventtypes, filter component
and home types Implementing CCM eventtypes, components and homes Writing CCM XML descriptors
Extremely verbose, time consuming and error prone!!!
How improving productivity and quality? How dealing with thousand messages and filters? How dealing with other Message Oriented
Middleware (MOM)? Like EJB 2.0 message beans
September 17th, 2002 MDA and CCM 30
The Message Filtering Example With MDA
Capturing the essence through a meta model Structure of messages, i.e. message fields Filtering properties and function
Using XMI to obtain a XML DTD or Schema Syntax for serializing instances of the meta model
Providing a UML profile for end users Defining transformation to MOM PSMs
Generating message filtering components automatically
=> Improve productivity and quality => Reduce development costs => Preserve PIM when new MOM appears
September 17th, 2002 MDA and CCM 31
The Message Filtering Meta-ModelInheritsFrom
1
type
<<metaclass>>
Message
id : stringid : string
1
InheritsFrom
0..1<<metaclass>>
Filter
id : string
function : string
id : string
function : string
1
AppliedOn
0..1
<<metaclass>>
Field
name : stringname : string
Fields
*
1
<<metaclass>>
Property
name : string
<<metaclass>>
DataType
id : string
name : string
id : string
1
Properties*
type
September 17th, 2002 MDA and CCM 32
The Message Filtering XML DTD
<!ELEM MFL (message, filter)*><!ELEM message (field)*><!ATTRLIST message id ID><!ELEM field EMPTY><!ATTRLIST field
name CDATA type CDATA>
<!ELEM filter (property)*><!ATTRLIST filter
id ID appliedOn IDREF function CDATA>
<!ELEM property EMPTY><!ATTRLIST property
name CDATA type CDATA>
(The XMI generated DTD is very similar)
September 17th, 2002 MDA and CCM 33
A Message Filtering XML Descriptor
<MFL> <message id=«Email»> <field name=«to» type=«string»\> <field name=«from» type=«string»\> <field name=«title» type=«string»\> <field name=«contents» type=«string[]»\> </message> <filter id=«FromFilter» appliedOn=«Email» function=«e.from == from»> <property name=«from» type=«string»\> </filter></MFL>
September 17th, 2002 MDA and CCM 34
Using the Message Filtering UML Profile
to: stringfrom: stringtitle: string
contents: string[]
«message»Email
from: string
f(e: Email): boolean {e.from == from}
«filter»FromFilter
« AppliedOn »
This UML Profile reuses UML concepts to map the Message Filtering Meta-Model concepts when they are adequate and UML user-friendly
September 17th, 2002 MDA and CCM 35
Message Filtering PIM to MOM PSMs Transformation
TRANSFORMATION RULES
Other MOMOther MOMEJB/JMSEJB/JMSCCMCCM . . .. . .
Message FilterComponent Model
Message FilterComponent Model
PIM = Abstract Message Filter Component Model PSM = Concrete Message Oriented Middleware
September 17th, 2002 MDA and CCM 36
The Message Filtering PIM to CCM Transformation
eventtype Email { public string from, to, title; public sequence<string> contents;};component EmailFilterBase { consumes Email input; publishes Email accepted; publishes Email rejected;};component FromFilter : EmailFilterBase { attribute string from;};home FromFilterHome manages FromFilter{ factory create_filter(in string from);};
September 17th, 2002 MDA and CCM 37
Next Step on the Message Filtering Meta-Model
Only allow definition of message and filter types
Only generate OMG IDL types, implementations, and CCM XML packaging descriptors
Complete the meta model to describe filter instances and connections between them
Then allow generation of CCM XML assembling descriptors for automatic deployment
September 17th, 2002 MDA and CCM 38
Drawback around MDA-oriented Tools
Few MOF compliant tools to experiment the creation of new component meta models!
Developing UML profiles are time and money consuming
UML Profile Builders are still expensive and proprietary
No portability of developed UML profiles between UML Tools!!!
Few formalisms to express MDA transformation OMG RFP under work
Few PSM meta models for Programming languages like Java, C++, … Component standard middleware
September 17th, 2002 MDA and CCM 39
How Building MDA to CCM Transformation Platforms
With OpenCCM
September 17th, 2002 MDA and CCM 40
OpenCCM
An ObjectWeb project http://www.objectweb.org/openccm Open source under LGPL
The first available implementation of the CORBA Component Model
A flexible and open platform to design, develop, package, assemble, deploy and administrate CCM applications
Allow us to build MDA to CCM transformation platforms
September 17th, 2002 MDA and CCM 41
The OpenCCM Platform
A compiler for OMG IDL, PSDL, and CIDL files An Abstract Syntax Tree for IDL, PSDL, and CIDL An Interface Repository Generators to IDL, PSDL, CIDL, IDL2, CIF for Java files
A graphical user interface for CCM XML packaging and assembling files
An Abstract Tree for packaging and assembling XML DTDs
A deployment tool A runtime application server An administration console
Runs on top of Unix, Windows, Win/CE for PDA
September 17th, 2002 MDA and CCM 42
The OpenCCM’s Compilation Chain forIDL, PSDL, and CIDL Files
IDL/PSDL/CIDL
Abstract Syntax Tree
for IDL/PSDL/CIDL
InterfaceRepository
IDL/PSDL/CIDL CIF for JavaOMG IDL2
Generators
Compiler
September 17th, 2002 MDA and CCM 43
The OpenCCM’s Tool Chain forXML Packaging and Assembling Files
CCM XML
Abstract Treefor CCM XML
CCM XMLCCM XMLCCM XMLXML
parser
Java SwingGUI
Software components
Applicationpackage
September 17th, 2002 MDA and CCM 44
The OpenCCM’s Deployment Chain
Abstract Treefor CCM XML
Deployment ToolComponent distribution, installation,
instantiation, configuration and execution
Component servers
Target environment
September 17th, 2002 MDA and CCM 45
Generic Meta Tools for XML DTD
OpenCCM code for managing CCM XML DTD is automatically generated
The Abstract Tree for packaging and assembling XML DTDs The packaging and assembling GUI
Using generic meta tools for XML DTD
The Zeus DTD2Java meta tool Generator of XML to Java binders i.e. Java objects representing XML elements
The OpenCCM DTD2GUI meta tool Generator of Java Swing GUI from XML DTD
September 17th, 2002 MDA and CCM 46
DTD2Java and DTD2GUI Meta Tools
XML DTD
Java Tree
ZeusDTD2Java
OpenCCMDTD2GUI
Java Swing GUI
GUIParametrization
ObserverDesign Pattern
September 17th, 2002 MDA and CCM 47
Zeus DTD2Java Generation Example
For the following XML DTD<!ELEMENT persons person*><!ELEMENT person EMPTY><!ATTRLIST person name CDATA>
Zeus DTD2Java generatesinterface Persons { void addPerson(Person p); void removePerson(Person p); List getPersonList();};class PersonsImpl implements Persons { . . . };
interface Person { String getName(); void setName(String v);};class PersonImpl implements Person { . . . };
September 17th, 2002 MDA and CCM 48
OpenCCM DTD2GUI Generation Example
September 17th, 2002 MDA and CCM 49
Applying DTD2Java and DTD2GUI in MDA
Could be used on any XML DTD
Even those generated by XMI DTD
To parse, manipulate, and view Any MOF meta model Any UML model Any PIM & PSM model Any instance of any PIM Any instance of any PSM Any instance of any component model
September 17th, 2002 MDA and CCM 50
Building MDA to CCM Transformation Platforms With OpenCCM
aCMMaCMM
MOFMOF
aCCMXML DTD
Java4aCMM
MOF2DTD
OpenCCMDTD2GUI
ZeusDTD2Java
GUI4aCMM
Component ModelEnd User
Component ModelDesigner
September 17th, 2002 MDA and CCM 51
Transformationscripts
Transformationscripts
Transformationscripts
Building MDA to CCM Transformation Platforms With OpenCCM
Transformationengine
Java4aCMM
TransformationJava IDLscript
scripts
Abstract Tree
for CCM XML
Abstract Syntax Tree
for IDL/PSDL/CIDL
GeneratedIDL/PSDL/CIDL
CCM XMLdescriptors
Generated JavaImplementation
CCM XMLdescriptors
GeneratedCCM XML
descriptors
September 17th, 2002 MDA and CCM 52
Building MDA to CCM Transformation Platforms With OpenCCM
aCMMaCMM
MOFMOFaCCM
XML DTD
Java4aCMMGUI4aCMM
Component ModelEnd User
Component ModelDesigner
Transformationscripts
Transformationscripts
Transformationscripts
TransformationJava IDLscript
scripts Transformation
engine
OpenCCM API
Transformationscripts
Transformationscripts
Transformationscripts
GeneratedCCM Compliant
Files
September 17th, 2002 MDA and CCM 53
Transformation Script Examplefor the Message Concept
event=to.declareEvent(from.getId())ctx.addMapping("event_type", event)
ctx.visit(from.getFieldList(), event)
filter=to.declareComponent( from.getId()+"FilterBase")ctx.addMapping("filter_base", filter)
input=filter.startConsumes("input")input.setEvent(event)ctx.addMapping("input", input)
accepted=filter.startPublishes("accepted")accepted.setEvent(event)ctx.addMapping("accepted", accepted)
rejected=filter.startPublishes("rejected")rejected.setEvent(event)ctx.addMapping("rejected", rejected)
Java4aCMM
OpenCCM API
Transformation
engine
from
to
ctx
September 17th, 2002 MDA and CCM 54
Transformation Script Examplefor the Field Concept
member=to.startValueMember(
from.getName())
member.setPublic()
member.setType(ctx.findType(from.getType()))
ctx.addMapping("member", member)
Java4aCMM
OpenCCM API
Transformation
engine
from
to
ctx
September 17th, 2002 MDA and CCM 55
Transformation Script Examplefor the Filter Concept
c=to.declareComponent(from.getId())c.setBaseComponent( ctx.getMapping(from.getAppliedOn(), "filter_base") )ctx.addMapping("component_type", c)
ctx.visit(from.getPropertyList(), c)
h=to.startHome(from.getId()+"Home")h.setManagedComponent(c)ctx.addMapping("home_type", h)
Java4aCMM
OpenCCM API
Transformation
engine
from
to
ctx
September 17th, 2002 MDA and CCM 56
Transformation Script Examplefor the Property Concept
a=to.startAttribute(from.getName())
a.setReadwrite()
a.setType(ctx.findType(from.getType()))
ctx.addMapping("attribute", a)
Java4aCMM
OpenCCM API
Transformation
engine
from
to
ctx
September 17th, 2002 MDA and CCM 57
Benefits for Building MDA to CCM Transformation Platforms with OpenCCM
UML tool neutral At design time, only XMI generation required At runtime, no UML tool presence
Allow production of Open Source MDA to CCM transformation platforms
All used tools are Open Source
Only require to write scripts for transformation
To do Improve the transformation engine features Simplify how transformation scripts are written Express transformations in XML and generate scripts Implement the MOF2DTD tool as a MDA transformation
September 17th, 2002 MDA and CCM 58
Conclusion
September 17th, 2002 MDA and CCM 59
Summary
Evolution from software components to MDA Software component models are PSM
CCM should be the major PSM at OMG
New component models could be designed with MDA and mapped to CCM
MDA to CCM Transformation Platforms can be built with OpenCCM
September 17th, 2002 MDA and CCM 60
CCM and MDA at OMG
Fraunhofer FOKUS/IK++ submission to MOF 2.0 IDL RFP
MOF repositories should be CORBA Components RFP = OMG TC Document ad/01-11-07 Subm. = OMG TC Document ad/02-05-06
Deployment and Configuration RFP OMG TC Doc orbos/2002-01-19
Components 1.1 Revision Task Force Chartered at the Yokohama meeting (April 26th 2002)
UML Profile for CCM RFP OMG TC Doc telecom/2002-09-02 Revision of the UML Profile for CORBA for
including IDL 3.0 extension, PSDL, and CIDL Presented at the next Helsinki OMG meeting
EDOC to CCM Mapping should be prepared!
September 17th, 2002 MDA and CCM 61
Open Source CCM Implementations
OpenCCM from LIFL & ObjectWeb Java on ORBacus 4.1 & OpenORB 1.2.1 & BES 5.x http://www.objectweb.org/openccm/
MicoCCM from FPX & Alcatel C++ on MICO http://www.fpx.de/MicoCCM/
CIF from Humboldt University C++ on ORBacus 4.1 http://sourceforge.net/projects/cif
September 17th, 2002 MDA and CCM 62
Other CCM Implementations
Qedo from Fraunhofer FOKUS C++ on MICO & ORBacus 4.1 http://qedo.berlios.de
EJCCM from CPI Inc. Java on OpenORB 1.3.x http://www.ejccm.org
K2 from ICMP C++ on various ORBs http://www.icmgworld.com
September 17th, 2002 MDA and CCM 63
More Information
OMG MDA Web Page http://www.omg.org/mda
CORBA Components Specification OMG TC Document formal/2002-06-65
CORBA Component Model Tutorial OMG TC Document ccm/2002-06-01
“The CCM Page”, Diego Sevilla Ruiz http://www.ditec.um.es/~dsevilla/ccm/
IST COACH Project http://www.ist-coach.org
OpenCCM http://www.objectweb.org/openccm/
September 17th, 2002 MDA and CCM 64