integration patterns for mission critical systems
DESCRIPTION
An increasing number of mission- and business-critical systems rely on the OMG DDS as the technology for distributing and managing data. DDS trivializes system integration in those cases where a shared data model exists. Yet, integrating DDS-based systems that rely on different information models, or DDS-based systems with systems that use other technologies is today performed either point-to-point, or taking advantage of integration technologies such as Enterprise Service Bus (ESB). None of these approaches is optimal for mission- or business-critical applications because of the quadratic complexity of point-to-point integration, and because of the inefficiency and lack of QoS preservation and transformation of ESBs. With the trend toward Systems of Systems and the increasing need for sharing information across multiple systems and technologies these limitations are no longer sustainable either from a cost or from a time-to-market perspective. At the same time, well architected System of Systems often rely on the same language of Integration Patters in order to deal with problems that stem from systems asymmetry, data aggregation, correlation, sampling, data projections, etc. This presentation will (1) introduce a pattern language for Integration of Mission Critical System of Systems, (2) explain for each pattern the problem it solves, the context in which it arises and how the conflicting forces are often balanced, and (3) an implementation of these patterns as provided by the OpenSplice Gateway route definition DSL.TRANSCRIPT
Ope
nSpl
ice
DD
S
Angelo CORSARO, Ph.D.Chief Technology Officer OMG DDS Sig Co-Chair
Integration Patterns[For Mission/Business Critical System of Systems]
Copyrig
ht 2011, PrismTech – A
ll Rights Reserved.
Ope
nSpl
ice
DD
S
Thank you for registering to attend PrismTech’s OpenSplice DDS User Conference which will be held in Paris, France on Tuesday 17 April 2012 at 6.00pm Central European Time. We very much look forward to meeting both new and experienced OpenSplice DDS Users at the event. Please see below some logistical information for the event. Event Location The OpenSplice DDS User Conference is free to attend and will be held at: GRAND ETOILE D’OR ROOM (first level) Hotel Concorde La Fayette - http://www.concorde-lafayette.com/en/? 3 Place du General Koenig, 75017, Paris, France. The hotel is conveniently located close to the Champs-Elysees and the business district of La Defense. Detailed directions to the hotel via different travel modes is available from: http://www.concorde-lafayette.com/en/paris-tourism/directions.aspx Event Agenda The agenda for the event will be as follows: Time Agenda Presenter
18:00 CET Drinks and Canapes
18:15 CET The Progress of DDS
Dr Richard Soley, OMG
18:30 CET The Success Story that is OpenSplice DDS
Keith Steele, CEO, PrismTech
18:45 CET OpenSplice DDS Today - The V6 game changers
Hans van't Hag, OpenSplice DDS Product Manager, PrismTech
19:10 CET OpenSplice DDS Tomorrow - What's coming next
Dr Angelo Corsaro, OpenSplice DDS CTO, PrismTech
19:35 CET Buffet and Hands on with OpenSplice DDS
20.05 CET The Community - Your contributions enriching OpenSplice DDS
Dr Angelo Corsaro, OpenSplice DDS CTO, PrismTech and Hans van't Hag, OpenSplice DDS Product Manager, PrismTech
20:30 CET OpenSplice DDS User Success Stories
OpenSplice DDS Users
20:45 CET The OpenSplice DDS Forum – Your questions answered and your ideas discussed
All
21:30 CET Finish
Special Offer
The OpenSplice DDS User Conference is being held in collaboration with the Object Management Group (OMG) Real-Time, Embedded, and Enterprise Scale Time-Critical Systems Workshop, which will run from Tuesday 17 April until Thursday 19 April.
PrismTech is pleased to announce that as a platinum sponsor of the Workshop, we are able to offer you a special discounted rate.
Simply click on the link - http://www.omg.org/registration/RT-WS/index.htm - and enter the code “rts” where it prompts you to do so.
The code gives you a €295 saving off the standard conference rate as well as pricing options for individual days.
Copyrig
ht 2011, PrismTech – A
ll Rights Reserved.
Ope
nSpl
ice
DD
S
Scope and Context☐ This presentation will focus on Integration Patterns for systems
based on DDS
☐ The patterns presented address the challenges arising when integrating multiple DDS-based systems or when bridging across technology
☐ Finally, it is worth keeping in mind that Mission/Business- Critical systems have specific QoS requirement that should not be affected by integration!
Copyrig
ht 2011, PrismTech – A
ll Rights Reserved.
Ope
nSpl
ice
DD
S
Integration Challenges☐ Data Integration
☐ Enable data to flow across systems/sub-systems
☐ Data Policing☐ Control which data is allowed to get in/out of a given system/subsystem
☐ Impedance/QoS Adaptation☐ Different network bandwidth☐ Different processing power☐ Ensure that QoS properties of parts are preserved when integrated into
the whole
[1/2]
Copyrig
ht 2011, PrismTech – A
ll Rights Reserved.
Ope
nSpl
ice
DD
S
Integration Challenges
☐ Technology Integration☐ Enable data to flow across multiple formats and communication stacks
☐ Security☐ Secure information exchange across system/sub-system boundaries
[2/2]
Ope
nSpl
ice
DD
S
Data Integration Patterns
Copyrig
ht 2011, PrismTech – A
ll Rights Reserved.
Ope
nSpl
ice
DD
S
Data Integration PatternsData Integration Patterns are a synthesis of the most commonly used techniques for integrating systems that don’t share the same representation for some given entities
☐ Some common Data Integration Patterns are☐ Content Enricher☐ Content Filter☐ Type Transformation☐ Canonical Data Model
[1/2]
Copyrig
ht 2011, PrismTech – A
ll Rights Reserved.
Ope
nSpl
ice
DD
S
Content Enricher☐ Enriches a data type by adding additional information required
by the target system/subsystem
☐ Example: Compute speed and enrich position
struct CartesianCoord2D { long x; long y;};
struct Dynamics2D { long x; long y; long dx; long dy;
};System A System B
Content Enricher
Copyrig
ht 2011, PrismTech – A
ll Rights Reserved.
Ope
nSpl
ice
DD
S
Content Filter☐ Projects a data type by removing information not required by the
target system/subsystem
☐ Example: Going from Dynamics to Position
struct CartesianCoord2D { long x; long y;};
struct Dynamics2D { long x; long y; long dx; long dy;
};System A System B
Content Filter
Copyrig
ht 2011, PrismTech – A
ll Rights Reserved.
Ope
nSpl
ice
DD
S
Canonical Data Model☐ The Canonical Data Model Pattern is commonly
used in DDS systems. In this case, data is always transformed into the representation used by the “Canonical Model”. This approach is very useful as it reduces the integration complexity
☐ Example: Coordinate Systems
Type Transformerstruct CartesianCoord2D { long x; long y;};
struct PolarCoord2D { long rho; float theta;};
System A System B
Canonical Data Model
Ope
nSpl
ice
DD
S
Impedance/QoS Adaptation Patterns
Copyrig
ht 2011, PrismTech – A
ll Rights Reserved.
Ope
nSpl
ice
DD
S
Impedance/QoS Adaptation Patterns
☐ Impedance/QoS Adaptation Patterns provide solutions to the integration of systems/subsystems that have non-negligible difference w.r.t. their computational and/or networking capabilities
☐ Commonly Used Patterns are:☐ Impedance/QoS Mediator☐ Rate Adaptation☐ Compressor
Copyrig
ht 2011, PrismTech – A
ll Rights Reserved.
Ope
nSpl
ice
DD
S
Impedance Mediator
TopicA
TopicBTopicC
TopicD
Data Writer
Data Writer
Data Writer
System A (“Fast System”)
...
TopicA
TopicBTopicC
TopicD
Data Reader
Data Reader
Data Reader
Data Reader
System B (“Slow System”)
Copyrig
ht 2011, PrismTech – A
ll Rights Reserved.
Ope
nSpl
ice
DD
S
Impedance Mediator
☐ Direct integration of the two systems could lead to serious issues w.r.t. the “Fast” System as slow readers could slow down writers. This is not acceptable on a large class of Mission/Business Critical Systems
TopicA
TopicBTopicC
TopicD
Data Writer
Data Writer
Data Writer
System A (“Fast System”)
...
TopicA
TopicBTopicC
TopicD
Data Reader
Data Reader
Data Reader
Data Reader
System B (“Slow System”)
Copyrig
ht 2011, PrismTech – A
ll Rights Reserved.
Ope
nSpl
ice
DD
S
Impedance Mediator
☐ The mediator becomes the point of elasticity of the integrated system
☐ It decouples the fast from the slow system and allows for further injection of integration policies, such as, down-sampling (rate-adaptor), DDS QoS adaptation and compression
TopicA
TopicBTopicC
TopicD
Data Writer
Data Writer
Data Writer
System A (“Fast System”)
...
TopicA
TopicBTopicC
TopicD
Data Reader
Data Reader
Data Reader
Data Reader
System B (“Slow System”)
Mediator
Ope
nSpl
ice
DD
S
Security
Copyrig
ht 2011, PrismTech – A
ll Rights Reserved.
Ope
nSpl
ice
DD
S
Security Patterns☐ Security Integration Patterns provide common solutions to implement
secure information exchanged across system/subsystems
☐ The most commonly used security pattern in integration is the combination of the Border Security Model with Secure data Tunneling
Unsecured Environment
Unsecured Environment
Unsecured Environment
Unsecured Environment Secure Communication
System B
System A
System C
Ope
nSpl
ice
DD
S
OpenSplice Gateway
Copyrig
ht 2011, PrismTech – A
ll Rights Reserved.
Ope
nSpl
ice
DD
S
OpenSplice Gateway☐ Provides DDS applications with unprecedented
integration capabilities by supporting high performance format and content transformation, routing and QoS mediation
☐ Leverages Apache Camel integration framework and its support for over 80 connectors
☐ OpenSplice Gateway is the best choice for integrating DDS-interoperable applications with proprietary as well as standard-based messaging technologies, such as JMS and AMQP, as well as user applications leveraging Web standards such as W3C Web Services, REST and HTML5 WebSockets
Supported Connectors Include:- JMS- REST- CometD- CFX- TCP & UDP Sockets
- HTTP- AMQP- XMPP- Hibernate- Custom
OpenSplice
Gateway
DDSI-RTPS
Custom
REST
JMS
XMPP
AMQP
Copyrig
ht 2011, PrismTech – A
ll Rights Reserved.
Ope
nSpl
ice
DD
S
Architecturecamel-osplComponent
OpenSplice DDS
camel-ddsiComponent
JDDSI
OpenSpliceGateway
• Based on DataReader & DataWriter• Typed data
• No native or generated code• No marshalling(raw data buffer)
Camel DDS Processors
• DDSI demarshaller / marshaller• Data transformation• Dynamic Poll Enricher• QoS adaptations
Copyrig
ht 2011, PrismTech – A
ll Rights Reserved.
Ope
nSpl
ice
DD
S
Key Elements☐ Components: Provide connectivity to a given technology
☐ Endpoints: Represent a source/destination of messages from/to a components
☐ Exchanges: Encapsulate data and meta coming from and end-point
☐ Routes: Define path from input endpoints to output endpoints
☐ Processors: Allow to perform transformation to the data, its format, etc.
endpoint exchange route
processor
Copyrig
ht 2011, PrismTech – A
ll Rights Reserved.
Ope
nSpl
ice
DD
S
Components and Endpoints☐ A component is a factory of Endpoint instances. Over 80
components are supported
☐ Endpoints are specified using URI:☐ dds:TopicName:DomainID/TopicType?QoS☐ cometd://host:port/channelname☐ jms:[topic:]destinationName☐ [tcp|udp|vm]:host[:port]☐ xmpp://host:port/room☐ …
Copyrig
ht 2011, PrismTech – A
ll Rights Reserved.
Ope
nSpl
ice
DD
S
Routes
☐ A route defines a path from an in endpoint to an out endpoint.
☐ Route can be defined in Spring, or using either the Java or Scala DSL (I prefer the Scala DSL ;-)
Copyrig
ht 2011, PrismTech – A
ll Rights Reserved.
Ope
nSpl
ice
DD
S
Sample Route in Scala
val route= new RouteBuilder { ! “ddsi:Foo:1/FooType” to “dds:Bar:2/FooType” !} !
DDSI Endpoint ! Topic Name ! DomainID! TypeName!
val route= new RouteBuilder { ! “dds:Foo:1/FooType” to “dds:Bar:2/FooType” !} !
DDS Endpoint ! Topic Name ! DomainID! TypeName!
Copyrig
ht 2011, PrismTech – A
ll Rights Reserved.
Ope
nSpl
ice
DD
S
Enterprise Integration Patterns☐ EIP provide pre-specified ways of integrating
endpoints
☐ The most common integration patterns are supported, such as, multicast, filtering, correlation, content-routing, load-balancing, etc.
☐ Multicast Ex:
val shapesRoute = new RouteBuilder { ! “dds:Foo:1/FooType” !
"to (“dds:Bar:2/BarType”, “jms:topic:Foo”) !} !
Recipient List Content Based Router
Message FIlter
A B
Correlation ID
Splitter Aggregator
Ope
nSpl
ice
DD
S Integrating Patterns in Action
Copyrig
ht 2011, PrismTech – A
ll Rights Reserved.
Ope
nSpl
ice
DD
S
iShapes Application☐ To explore the features
provided by the OpenSplice Gateway we’ll use the simd-cxx ishapes application
☐ Three Topics☐ Circle, Square, Triangle
☐ One Typestruct ShapeType { string color; long x; long y; long shapesize;};#pragma keylist ShapeType color
Spotted shapes represent subscriptions
Pierced shapes represent publications
Ope
nSpl
ice
DD
S
Data Integration
Copyrig
ht 2011, PrismTech – A
ll Rights Reserved.
Ope
nSpl
ice
DD
S
Topic/Domain Bridging
☐ When using a DDSI endpoint de-marshaling is lazy. Thus in this example data is never de-marshalled but simply sent-over to the target domain, with the result that domain bridging is very efficient!
DDSDomain 1
DDSDomain 0
Topic“Circle”
Topic“Square”
1 val in = "ddsi:Circle:0/ShapeType"2 val out = "ddsi:Square:1/ShapeType"3 4 val shapesRoute = new RouteBuilder {5 in to out 6 }
Copyrig
ht 2011, PrismTech – A
ll Rights Reserved.
Ope
nSpl
ice
DD
S
Type Transformation
☐ process allows to perform arbitrary modifications to the exchange content
☐ As such it can be used to implement arbitrary type transformations
DDSDomain 1
DDSDomain 0
Topic“Foo”
Topic“Bar”
1 val shapeRoute0 = new RouteBuilder {2 in unmarshal(cdrData) process ({ 3 e => foo2Bar(e.getIn.getBody(classOf[Foo]))})4 to out5 }
Ope
nSpl
ice
DD
S
Data Policing
Copyrig
ht 2011, PrismTech – A
ll Rights Reserved.
Ope
nSpl
ice
DD
S
Content Router 1 // Define endpoints 2 val inEndpoint = "ddsi:"+ inTopic +":"+ inDomain +"/" + shapeType 3 val outEndpoint1 = "ddsi:"+ outTopic1 +":"+ outDomain1 +"/" + shapeType 4 val outEndpoint2 = "ddsi:"+ outTopic2 +":"+ outDomain2 +"/" + shapeType 5 6 val cdrData = new DataFormatDefinition(new CDRDataFormat) 7 val shapesRoute = new RouteBuilder { 8 inEndpoint unmarshal(cdrData) choice { 9 when ( e => {10 val s = e.getIn.getBody(classOf[ShapeType])11 if (s.x > s.y) true else false12 }) to outEndpoint113 14 when (e => {15 val s = e.getIn.getBody(classOf[ShapeType])16 if (s.x < s.y) true else false17 }) to outEndpoint218 19 otherwise { to (outEndpoint1, outEndpoint2) }20 }21 22 }
DDSDomain 2
DDSDomain 0
Topic“Circle”
Topic“Circle”
DDSDomain 1
Topic“Circle”
if (x >= y) if (x <= y)
Copyrig
ht 2011, PrismTech – A
ll Rights Reserved.
Ope
nSpl
ice
DD
S
Load Balancing
DDSDomain 2
DDSDomain 0
Topic“Circle”
Topic“Circle”
DDSDomain 1
Topic“Circle”
load balance
1 // Define endpoints 2 val inEndpoint = "ddsi:"+ inTopic +":"+ inDomain +"/" + shapeType 3 val outEndpoint1 = "ddsi:"+ outTopic1 +":"+ outDomain1 +"/" + shapeType 4 val outEndpoint2 = "ddsi:"+ outTopic2 +":"+ outDomain2 +"/" + shapeType 5 6 // Define a Route using the Java DSL 7 val shapesRoute = new RouteBuilder { 8 override def configure() = 9 from(inEndpoint).sample(period, TimeUnit.MILLISECONDS) 10 loadBalance() roundRobin() 11 to(outEndpoint1, outEndpoint2)12 }
Ope
nSpl
ice
DD
S
Impedance QoS Adaptation
Copyrig
ht 2011, PrismTech – A
ll Rights Reserved.
Ope
nSpl
ice
DD
S
Data Sampling
DDSDomain 1
DDSDomain 0
Topic“Circle”
Topic“Circle”
1 per 500 msec
1 // Define endpoints 2 val inEndpoint = "ddsi:"+ inTopic +":"+ inDomain +"/" + shapeType 3 val outEndpoint = "ddsi:"+ outTopic +":"+ outDomain +"/" + shapeType 4 5 // Define a Route using the Java DSL 6 val shapesRoute = new RouteBuilder { 7 override def configure() = 8 from(inEndpoint) sample(period, TimeUnit.MILLISECONDS) 9 to(outEndpoint)10 }
Ope
nSpl
ice
DD
S
Technology Integration
Copyrig
ht 2011, PrismTech – A
ll Rights Reserved.
Ope
nSpl
ice
DD
S
JMS Integration
JMS
DDSDomain 0
Topic“Circle”
Topic“Circle”
To Json
1 val dds = "ddsi:Circle:0/ShapeType"2 val jms =3 "jms:topic:circle?jmsMessageType=Text&deliveryPersistent=false"4 5 val shapeRoute = new RouteBuider {6 from(dds) unmarshal("cdr") marshal().json() to(jms)7 }
Copyrig
ht 2011, PrismTech – A
ll Rights Reserved.
Ope
nSpl
ice
DD
S
1 // Define endpoints 2 val inEndpoint = 3 "ddsi:"+ inTopic +":"+ inDomain +"/" + shapeType 4 val outEndpoint = 5 "websocket://"+inTopic.toLowerCase + "?sendToAll=true" 6 7 // Define a Route using the Scala DSL 8 val shapesRoute = new RouteBuilder { 9 override def configure() =10 from(inEndpoint) unmarshal("cdr") marshal() json() to(outEndpoint)11 }
WebSocket Integration
DDSDomain 0
Topic“Circle”
To JSON
☐ This example requires Camel 2.10
Ope
nSpl
ice
DD
S
Security
Ope
nSpl
ice
DD
S
☐ Integrate different DDS Domains via TCP (or UDP) tunnel☐ Per Topic bridging☐ Unidirectional or bidirectional☐ Possibly adding SSL/TLS
DDSDomain 0
DDSDomain 0
Topic“Circle”
Topic“Circle”
GW 1
TCP
GW 2
TCP/UDP Tunneling
1 // on GW1:2 from("ddsi:Circle:0/ShapeType")3 to("netty:tcp://localhost:6789?sync=false");
1 // on GW2:2 from("netty:tcp://localhost:6789?sync=false")3 to("ddsi:Circle:0/ShapeType");
Ope
nSpl
ice
DD
S
☐ Integrate different DDS Domains via HTTP/HTTPS tunneling☐ Per Topic bridging☐ Unidirectional or bidirectional
DDSDomain 0
DDSDomain 0
Topic“Circle”
Topic“Circle”
GW 1
HTTP
GW 2
HTTP/HTTPS Tunneling
1 // on GTW12 from("ddsi:Circle:0/ShapeType")3 unmarshal("cdr")4 marshal().json()5 to("jetty:https://localhost:5001/circle");
1 // on GTW12 from("jetty:https://localhost:5001/circle")3 unmarshal().json()4 marshal("cdr")5 to("ddsi:Circle:0/ShapeType");
Ope
nSpl
ice
DD
S
Concluding Remarks
Copyrig
ht 2011, PrismTech – A
ll Rights Reserved.
Ope
nSpl
ice
DD
S
Concluding Remarks☐ The OpenSplice Gateway, through its tight integration with
Apache Camel, provides the best solution for integrating DDS-based Systems with just about anything else
☐ The OpenSplice Gateway architecture minimizes the integration overhead by being lazy -- in other terms, only performing work when this is necessary for the kind of transformation required
☐ In brief the OpenSplice Gateway provides you with a rich set of Integration Patterns and great performances!
Copyrig
ht 2011, PrismTech – A
ll Rights Reserved.
Ope
nSpl
ice
DD
S
References
¥Fastest growing JVM Language¥Open Source¥www.scala-lang.org
¥ #1 OMG DDS Implementation¥ Open Source¥ www.opensplice.org
OpenSplice | DDS
¥Scala API for OpenSplice DDS¥Open Source¥github.com/kydos/escalier
Escalier
¥ Integration Framework¥Open Source¥camel.apache.org
Ope
nSpl
ice
DD
S ¥@prismtech
¥@acorsaro
¥youtube.com/opensplicetube ¥slideshare.net/angelo.corsaro
¥opensplice.com ¥forums.opensplice.org
¥opensplice.org ¥[email protected]
:: Connect with Us ::