View
21
Download
0
Category
Preview:
Citation preview
The Real-TimeMiddleware ExpertsThe Real-TimeMiddleware Experts
Integrating Apache Camel with DDS
Gerardo Pardo-CastelloteAlejandro de Campos RuizGianpiero Napoli
http://www.rti.com
OMG Real-time, Embedded and Enterprise-Scale Time-Critical Systems workshop,
May 2010
Agenda
Motivation
Background
Approach
Conclusions
© 2009 Real-Time Innovations, Inc. COMPANY CONFIDENTIAL 2
Motivation
Apache Camel is a open source “routing and mediation” service that implements many Enterprise Integration Patterns
The Apache Camel Community has adaptors to several transports– HTTP, JMS, Atom, AMQP, FTP, mail, hibernate, IRC, RSS, SNMP,
SQL, XMPP
The addition of a DDS adaptor would allow users of DDS to benefit from this tool
Both RTI and PrismTech are doing this so it must be a good idea
What is Apache Camel?
Java-based Routing and Mediation Engine– Implementing common Enterprise Integration Patterns
Programmed with a Domain Specific Language– Pluggable languages can be used to construct
expressions/predicates
Allowing routing/mediation rules between – Processors– Endpoints (Components)
• Endpoints are sources or destinations of Messages• Components are factories for Endpoints
Credit: Figure from http://camel.apache.org/architecture.html
Extending Camel:Components & Endpoints
Components provide the means to extend Camel
They are the factories for Endpoints– Endpoints must implement the EndpointInterface– Endpoints act as source and sinks of messages
CAMEL
Endpoints
Processors
The logic that mediates & manipulate messages between endpoints
40+ built-in into camel – Camel’s Enterprise Integration Patterns built as Processors or groups of
processorss
Processors
Camel Domain Specific Language (DSL)
The wiring between endpoints and processors and between processors
Defined as a set of classes in Java– Or alternatively using XML and spring
DSL
Camel’s DDS “Hello World”
<camelContext xmlns="http://camel.apache.org/schema/spring">
<route> <from uri=“dds:DomainId/InputTopicName"/> <to uri="file:c:\tmp"/></route>
</camelContext>
Camel’s DDS “Hello World2”
<camelContext xmlns="http://camel.apache.org/schema/spring">
<route> <from uri=“dds:DomainId/InputTopicName"/> <filter> <xpath>/ShapeType/x >= 10</xpath> <to uri="file:c:\tmp"/> </filter></route>
</camelContext>
So what?
With this common integration tasks can be reduced to “assembling” lego-blocks– The lego-blocks being the Endpoints and Processor– The assembly being done with XML or the Java DSL
The power comes from the rich set of Endpoints and Processors available
If XML is used not re-compilation is needed
Main Endpoints (Components) available [As of Camel 2.2]
ActiveMQ, AMQP, Atom, Bean,CFX, Exec, Filem FTP, FTPS, Hibernate, HL7, HTTP, IMAP, IRC, JavaSpace, JBI, JDBC, JMS, LDAP, Log, Mail, Nagios, POP, Printer, Quixkfix, RMI, RSS, SFTP, SMTP, SMPP, SNMP, SQL, TCP, UDP, XMPP,XQuery, XSLT
Enterprise Integration Patterns
40+ Patterns
Example:– MessageRouter,
Point2PointChannel, PublishSubscribeChannel,ContentBasedRouter, ReciepeintList, Splitter, Aggegator, Sampling, Delayer, Normalizer, CompetingConsumers, MessageDisparcher
Why is this good?
For DDS Users– Access to rich set of Camel Endpoints
• E.g. can easily integrate DDS and SMTP or FTP, or RSS– Ability to apply EIP to DDS Data– Integration with enterprise applications via JMS or HTTP
For Camel Users– Ability to leverage DDS performance, scalability– Ability to leverage DDS dscovery– Ability to leverage DDS QoS
– For example multiple Camel engines can communicate via DDS with virtually zero setup.
CAMEL vs Web-Enabled DDS
Camel can be used to integrate DDS with web-clients using the REST Endpoint
This approach allows embedding EIP processing at the integration point.
But:
... Approach requires manual configuration of the DDS to REST mapping/endpoint (e.g. which Topic goes where)
… Hard to implement full REST (e.g. create new DDS entities)
… Requires application mapping of data-types
… Initial benchmarks show significant lower performance than “native DDS Gateway”
CAMEL vs native DDS Routing Service
Camel can be used to route data between DDS domains
This approach allows embedding EIP processing at the integration point.
But:
... Camel does not understand DDS QoS so some will be lost in the bridge (e.g. LATENCY_BUDGET)
… Camel does not understand DDS discovery so automatic routing becomes hard/impossible
… Initial benchmarks show far less performance & scalability than “native DDS Router”
Conclusions
Apache Camel provides a “lego block” approach to system integration
The building blocks include– Endpoints/Transport adaptors– Processing components implementing EIPs
A DDS-Endpoint will bring benefits to both communities– To Camel users a more scalable QoS aware platform– To DDS users a tool for integrating many transports the
means to implement EIPs using DDS data
18
Future Directions
How to manage propagate DDS SampleInfo though Camel?
How to propagate DDS Instance lifecycle through Camel?
How to allow applications to control the QoS of the DDS adaptor?
How to integrate DDS Discovery?
More complete benchmarks
18
© 2009 Real-Time Innovations, Inc. COMPANY CONFIDENTIAL 19
Thank You!
Q & A
Recommended