Model Transformations and Code Generation



Similar documents
Component based Middleware for real-time embedded systems. Ansgar Radermacher CEA-List

A CORBA Component. Component runtime support. A CORBA Component Home Home interface. Component Home. Väliohjelmistot /04/2004

Overview. Stakes. Context. Model-Based Development of Safety-Critical Systems

Introduction CORBA Distributed COM. Sections 9.1 & 9.2. Corba & DCOM. John P. Daigle. Department of Computer Science Georgia State University

Limitations of Object-Based Middleware. Components in CORBA. The CORBA Component Model. CORBA Component

CORBAservices. Naming. Part of the CORBA Naming Service Interface in IDL. CORBA Naming Service

Explicit Connectors in Component Based Software Engineering for Distributed Embedded Systems. Dietmar Schreiner and Karl M.

Model Driven Development of Inventory Tracking System*

Usage of Business Process Choreography

Distributed systems. Distributed Systems Architectures

CORBA Component Model(CCM)

OpenCCM: The Open CORBA Components Platform

CORBA Component Model

Meta-Model specification V2 D

Extension of a SCA Editor and Deployment-Strategies for Software as a Service Applications

Chapter 2: Remote Procedure Call (RPC)

SOFT 437. Software Performance Analysis. Ch 5:Web Applications and Other Distributed Systems

Compliance and Requirement Traceability for SysML v.1.0a

Service Oriented Architecture

CoSMIC: An MDA Tool Suite for Application Deployment and Configuration

Glossary of Object Oriented Terms

The Microsoft Way: COM, OLE/ActiveX, COM+ and.net CLR. Chapter 15

Monitoring Infrastructure (MIS) Software Architecture Document. Version 1.1

25.1 Translational Frameworks (MDA with transformations)

Lesson 4 Web Service Interface Definition (Part I)

September 2002 Version 3.0 ptc/ An Adopted Specification of the Object Management Group, Inc.

rpafi/jl open source Apache Axis2 Web Services 2nd Edition using Apache Axis2 Deepal Jayasinghe Create secure, reliable, and easy-to-use web services

Introduction to WebSphere Process Server and WebSphere Enterprise Service Bus

Service-Oriented Architectures

Principles and Foundations of Web Services: An Holistic View (Technologies, Business Drivers, Models, Architectures and Standards)

Enterprise Application Development Using UML, Java Technology and XML

Embedded/Real-Time Software Development with PathMATE and IBM Rational Systems Developer

Increasing Development Knowledge with EPFC

Overview of the CORBA Component Model. Wang, Schmidt, O Ryan

Agile Business Suite: a 4GL environment for.net developers DEVELOPMENT, MAINTENANCE AND DEPLOYMENT OF LARGE, COMPLEX BACK-OFFICE APPLICATIONS

Introduction to Service Oriented Architectures (SOA)

Integration of DB oriented CAD systems with Product Lifecycle Management

A SYSTEMATIC APPROACH FOR COMPONENT-BASED SOFTWARE DEVELOPMENT

Acknowledgments. p. 55

Using UML Part One Structural Modeling Diagrams

A SOA visualisation for the Business

The Service Revolution software engineering without programming languages

Infrastructure that supports (distributed) componentbased application development

1.. This UI allows the performance of the business process, for instance, on an ecommerce system buy a book.

EMBEDDED SOFTWARE DEVELOPMENT: COMPONENTS AND CONTRACTS

Fundamentals of Java Programming

Requirements Exchange: From Specification Documents to Models

Event-based middleware services

Chapter 7, System Design Architecture Organization. Construction. Software

A Generic Deployment Framework for Grid Computing and Distributed Applications

i. Node Y Represented by a block or part. SysML::Block,

Julia Reznik, Marc Born

UML Modeling Guidelines

Software Architecture Document

Lehrstuhl für Informatik 4 Kommunikation und verteilte Systeme. Middleware. Chapter 8: Middleware

UML FOR OBJECTIVE-C. Excel Software

BUSINESS RULES CONCEPTS... 2 BUSINESS RULE ENGINE ARCHITECTURE By using the RETE Algorithm Benefits of RETE Algorithm...

MODELING OF SERVICE ORIENTED ARCHITECTURE: FROM BUSINESS PROCESS TO SERVICE REALISATION

Middleware Lou Somers

Business-Driven Software Engineering Lecture 3 Foundations of Processes

Common Warehouse Metamodel (CWM): Extending UML for Data Warehousing and Business Intelligence

Generating Aspect Code from UML Models

Towards automated software component configuration and deployment

Intergiciels et systèmes distribués

Construction Principles and Design Patterns. Flyweight, Bridge, Builder

Comp 411 Principles of Programming Languages Lecture 34 Semantics of OO Languages. Corky Cartwright Swarat Chaudhuri November 30, 20111

Oracle WebLogic Server 11g Administration

Introduction to Generative Software Development

OpenCCM : une infrastructure à composants pour le déploiement d'applications à base de composants CORBA

Architecture. Reda Bendraou

Enterprise Application Designs In Relation to ERP and SOA

Introduction to Web Services

What can DDS do for You? Learn how dynamic publish-subscribe messaging can improve the flexibility and scalability of your applications.

A standards-based approach to application integration

Business Process Execution Language for Web Services

Dependability in Web Services

Service Oriented Architecture

Oracle Application Development Framework Overview

Component-Oriented Engineering

Policy Driven Practices for SOA

Outline SOA. Properties of SOA. Service 2/19/2016. Definitions. Comparison of component technologies. Definitions Component technologies

VisiBroker Configuration Reference

Decomposition into Parts. Software Engineering, Lecture 4. Data and Function Cohesion. Allocation of Functions and Data. Component Interfaces

ITS. Java WebService. ITS Data-Solutions Pvt Ltd BENEFITS OF ATTENDANCE:

Federated, Generic Configuration Management for Engineering Data

Open Source egovernment Reference Architecture Osera.modeldriven.org. Copyright 2006 Data Access Technologies, Inc. Slide 1

Reusable Connectors in Component-Based Software Architecture

Implementation of an Open Source Toolset for CCM Components and Systems Testing *

Java Metadata Interface and Data Warehousing

PERFORMANCE COMPARISON OF COMMON OBJECT REQUEST BROKER ARCHITECTURE(CORBA) VS JAVA MESSAGING SERVICE(JMS) BY TEAM SCALABLE

Introduction à EMF Eclipse Modeling Framework

Enterprise Service Bus

WebRatio 5: An Eclipse-based CASE tool for engineering Web applications

Middleware support for the Internet of Things

Service-Oriented Architecture and Software Engineering

VARIABILITY MODELING FOR CUSTOMIZABLE SAAS APPLICATIONS

Unifying the Global Data Space using DDS and SQL

Comparison of Model-Driven Architecture and Software Factories in the Context of Model-Driven Development

Guiding Principles for Modeling and Designing Reusable Services

WEB SERVICES. Revised 9/29/2015

Transcription:

Model Transformations and Code Generation Ecole IN2P3 Temps Réel Ansgar.Radermacher@cea.fr

2 École d été, 26.11 08h30 10h00: Cours S1 Component models CCM and FCM (connectors) CCM CORBA component model FCM un modèle par composant flexible avec ports générique, connecteurs et containers. Connecteurs : schéma d interaction et leur implémentation 10h30 12h00: Cours S2 Déploiement Déploiement instanciation des composants: choix des implémentations, affection valeurs aux attributs, allocation sur nœuds Utilisation du FCM pour supporter l exécution modèles MARTE Mapping du MARTE GCM vers FCM et la chaine d outil ec3m Rôle des bibliothèques modèles

3 Outline FCM: Flex-eWare (Flexible) component model Meta-model, main principles Derived UML profile FCM profile usage (demo) Ports Connectors defined in model libraries Link with MARTE Automatic MARTE/FCM synchronization (work in progress)

Different existing standards: UML, MARTE GCM A flexible component model With execution support CORBA Component Model (CCM v4, OMG formal/2006-04-01) Fractal (multiple implementations) Several academic approaches SOFA2, RUNES, TinyOS Outside embedded Service oriented architecture (SOA), OSGi (used by Eclipse, Spring) Web-services

5 CCM Excursus CORBA Component model OMG Standard, lightweight profile exists Based on component / container pattern (separation of concerns) Explicit declaration of used services (through ports) But mostly dead (big specification, not many vendors, afraid of CORBA) But only pre-defined container with fixed services But only supports small set of interaction patterns with specific and fixed implementations Synchronous method calls (via CORBA) Event based communications (only push/push style) Streaming (recently added)

CCM Excursus CCM Ports Facets are provided interfaces for clients (interfaces are defined in IDL in Java like syntax) Receptacles denote connection points Event Sources Event Sinks Streaming (not treated in this presentation) Attributes for configuration purposes No complex ports as in UML2 = not possible to group related ports e.g. receptacle and facet for an associated callback in a single port

CCM Excursus Ports (cont d) component reference supports component s equivalent interface Receptacle facets event sink (no standardized notation?!) attributes event source

CCM Excursus Facets/Equivalent interface Facets = entry points for invocations ( server interfaces ) Facets have independent object references Equivalent interface Component has single distinguished equivalent interface. Used by clients for navigation: Obtain facet reference from equivalent interface (provide_facet and provide... methods). and vice versa (get_component()) and connection of receptacles (connect and connect_... methods).

CCM Excursus Receptacles Receptacles denote component s need to use services provided by other components ( client interface ). When a component accepts object reference, this is called a connection. Store a simple reference or multiple references Configuration Typically, connections are set-up during assembly Dynamically managed at runtime to offer interactions with clients or other components (e.g. callback)

CCM Excursus CCM Event + Home Connects a Producer and a Consumer Based on publish/subscribe pattern Events are mapped on Consumer interfaces (associate push operation with event) Event publisher provide subscription operations Event sinks provide reference for data delivery (consumer) Event delivery always via a push/push model Homes: manage component lifecycle, in particular creation provides factory & find method In addition: arbitrary user-defined methods

CCM Excursus Component / Container Model CIF = Component Implementation Framework standardizes which interfaces an executor has to implement and which interfaces the executor can use For each provided interface provide get_<port-name> Re-used later! For each require interface, use getcnx_<port-name> External interface (CORBA) Internal interface (local IDL) Component Executor Internal interface EnterpriseComponent Container Comp.specific context + CCMContext External interface

12 Flex-eWare (Flexible) component model FCM: Flex-eWare (Flexible) component model Meta-model inspired by UML, Fractal and CCM Connector extension Basic principles UML like: components with Ports Hierarchical components: inner parts Connectors between parts

13 FCM Extensions, differences with UML Ports are different compared to UML (next slide) Connectors have types and implementations Flexible containers (similar to QoS4CCM) Deployment in a D&C like manner Platform description (more elaboration required) Deployment of instances on a node

14 Ports are characterized by a type and a kind FCM Ports Use of an interface does not require an auxiliary class definition (as in UML) Port kind has informal semantics Kind-specific mapping rules towards provided and required interfaces Examples: Port kind UseInterface, type MyInterface Port kind FeatureBasedCS, type ClientServerSpecification po derived provided and required interfaces Important: port kinds are defined in a model library and cn thus be extended

FCM Connectors Connector support allows to specify Interaction pattern during component development time Interaction implementation uring deployment time Basic principles: Connectors are like components: can be configured, have implementations (Assembly implementations in case of distribution) almost: ports don t have fixed interface types, connectors need to be instantiated (generated) from a template like definition

Model transformation: eplace UML connector with a part Connector Reification composite Connector type & implementation need to be adapted to MyIntf a : A MyIntf MyIntf b : B Calculate binding based on port type Instantiate package template (next slide) Declarative information about connector type a : A composite conn : methodcall_myintf::.. b : B

17 Use UML package templates Connector Adaptation Own a signature with a template parameter (in most cases an interface, here by convention called I) Template parameters are bound (template binding) when the template is instantiated with a concrete type (interface) Example: methodcall_myintf OperationIDs ID_myOp1 ID_myOp2 Bind I MyIntf

18 Adapt model: Connector Adaptation (contd.) Replace occurrence of formal template parameter by actual (MyIntf) Replace occurrence of formal template parameter in operation names (String template based on Acceleo) Adapt signature of operation to actual Adapt implementation Implementation is given in form of an Acceleo template, has access to actual or an operation of actual. Implementation can perform non trivial operations such as parameter marshalling in the context of a generic model transformation (template controlled)

19 Connector Adaptation Example Socket client stub For each operation in MyIntf, create operation with same signature and implementation as given in the method body Access to all UML attributes of an operation (as in the UML MM) + some predefined helper functions, such as parametersininout name of element (NamedElement) Scope changes to parameter

Connector Examples Basic Connectors (domain specific) model libraries Synchronous calls via CORBA, OSEK-COM Asynchronous calls via Sockets, CORBA FIFO (local) ACCORD (MARTE calls with real-time feature) Connectors based on composition of basic ones FIFO distributed via sockets, CORBA Connectors supporting Fault Tolerance

21 Delegate to fragment port Connectors enabling distribution Connector must be local to using component connector itself needs to be distributed Implementations of distributed connectors have a composite structure (D&C assembly implementations) Internal structure captured by UML composite structure diagram Example: socket connector consisting of two fragments Ports typed with template parameter I

22 Connector support Set of predefined connector libraries, available via package import (from repository)

23 École d été, 26.11 08h30 10h00: Cours S1 Component models CCM and FCM (connectors) CCM CORBA component model FCM un modèle par composant flexible avec ports générique, connecteurs et containers. Connecteurs : schéma d interaction et leur implémentation 10h30 12h00: Cours S2 Déploiement Déploiement instanciation des composants: choix des implémentations, affection valeurs aux attributs, allocation sur nœuds Utilisation du FCM pour supporter l exécution modèles MARTE Mapping du MARTE GCM vers FCM et la chaine d outil ec3m Rôle des bibliothèques modèles

24 Embedded component executors (as in CCM) Container Standard container: not an entity of its own, does not add any overhead Container supporting interception: manipulate port references (see next slide) Containers supporting extensions

25 Deployment Instantiate System (a component implementation) An instance specification for the system Assign values (slots) to all properties Parts are typed with other components Case 1: concrete implementation Case 2: type/abstract implementation need to find suitable implementation first, based on Platform properties (supported OS, ) Non functional properties (not really supported yet) In particular interest for connectors Slot value = instance-value, recursive instance specification (tree) Socket_instance attrib1 (non primitive) attrib2 (primitive)

26 Deployment Initial creation of deployment plan (screendump) Right-click on system implementation => chose create deployment plan Resulting deployment plan has fixed name, will be put into DeploymentPlans package

Packaging and Deployment Define what (which implementation) needs to be deployed [called component package in CCM] Define configuration, i.e. fix attribute values Define allocation ( where to deploy instances)

CCM Excursus Deployment plan Component Package Component Package Deployment plan Specification of instances, their properties & connections between these (ports) Assembly & Deployment Tool Describe connections, i.e. binding of ports between component instances => Get Component Assembly Descriptors (XML) static deployment bootloader file, static linkage with components Component Package dynamic deployment Instantiate and connect on node by means of daemon already started there...

29 Deployment plan Create a deployment plan (CCM, i.e. OMG D&C terminology) Plan = set of instances (UML instance specifications) Each instance references an implementation (UML class) Each instance has a set of slots for configuring attributes Each instance may be deployed on a node

30 Allocation Instances may be allocated onto nodes Create a new deployment diagram Drag&Drop nodes from platform description and instances from the deployment plan (instance specifications) into diagram. Establish an Allocation relationship between these (create an abstraction between instance and node and stereotype it with the MARTE stereotype allocate, Use the profile section of the property dialog). Allocation of composites: based on the following rule: if a contained part is allocated on a node, the composite is implicitly allocated on that node as well.

31 Deployment plan instantiation Instantiation of the deployment plan corresponds to a sequence of transformations Two stage transformation (Chokri s presentation) Initial user Model copy New Model Connector reification Container expansion Component - OO mapping patterns (required interface => accessor method, Distribute to node Model per node Model per node Standard C++ generator C++ code C++ code

32 Accord Integration Specific connector, fragments implement (unmodified) code Container responsible for tasks that are not port specific, such as the handling of the requests in progress RTO_stub Accord Service RealTimeObject Real-Time component f ( ) marshall, enqueue State machine (pre/post cond.) dispatch

Integration into an MDA approach Component instances and interconnections specified with Papyrus UML (www.papyrusuml.org) Composite structure diagram Deployment diagram Profiles FCM profile Deployment and configuration Connectors, for specific contexts: QoS + FT profile

Tool Chain Modeling environment Component descriptions Profile FCM Model Library Profile MARTE Packaging tool IDL/IDL3 descriptions Deployment XML (CDP, CCD) bootcode / connector code Transformations model text : Acceleo model model : currently Java ATL, QVT Binary (per node)

35 MARTE GCM ports Map GCM ports to specific port kinds Example: GCM Mapping ClientServer Specification => port kind of same name within model library. Port can be typed by client server specification MARTE GCM PpUnits, RtUnit Map to container extension of same name, currently supported RtUnit

36 How to map ports on OO concepts? (similar to CCM CIF) OO patterns + container For each port providing an interface, get_<portname> will return either the component reference or a reference of an inner part (delegation) Depending on container type, might return a reference t o a wrapper. Unlike in CCM, implementation of this operation is done by system For each port requiring an interface, getcnx_<portname> will return a reference to the connected service