19
The Real-Time Middleware Experts The Real-Time Middleware Experts Integrating Apache Camel with DDS Gerardo Pardo-Castellote Alejandro de Campos Ruiz Gianpiero Napoli http://www.rti.com OMG Real-time, Embedded and Enterprise-Scale Time-Critical Systems workshop, May 2010

Integrating Apache Camel with DDS - OMG · Apache Camel is a open source “routing and mediation” service that implements many Enterprise Integration Patterns The Apache Camel

  • Upload
    others

  • View
    27

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Integrating Apache Camel with DDS - OMG · Apache Camel is a open source “routing and mediation” service that implements many Enterprise Integration Patterns The Apache Camel

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

Page 2: Integrating Apache Camel with DDS - OMG · Apache Camel is a open source “routing and mediation” service that implements many Enterprise Integration Patterns The Apache Camel

Agenda

Motivation

Background

Approach

Conclusions

© 2009 Real-Time Innovations, Inc. COMPANY CONFIDENTIAL 2

Page 3: Integrating Apache Camel with DDS - OMG · Apache Camel is a open source “routing and mediation” service that implements many Enterprise Integration Patterns The Apache Camel

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

Page 4: Integrating Apache Camel with DDS - OMG · Apache Camel is a open source “routing and mediation” service that implements many Enterprise Integration Patterns The Apache Camel

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

Page 5: Integrating Apache Camel with DDS - OMG · Apache Camel is a open source “routing and mediation” service that implements many Enterprise Integration Patterns The Apache Camel

Credit: Figure from http://camel.apache.org/architecture.html

Page 6: Integrating Apache Camel with DDS - OMG · Apache Camel is a open source “routing and mediation” service that implements many Enterprise Integration Patterns The Apache Camel

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

Page 7: Integrating Apache Camel with DDS - OMG · Apache Camel is a open source “routing and mediation” service that implements many Enterprise Integration Patterns The Apache Camel

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

Page 8: Integrating Apache Camel with DDS - OMG · Apache Camel is a open source “routing and mediation” service that implements many Enterprise Integration Patterns The Apache Camel

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

Page 9: Integrating Apache Camel with DDS - OMG · Apache Camel is a open source “routing and mediation” service that implements many Enterprise Integration Patterns The Apache Camel

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>

Page 10: Integrating Apache Camel with DDS - OMG · Apache Camel is a open source “routing and mediation” service that implements many Enterprise Integration Patterns The Apache Camel

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>

Page 11: Integrating Apache Camel with DDS - OMG · Apache Camel is a open source “routing and mediation” service that implements many Enterprise Integration Patterns The Apache Camel

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

Page 12: Integrating Apache Camel with DDS - OMG · Apache Camel is a open source “routing and mediation” service that implements many Enterprise Integration Patterns The Apache Camel

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

Page 13: Integrating Apache Camel with DDS - OMG · Apache Camel is a open source “routing and mediation” service that implements many Enterprise Integration Patterns The Apache Camel

Enterprise Integration Patterns

40+ Patterns

Example:– MessageRouter,

Point2PointChannel, PublishSubscribeChannel,ContentBasedRouter, ReciepeintList, Splitter, Aggegator, Sampling, Delayer, Normalizer, CompetingConsumers, MessageDisparcher

Page 14: Integrating Apache Camel with DDS - OMG · Apache Camel is a open source “routing and mediation” service that implements many Enterprise Integration Patterns The Apache Camel

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.

Page 15: Integrating Apache Camel with DDS - OMG · Apache Camel is a open source “routing and mediation” service that implements many Enterprise Integration Patterns The Apache Camel

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”

Page 16: Integrating Apache Camel with DDS - OMG · Apache Camel is a open source “routing and mediation” service that implements many Enterprise Integration Patterns The Apache Camel

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”

Page 17: Integrating Apache Camel with DDS - OMG · Apache Camel is a open source “routing and mediation” service that implements many Enterprise Integration Patterns The Apache Camel

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

Page 18: Integrating Apache Camel with DDS - OMG · Apache Camel is a open source “routing and mediation” service that implements many Enterprise Integration Patterns The Apache Camel

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

Page 19: Integrating Apache Camel with DDS - OMG · Apache Camel is a open source “routing and mediation” service that implements many Enterprise Integration Patterns The Apache Camel

© 2009 Real-Time Innovations, Inc. COMPANY CONFIDENTIAL 19

Thank You!

Q & A