20
MODeX Model Oriented Data eXchange EclipseCon Short Talk March 20, 2008 Ted Epstein Andrew J. Montalenti Morgan Stanley

MODeX Model Oriented Data eXchange

Embed Size (px)

DESCRIPTION

MODeX Model Oriented Data eXchange. EclipseCon Short Talk March 20, 2008 Ted Epstein Andrew J. Montalenti Morgan Stanley. What is MODeX?. A domain-specific modeling language for enterprise messaging. Components include: Graphical modeling IDE Code generator - PowerPoint PPT Presentation

Citation preview

Page 1: MODeX  Model Oriented Data eXchange

MODeX Model Oriented Data eXchange

EclipseCon Short Talk

March 20, 2008

Ted Epstein

Andrew J. Montalenti

Morgan Stanley

Page 2: MODeX  Model Oriented Data eXchange

What is MODeX?A domain-specific modeling language for enterprise messaging.

Components include:

Graphical modeling IDE

Code generator

Language-specific runtime components

Lifecycle management tools

Page 3: MODeX  Model Oriented Data eXchange

Current State of XML Messagingin the Enterprise

• Direct XML manipulation is the least common denominator.

• Toolkits handle basic SOAP envelopes, transport, message dispatching and handling.

• Developers may use JAXB, XSD.EXE for marshalling/unmarshalling.

• Adopting CxF and WCF as standards

• Ambivalent relationship with schema:• Most developers ignore it or

treat it as a design-time exercise.

• Some developers invest heavily and want to use schema as“the model”

• Developers and designers have been left to translate business concepts to XML formats.• Elements or attributes?• Type substitution or element

substitution?• Nesting or IDREF for shared

references?• …

• Big problems:• Cost of coding directly against

XML or even mapping is a drag on developer productivity

• Proliferation of formats makes integration extremely expensive.

• Weak contracts affect data quality.

Page 4: MODeX  Model Oriented Data eXchange

Solution: Create a simple graphical modeling language for enterprise

data and message contracts Create a federated model repository for shared models and

lifecycle management Generate schemas from well-specified message contracts Generate code and provide runtime support for multiple

languages Build on this basic foundation to address other large-scale

issues

Page 5: MODeX  Model Oriented Data eXchange

MODeX Solution Architecture

Code Generator

MODeX Designer (Graphical Modeling IDE)

Runtime Support Libraries Marshaling, Version Bridging, Validation, Enrichment….

C# RuntimeJava Runtime

Model Lifecycle Utilities(Provisioning, Build,

Publish, etc.)

C++ Runtime

GDA Targets(Java, C#, C++)

Schema Targets(Object Pool, Tree Form)

Modeling Language (Metamodel)

Wire Format Specifications

Extensibility API’s

Specifications Core Technologies

Other languages...

Object Pool XML

Tree Form XML

Other...

Page 6: MODeX  Model Oriented Data eXchange

Model-Driven Development Lifecycle

MODeX Domain Model

MODeX Code Generator

XML SchemaJava / C#Generated

Domain API

Application Code

XML Message

marshallingApplication Developer

uses

unmarshalling

Conforms to...

EnterpriseModel

Repository

ß Publish model

ß reference shared definitions

Business Information Model

Message ContractDesigner

Message Contracts

Domain Expert /Business Analyst

Page 7: MODeX  Model Oriented Data eXchange

Demo and Walkthrough

MODeX Designer

Java GDA

Tree Form XML

Page 8: MODeX  Model Oriented Data eXchange

How MODeX Addresses Enterprise Messaging Challenges

• Partitions enterprise information into domains of manageable scope, with clear ownership and managed lifecycle.

• Reduces integration barriers by defining message payloads in terms of a consistent information model.

• Provides an expressive, graphical language for message protocol definition.

• Provides multiple views of information depending on lifecycle and messaging context.

• Enables orderly model evolution with entity-level versioning.

• Preserves object topology, including shared references and cycles.

• Uses schema validation where appropriate, but allows for rich, rules-based validation where required.

• Hides the wire format from developers, providing a path to more efficient wire representations.

• Reduces impedance mismatch between messages and objects.

Page 9: MODeX  Model Oriented Data eXchange

Comparison with JAXB

Limited to a single language.

Model is inferred from code, all other manifestations suffer.

Generic model inference does not encourage standard implementation.

Enforces one-to-one mapping of Java class to XSD type.

JAXBMapping

Model

Annotated Java Classes

Annotated XML Schema

Java Objects

XML Message

Runtime Marshaller

Model inferrence

Model inferrence

Page 10: MODeX  Model Oriented Data eXchange

MODeXDomain Model

Generated Domain API

(Java, C#, …)

XML Schema

Objects

XML Message

Runtime Services

Code Generation

Code Generation

Comparison with JAXB

Putting the model at the center gives the power of abstraction.

Code generation guarantees standardized implementations.

Model captures rich semantics encompassing all target languages.

Allows mapping a single class to multiple XSD types.

Supports multiple languages.

Page 11: MODeX  Model Oriented Data eXchange

Model-Driven Development and CASE

CASE Model-Driven DevelopmentFocus on round-trip engineering Focus on meaningful abstraction

General-purpose modeling Domain-specific modeling languages

Monolithic design Rich graphical modeling and IDE integration

Primitive, inflexible code generation Sophisticated model-to-model and model-to-code transformation pipeline

Limited cross-platform design Broad applicability to distributed software architecture

"Isn't this the same promise that CASE tools were making in the 1980's and '90's? If it didn't succeed then, why do we think we can make it work now?"

Page 12: MODeX  Model Oriented Data eXchange

MODeX Designer: How was it built?

Proven open source technology stackGMF

GEF

EMF

RCP

SWT/JFace

Equinox

Generative Diagram Editor FrameworkMVC Pattern for Graphical Editors

Model-Driven Development Framework, integrated with GMFViews, Editors, Perspectives

UI Toolkits

Plug-in and Buddy Classloader System

Page 13: MODeX  Model Oriented Data eXchange

Views

• Entity Model:

Page 14: MODeX  Model Oriented Data eXchange

View Example – Stage 1

* Party ID* Legal NameIdentity TypeTax TreatmentLegal Entity StatusConsolidatedRegulatedAuditedCountry of FormationFY End MonthFormation DateLegal FormTrade TypeEINGL CompanyApproved OrganizationsResponsible OrganizationsProduct Types

Legal Identity

SegmentBusiness UnitDivision

Organization

ResponsibleOrganizations

Product Type IDDescription

Product Type

Product Types

GL CodeFunctional CurrencyStatusGL Company NameParent GL CompanyGL StreamCost Center CTACC P and LCC Retained EarningsTAPS FedMirror Company SecurityMirror Company FXAccounting Jurisdiction

GL Company

Jurisdiction IDDescriptionGoverning BodyRevision

Accounting Jurisdiction

GL CompanyAccountingJurisdiction

Page 15: MODeX  Model Oriented Data eXchange

View Example – Stage 2

* Party ID* Legal NameIdentity TypeTax TreatmentLegal Entity StatusConsolidatedRegulatedAuditedCountry of FormationFY End MonthFormation DateLegal FormTrade TypeEINGL CompanyApproved OrganizationsResponsible OrganizationsProduct Types

Legal Identity

SegmentBusiness UnitDivision

Organization

ResponsibleOrganizations

Product Type IDDescription

Product Type

Product Types

GL CodeFunctional CurrencyStatusGL Company NameParent GL CompanyGL StreamCost Center CTACC P and LCC Retained EarningsTAPS FedMirror Company SecurityMirror Company FXAccounting Jurisdiction

GL Company

Jurisdiction IDDescriptionGoverning BodyRevision

Accounting Jurisdiction

GL CompanyAccountingJurisdiction

Page 16: MODeX  Model Oriented Data eXchange

View Example – Stage 3

* Party ID* Legal NameIdentity TypeTax TreatmentLegal Entity StatusConsolidatedRegulatedAuditedCountry of FormationFY End MonthFormation DateLegal FormTrade TypeEIN* GL CompanyApproved OrganizationsResponsible OrganizationsProduct Types

Legal Identity

SegmentBusiness UnitDivision

Organization

ResponsibleOrganizations

Product Type IDDescription

Product Type

Product Types

* GL CodeFunctional CurrencyStatusGL Company NameParent GL CompanyGL StreamCost Center CTACC P and LCC Retained EarningsTAPS FedMirror Company SecurityMirror Company FXAccounting Jurisdiction

GL Company

Jurisdiction IDDescriptionGoverning BodyRevision

Accounting Jurisdiction

GL CompanyAccountingJurisdiction

Page 17: MODeX  Model Oriented Data eXchange

High-Fidelity Messaging

AllocationBlock Account

Client Notice

<Block blockId="8927340"> <Allocation allocationId="982734"> <Account modex:objectId="1"

accountId="12349087" accountCode="ABC" type="DEF" />

</Allocation> <ClientNotice date="2007-09-17" status="sent"> <Account modex:objectId="1" /> </ClientNotice></Block>

Block b = BlockMsg.unmarshalFromDocument(doc);ClientNotice cn = b.getClientNotice();String accountCode =

cn.getAccount().getAccountCode();

Objects: Object Graphs may

contain shared references and cycles

XML: Shared objects are

detected by the marshaller, and assigned a unique ID.

The unmarshaller will reconstruct the object graph with full fidelity.

API: Traversal over the object

graph across any path yields full access to all fields.

Page 18: MODeX  Model Oriented Data eXchange

Advanced FeaturesVersioning

Provides clear guidelines for what can change within compatible versions of an entity.

Decouples model evolution from adoption. Provides runtime support for version

bridging and version consistency checks.

Field Promotion and Inline Views

Data Aspects

Page 19: MODeX  Model Oriented Data eXchange

Recap Elevates the model to a first-class form of

source code. Enables sophisticated code gen and

runtime behavior with guaranteed consistency.

Provides a very solid plank in the SOA platform, specifically addressing data representation.

Page 20: MODeX  Model Oriented Data eXchange

Q&A