SlideShare a Scribd company logo
1 of 45
Download to read offline
Enterprise Integration
Patterns in Practice
Andreas Egloff
Sun Microsystems
Bruce Snyder
SpringSource
&
What Are Design Patterns? 
A design pattern is a formal way of
documenting a solution to a design
problem in a particular field of expertise.
(Wikipedia)
2
Got EIP?
Core Principles of EIP
> Patterns using asynchronous messaging as a style
of integration
> Pros
• Scaling
• Decoupling
> Cons
• Latency vs. throughput
• Decoupling not always appropriate
4
Pattern Overview
5
Identifying and Expressing Patterns
6
Layers of Functionality
> Not an either/or choice, combine layers as
appropriate
7
Message Flow / Service Composition
> Strengths and uses
• De-coupling and re-using Services
• Easier to evolve
• Scaling, Throughput
• Asynchronous nature
• Message routing, processing, transformation
• Easy to mediate
8
Message Endpoints / Services
> Message Endpoints / Services
• Message based interface
• Expose coarse grained services
• Typically stateless
• Anticipate re-use
• Visibility scope examples
• Within application
• Within ESB
• Anyone with access to JMS server
• External
9
Code Composition
> Strengths and uses
• Fine grained API access
• Stateful, fine grained interactions
• Low latency
> Challenge
• Interface tighter coupled
10
Implicit and Explicit Patterns
> Some patterns inherent in technology / framework
• Not every pattern a "keyword"
• e.g. JMS publish/subscribe ...
> Patterns realized in user code 
• e.g. Scatter-Gather realized in Java
> Platform has pre-built constructs
• e.g. Unix pipe symbol "|" : pipes-and-filters  
• Route in Camel or Fuji: pipes-and-filters
11
Visualizing EIPs
• Stencils exist for Visio and OmniGraffle 
• http://www.eaipatterns.com/downloads.html  
12
Patterns in Practice
13
> Issue: Too little explicit support out-of-the-box
• Too much roll your own
> Issue: Explicit support out-of-the-box is too rigid
• Does not exactly fit the use case
• Forced to work around or again roll your own
> What you want is out-of-the-box productivity with
explicit constructs AND flexibility to customize the
constructs
Gotcha - Flexibility vs. Productivity
14
Intro to Frameworks 
• Apache Camel
• http://camel.apache.org/
• Project Fuji / OpenESB v3
• http://fuji.dev.java.net/
15
What is Apache Camel? 
A framework for simplifying integration
through the use of the 
Enterprise Integration Patterns for
message mediation, processing,
routing and transformation
http://camel.apache.org/
16
Apache Camel is Focused on EIP
17
http://camel.apache.org/
=>
http://eaipatterns.com/
Message Routing
18
from("A").to("B");
Slightly More Complex Routing
19
from("file:///tmp/myFile.txt").
to("bean:MyBean?method=handleMessage").
to("jms:TEST.Q");
Multicast Routing
20
from("file:///tmp/myFile.txt").
choice().when().
method("MyBean", "matches").
to("Q").
end().
multicast("B", "C", "D");
Pipeline Routing
21
from("file:///tmp/myFile.txt").
choice().when().
method("MyBean", "matches").
to("Q").
end().
pipeline("B", "C", "D");
Camel Components
22
>  70+ components supported
What is Project Fuji? 
> Basis for OpenESB v3
> Fuji Goals
• Agility + Flexibility + Ease of Use = Productivity 
> Service Platform to realize
• Service Oriented Architecture (SOA)
• Light weight SOA (aka Web Oriented Architecture)
• Event Driven Architecture (EDA)
• ... last but not least MOM style applications 
> > 40 Components in OpenESB community today
http://fuji.dev.java.net/
23
Interesting Properties of Fuji 
• Convention, Configuration, Code... in that order
• Light weight, OSGi based
• Not JMS centric but Service Centric
• In-VM service composition option
• Choice of transport when going across VMs
• E.g. load balancing via http or federating using JXTA
• Visual and textual (DSL) editing for EIPs
• Camel component is another option 
24
Web Tooling Option
Service Composition with EIPs in a Browser
25
Web UI Gives the User...
• All-in-one interface for service composition
• Service Definition
• Routing, EIPs
• Configuration
• Deployment
• Layered on textual representation (DSL)
• Check out from version control, edit in IDE
• Tooling option for different preferences and skills
• e.g. casual technologist vs, Developer
• Extensible
26
Composition in an IDE / Text Editor
A textual representation of EIPs
> Goals
• Simple, concise syntax
• Easy to type and read
• Top-down design
• Generate service templates 
• Concept
• used to declare and configure services, routing
• Sets up services and routing at deployment time;
NOT interpreted on the fly at runtime
"Hello World 1" - 
simple routing
27
Basic Concepts of the DSL
Integration Flow Language
"Hello World 2" - 
pipes-and-filters
Output of one filter/stage flows to input of next
stage similar to Unix Pipes
28
Basic Concepts of the DSL
Explicit EIP Constructs
"Hello World 3" - 
adding EIP constructs
29
Example Pattern Implementations 
30
Message Routing: Content-Based Router
31
RouteBuilder builder = new RouteBuilder() {
    public void configure() {
      from("activemq:NewOrders").
      choice().
          when(header("product").
              isEqualTo("widget")).
              to("http://remotehost:8888/someApp/").
              to("activemq:Orders.Widgets").
          when(header("product").
              isEqualTo("gadget")).
              to("ftp://bsnyder@remotehost/private/reports/").
              to("activemq:Orders.Gadgets").
          otherwise().
              to("activemq:ERRORS");
        }
    };
}
Apache Camel Java DSL
Message Routing: Content-Based Router
32
<route>
<from uri="activemq:NewOrders"/>
<choice>
<when>
<xpath>/order/product = 'widget'</xpath>
<to uri="activemq:Orders.Widgets"/>
</when>
<when>
<xpath>/order/product = 'gadget'</xpath>
<to uri="activemq:Orders.Gadgets"/>
</when>
<otherwise>
<to uri="activemq:ERRORS"/>
</otherwise>
</choice>
</route>
Apache Camel Spring DSL
Message Channels: Dead Letter Channel 
33
RouteBuilder builder = new RouteBuilder() {
    public void configure() {
        errorHandler(deadLetterChannel("activemq:ERRORS.QUEUE"));
        from("file:///tmp/MyFile.txt?delay=2000").
        to("activemq:TEST.Q");
        }
    };
}
Apache Camel Java DSL
Message Channels: Dead Letter Channel 
34
<bean id="errorHandler" class="org.apache.camel.builder.DeadLetterChannelBuilder"
  p:deadLetterUri="smtp://mail.springsource.com:25" />
<camelContext id="camel" errorHandlerRef="errorHandler" 
  xmlns="http://camel.apache.org/schema/spring">
  <route>
    <from uri="seda:a" />
    <to uri="seda:b" />
  </route>
</camelContext>
Apache Camel Spring DSL
Message Transformation: Content Filter
35
RouteBuilder builder = new RouteBuilder() {
    public void configure() {
        from("activemq:THIS.QUEUE").
            process(new Processor() {
                public void process(Exchange e) {
                    Message in = exchange.getIn();
                    in.setBody(in.getBody(String.class) + " Ride the Camel!");
                }
            }).
        to("activemq:THAT.QUEUE");
        }
    };
}
Apache Camel Java DSL
Message Transformation: Content Filter
36
<bean id="transformerBean" class="com.mycompany.orders.transform.MyTransformerBean" />
<camelContext id="camel" xmlns="http://camel.apache.org/schema/spring">
  <from uri="activemq:THIS.QUEUE" />
  <bean ref="transformerBean" method="transformMessage" />
  <to uri="activemq:THAT.QUEUE" />
</camelContext>
Apache Camel Spring DSL
Camel Pattern: Throttler
> Limit the number of messages to be sent in a given
time window
> (only send three messages every 10 seconds)
37
public class MyRouteBuilder extends RouteBuilder {
    public void configure() {
      from("activemq:TEST.QUEUE”).
        throttler(3).timePeriodMillis(10000).
        to("http://remotehost:8888/meticProcessingService");
    }
}
Apache Camel Java DSL
Camel Pattern: Delayer
> Impose a simple delay on messages before being
sent along 
> (delay messages for a duration of JMSTimestamp
value plus three seconds)
38
public class MyRouteBuilder extends RouteBuilder {
    public void configure() {
      from("activemq:TEST.QUEUE").
        delayer(header("JMSTimestamp", 3000).
        to("http://remotehost:8888/meticProcessingService");
    }
}
Apache Camel Java DSL
Message Routing: Scatter-Gather ("all")
Fuji - DSL and Web UI
39
Message Routing: Scatter-Gather ("best")
Fuji - DSL and Web UI
40
Message Routing: Content-Based Router
Fuji - DSL and Web UI
41
Message Routing: Content-Based Router (dynamic)
• CBR rules configured at deployment/runtime
Fuji - DSL and Web UI
42
Message Routing: Composed Message Processor
Fuji - DSL and Web UI
43
EIP Product Demo 
• Apache Camel
• Project Fuji
44
Andreas Egloff
andreas.egloff@sun.com
Bruce Snyder
bruce.snyder@springsource.com

More Related Content

What's hot

Faster & Greater Messaging System HornetQ zzz
Faster & Greater Messaging System HornetQ zzzFaster & Greater Messaging System HornetQ zzz
Faster & Greater Messaging System HornetQ zzzJBug Italy
 
Lecture 7 Web Services JAX-WS & JAX-RS
Lecture 7   Web Services JAX-WS & JAX-RSLecture 7   Web Services JAX-WS & JAX-RS
Lecture 7 Web Services JAX-WS & JAX-RSFahad Golra
 
Interoperable Web Services with JAX-WS and WSIT
Interoperable Web Services with JAX-WS and WSITInteroperable Web Services with JAX-WS and WSIT
Interoperable Web Services with JAX-WS and WSITCarol McDonald
 
Modular JavaScript with CommonJS Compiler
Modular JavaScript with CommonJS CompilerModular JavaScript with CommonJS Compiler
Modular JavaScript with CommonJS CompilerDmitry Sheiko
 
Interoperable Web Services with JAX-WS
Interoperable Web Services with JAX-WSInteroperable Web Services with JAX-WS
Interoperable Web Services with JAX-WSCarol McDonald
 
Java Web Programming [8/9] : JSF and AJAX
Java Web Programming [8/9] : JSF and AJAXJava Web Programming [8/9] : JSF and AJAX
Java Web Programming [8/9] : JSF and AJAXIMC Institute
 
Camel and JBoss
Camel and JBossCamel and JBoss
Camel and JBossJBug Italy
 
Multi Client Development with Spring
Multi Client Development with SpringMulti Client Development with Spring
Multi Client Development with SpringJoshua Long
 
MWLUG 2015 - AD114 Take Your XPages Development to the Next Level
MWLUG 2015 - AD114 Take Your XPages Development to the Next LevelMWLUG 2015 - AD114 Take Your XPages Development to the Next Level
MWLUG 2015 - AD114 Take Your XPages Development to the Next Levelbalassaitis
 
«ReactiveCocoa и MVVM» — Николай Касьянов, SoftWear
«ReactiveCocoa и MVVM» — Николай Касьянов, SoftWear«ReactiveCocoa и MVVM» — Николай Касьянов, SoftWear
«ReactiveCocoa и MVVM» — Николай Касьянов, SoftWeare-Legion
 
Using Java to implement SOAP Web Services: JAX-WS
Using Java to implement SOAP Web Services: JAX-WS�Using Java to implement SOAP Web Services: JAX-WS�
Using Java to implement SOAP Web Services: JAX-WSKatrien Verbert
 
Petro Gordiievych "From Java 9 to Java 12"
Petro Gordiievych "From Java 9 to Java 12"Petro Gordiievych "From Java 9 to Java 12"
Petro Gordiievych "From Java 9 to Java 12"LogeekNightUkraine
 
java Servlet technology
java Servlet technologyjava Servlet technology
java Servlet technologyTanmoy Barman
 

What's hot (20)

Java 9
Java 9Java 9
Java 9
 
Faster & Greater Messaging System HornetQ zzz
Faster & Greater Messaging System HornetQ zzzFaster & Greater Messaging System HornetQ zzz
Faster & Greater Messaging System HornetQ zzz
 
JavaCro'14 - Scala and Java EE 7 Development Experiences – Peter Pilgrim
JavaCro'14 - Scala and Java EE 7 Development Experiences – Peter PilgrimJavaCro'14 - Scala and Java EE 7 Development Experiences – Peter Pilgrim
JavaCro'14 - Scala and Java EE 7 Development Experiences – Peter Pilgrim
 
Lecture 7 Web Services JAX-WS & JAX-RS
Lecture 7   Web Services JAX-WS & JAX-RSLecture 7   Web Services JAX-WS & JAX-RS
Lecture 7 Web Services JAX-WS & JAX-RS
 
Interoperable Web Services with JAX-WS and WSIT
Interoperable Web Services with JAX-WS and WSITInteroperable Web Services with JAX-WS and WSIT
Interoperable Web Services with JAX-WS and WSIT
 
Modular JavaScript with CommonJS Compiler
Modular JavaScript with CommonJS CompilerModular JavaScript with CommonJS Compiler
Modular JavaScript with CommonJS Compiler
 
Interoperable Web Services with JAX-WS
Interoperable Web Services with JAX-WSInteroperable Web Services with JAX-WS
Interoperable Web Services with JAX-WS
 
Java Web Programming [8/9] : JSF and AJAX
Java Web Programming [8/9] : JSF and AJAXJava Web Programming [8/9] : JSF and AJAX
Java Web Programming [8/9] : JSF and AJAX
 
Camel and JBoss
Camel and JBossCamel and JBoss
Camel and JBoss
 
J2EE jsp_01
J2EE jsp_01J2EE jsp_01
J2EE jsp_01
 
Multi Client Development with Spring
Multi Client Development with SpringMulti Client Development with Spring
Multi Client Development with Spring
 
MWLUG 2015 - AD114 Take Your XPages Development to the Next Level
MWLUG 2015 - AD114 Take Your XPages Development to the Next LevelMWLUG 2015 - AD114 Take Your XPages Development to the Next Level
MWLUG 2015 - AD114 Take Your XPages Development to the Next Level
 
«ReactiveCocoa и MVVM» — Николай Касьянов, SoftWear
«ReactiveCocoa и MVVM» — Николай Касьянов, SoftWear«ReactiveCocoa и MVVM» — Николай Касьянов, SoftWear
«ReactiveCocoa и MVVM» — Николай Касьянов, SoftWear
 
Wt unit 3 server side technology
Wt unit 3 server side technologyWt unit 3 server side technology
Wt unit 3 server side technology
 
Using Java to implement SOAP Web Services: JAX-WS
Using Java to implement SOAP Web Services: JAX-WS�Using Java to implement SOAP Web Services: JAX-WS�
Using Java to implement SOAP Web Services: JAX-WS
 
Petro Gordiievych "From Java 9 to Java 12"
Petro Gordiievych "From Java 9 to Java 12"Petro Gordiievych "From Java 9 to Java 12"
Petro Gordiievych "From Java 9 to Java 12"
 
Mule esb :Data Weave
Mule esb :Data WeaveMule esb :Data Weave
Mule esb :Data Weave
 
Mule jdbc
Mule   jdbcMule   jdbc
Mule jdbc
 
java Servlet technology
java Servlet technologyjava Servlet technology
java Servlet technology
 
Connection Pooling
Connection PoolingConnection Pooling
Connection Pooling
 

Similar to EIP In Practice

TS 4839 - Enterprise Integration Patterns in Practice
TS 4839 - Enterprise Integration Patterns in PracticeTS 4839 - Enterprise Integration Patterns in Practice
TS 4839 - Enterprise Integration Patterns in Practiceaegloff
 
Red Hat Open Day JBoss Fuse
Red Hat Open Day JBoss FuseRed Hat Open Day JBoss Fuse
Red Hat Open Day JBoss FuseAdrian Gigante
 
Integrating Microservices with Apache Camel
Integrating Microservices with Apache CamelIntegrating Microservices with Apache Camel
Integrating Microservices with Apache CamelChristian Posta
 
Service-Oriented Integration With Apache ServiceMix
Service-Oriented Integration With Apache ServiceMixService-Oriented Integration With Apache ServiceMix
Service-Oriented Integration With Apache ServiceMixBruce Snyder
 
Real world #microservices with Apache Camel, Fabric8, and OpenShift
Real world #microservices with Apache Camel, Fabric8, and OpenShiftReal world #microservices with Apache Camel, Fabric8, and OpenShift
Real world #microservices with Apache Camel, Fabric8, and OpenShiftChristian Posta
 
Real-world #microservices with Apache Camel, Fabric8, and OpenShift
Real-world #microservices with Apache Camel, Fabric8, and OpenShiftReal-world #microservices with Apache Camel, Fabric8, and OpenShift
Real-world #microservices with Apache Camel, Fabric8, and OpenShiftChristian Posta
 
Microservices with Apache Camel, Docker and Fabric8 v2
Microservices with Apache Camel, Docker and Fabric8 v2Microservices with Apache Camel, Docker and Fabric8 v2
Microservices with Apache Camel, Docker and Fabric8 v2Christian Posta
 
An introduction to Apache Camel
An introduction to Apache CamelAn introduction to Apache Camel
An introduction to Apache CamelKapil Kumar
 
Enterprise Integration Patterns and Apache Camel
Enterprise Integration Patterns and Apache CamelEnterprise Integration Patterns and Apache Camel
Enterprise Integration Patterns and Apache CamelMiloš Zubal
 
Hazelcast and MongoDB at Cloud CMS
Hazelcast and MongoDB at Cloud CMSHazelcast and MongoDB at Cloud CMS
Hazelcast and MongoDB at Cloud CMSuzquiano
 
Bluemix paas 기반 saas 개발 사례
Bluemix paas 기반 saas 개발 사례Bluemix paas 기반 saas 개발 사례
Bluemix paas 기반 saas 개발 사례uEngine Solutions
 
Exploring Twitter's Finagle technology stack for microservices
Exploring Twitter's Finagle technology stack for microservicesExploring Twitter's Finagle technology stack for microservices
Exploring Twitter's Finagle technology stack for microservices💡 Tomasz Kogut
 
Apache Camel interview Questions and Answers
Apache Camel interview Questions and AnswersApache Camel interview Questions and Answers
Apache Camel interview Questions and Answersjeetendra mandal
 
Messaging - RabbitMQ, Azure (Service Bus), Docker and Azure Functions
Messaging - RabbitMQ, Azure (Service Bus), Docker and Azure FunctionsMessaging - RabbitMQ, Azure (Service Bus), Docker and Azure Functions
Messaging - RabbitMQ, Azure (Service Bus), Docker and Azure FunctionsJohn Staveley
 
Managing your camels in the cloud with CI/CD
Managing your camels in the cloud with CI/CDManaging your camels in the cloud with CI/CD
Managing your camels in the cloud with CI/CDChristian Posta
 
01 apache camel-intro
01 apache camel-intro01 apache camel-intro
01 apache camel-introRedpillLinpro
 
Red Hat Agile integration Workshop Labs
Red Hat Agile integration Workshop LabsRed Hat Agile integration Workshop Labs
Red Hat Agile integration Workshop LabsJudy Breedlove
 
Mule and web services
Mule and web servicesMule and web services
Mule and web servicesManav Prasad
 
Splunk Conf 2014 - Getting the message
Splunk Conf 2014 - Getting the messageSplunk Conf 2014 - Getting the message
Splunk Conf 2014 - Getting the messageDamien Dallimore
 
Divide and Conquer – Microservices with Node.js
Divide and Conquer – Microservices with Node.jsDivide and Conquer – Microservices with Node.js
Divide and Conquer – Microservices with Node.jsSebastian Springer
 

Similar to EIP In Practice (20)

TS 4839 - Enterprise Integration Patterns in Practice
TS 4839 - Enterprise Integration Patterns in PracticeTS 4839 - Enterprise Integration Patterns in Practice
TS 4839 - Enterprise Integration Patterns in Practice
 
Red Hat Open Day JBoss Fuse
Red Hat Open Day JBoss FuseRed Hat Open Day JBoss Fuse
Red Hat Open Day JBoss Fuse
 
Integrating Microservices with Apache Camel
Integrating Microservices with Apache CamelIntegrating Microservices with Apache Camel
Integrating Microservices with Apache Camel
 
Service-Oriented Integration With Apache ServiceMix
Service-Oriented Integration With Apache ServiceMixService-Oriented Integration With Apache ServiceMix
Service-Oriented Integration With Apache ServiceMix
 
Real world #microservices with Apache Camel, Fabric8, and OpenShift
Real world #microservices with Apache Camel, Fabric8, and OpenShiftReal world #microservices with Apache Camel, Fabric8, and OpenShift
Real world #microservices with Apache Camel, Fabric8, and OpenShift
 
Real-world #microservices with Apache Camel, Fabric8, and OpenShift
Real-world #microservices with Apache Camel, Fabric8, and OpenShiftReal-world #microservices with Apache Camel, Fabric8, and OpenShift
Real-world #microservices with Apache Camel, Fabric8, and OpenShift
 
Microservices with Apache Camel, Docker and Fabric8 v2
Microservices with Apache Camel, Docker and Fabric8 v2Microservices with Apache Camel, Docker and Fabric8 v2
Microservices with Apache Camel, Docker and Fabric8 v2
 
An introduction to Apache Camel
An introduction to Apache CamelAn introduction to Apache Camel
An introduction to Apache Camel
 
Enterprise Integration Patterns and Apache Camel
Enterprise Integration Patterns and Apache CamelEnterprise Integration Patterns and Apache Camel
Enterprise Integration Patterns and Apache Camel
 
Hazelcast and MongoDB at Cloud CMS
Hazelcast and MongoDB at Cloud CMSHazelcast and MongoDB at Cloud CMS
Hazelcast and MongoDB at Cloud CMS
 
Bluemix paas 기반 saas 개발 사례
Bluemix paas 기반 saas 개발 사례Bluemix paas 기반 saas 개발 사례
Bluemix paas 기반 saas 개발 사례
 
Exploring Twitter's Finagle technology stack for microservices
Exploring Twitter's Finagle technology stack for microservicesExploring Twitter's Finagle technology stack for microservices
Exploring Twitter's Finagle technology stack for microservices
 
Apache Camel interview Questions and Answers
Apache Camel interview Questions and AnswersApache Camel interview Questions and Answers
Apache Camel interview Questions and Answers
 
Messaging - RabbitMQ, Azure (Service Bus), Docker and Azure Functions
Messaging - RabbitMQ, Azure (Service Bus), Docker and Azure FunctionsMessaging - RabbitMQ, Azure (Service Bus), Docker and Azure Functions
Messaging - RabbitMQ, Azure (Service Bus), Docker and Azure Functions
 
Managing your camels in the cloud with CI/CD
Managing your camels in the cloud with CI/CDManaging your camels in the cloud with CI/CD
Managing your camels in the cloud with CI/CD
 
01 apache camel-intro
01 apache camel-intro01 apache camel-intro
01 apache camel-intro
 
Red Hat Agile integration Workshop Labs
Red Hat Agile integration Workshop LabsRed Hat Agile integration Workshop Labs
Red Hat Agile integration Workshop Labs
 
Mule and web services
Mule and web servicesMule and web services
Mule and web services
 
Splunk Conf 2014 - Getting the message
Splunk Conf 2014 - Getting the messageSplunk Conf 2014 - Getting the message
Splunk Conf 2014 - Getting the message
 
Divide and Conquer – Microservices with Node.js
Divide and Conquer – Microservices with Node.jsDivide and Conquer – Microservices with Node.js
Divide and Conquer – Microservices with Node.js
 

More from Bruce Snyder

Beyond Horizontal Scalability: Concurrency and Messaging Using Spring
Beyond Horizontal Scalability: Concurrency and Messaging Using SpringBeyond Horizontal Scalability: Concurrency and Messaging Using Spring
Beyond Horizontal Scalability: Concurrency and Messaging Using SpringBruce Snyder
 
Enterprise Messaging With Spring JMS
Enterprise Messaging With Spring JMSEnterprise Messaging With Spring JMS
Enterprise Messaging With Spring JMSBruce Snyder
 
Styles of Applicaton Integration Using Spring
Styles of Applicaton Integration Using SpringStyles of Applicaton Integration Using Spring
Styles of Applicaton Integration Using SpringBruce Snyder
 
ActiveMQ In Action
ActiveMQ In ActionActiveMQ In Action
ActiveMQ In ActionBruce Snyder
 
ActiveMQ In Action - ApacheCon 2011
ActiveMQ In Action - ApacheCon 2011ActiveMQ In Action - ApacheCon 2011
ActiveMQ In Action - ApacheCon 2011Bruce Snyder
 
Apache ActiveMQ and Apache ServiceMix
Apache ActiveMQ and Apache ServiceMixApache ActiveMQ and Apache ServiceMix
Apache ActiveMQ and Apache ServiceMixBruce Snyder
 
Messaging With Apache ActiveMQ
Messaging With Apache ActiveMQMessaging With Apache ActiveMQ
Messaging With Apache ActiveMQBruce Snyder
 
Enterprise Messaging With ActiveMQ and Spring JMS
Enterprise Messaging With ActiveMQ and Spring JMSEnterprise Messaging With ActiveMQ and Spring JMS
Enterprise Messaging With ActiveMQ and Spring JMSBruce Snyder
 
Taking Apache Camel For a Ride
Taking Apache Camel For a RideTaking Apache Camel For a Ride
Taking Apache Camel For a RideBruce Snyder
 
Service Oriented Integration With ServiceMix
Service Oriented Integration With ServiceMixService Oriented Integration With ServiceMix
Service Oriented Integration With ServiceMixBruce Snyder
 
Taking Apache Camel For A Ride
Taking Apache Camel For A RideTaking Apache Camel For A Ride
Taking Apache Camel For A RideBruce Snyder
 
Messaging With ActiveMQ
Messaging With ActiveMQMessaging With ActiveMQ
Messaging With ActiveMQBruce Snyder
 
Taking Apache Camel For A Ride
Taking Apache Camel For A RideTaking Apache Camel For A Ride
Taking Apache Camel For A RideBruce Snyder
 

More from Bruce Snyder (13)

Beyond Horizontal Scalability: Concurrency and Messaging Using Spring
Beyond Horizontal Scalability: Concurrency and Messaging Using SpringBeyond Horizontal Scalability: Concurrency and Messaging Using Spring
Beyond Horizontal Scalability: Concurrency and Messaging Using Spring
 
Enterprise Messaging With Spring JMS
Enterprise Messaging With Spring JMSEnterprise Messaging With Spring JMS
Enterprise Messaging With Spring JMS
 
Styles of Applicaton Integration Using Spring
Styles of Applicaton Integration Using SpringStyles of Applicaton Integration Using Spring
Styles of Applicaton Integration Using Spring
 
ActiveMQ In Action
ActiveMQ In ActionActiveMQ In Action
ActiveMQ In Action
 
ActiveMQ In Action - ApacheCon 2011
ActiveMQ In Action - ApacheCon 2011ActiveMQ In Action - ApacheCon 2011
ActiveMQ In Action - ApacheCon 2011
 
Apache ActiveMQ and Apache ServiceMix
Apache ActiveMQ and Apache ServiceMixApache ActiveMQ and Apache ServiceMix
Apache ActiveMQ and Apache ServiceMix
 
Messaging With Apache ActiveMQ
Messaging With Apache ActiveMQMessaging With Apache ActiveMQ
Messaging With Apache ActiveMQ
 
Enterprise Messaging With ActiveMQ and Spring JMS
Enterprise Messaging With ActiveMQ and Spring JMSEnterprise Messaging With ActiveMQ and Spring JMS
Enterprise Messaging With ActiveMQ and Spring JMS
 
Taking Apache Camel For a Ride
Taking Apache Camel For a RideTaking Apache Camel For a Ride
Taking Apache Camel For a Ride
 
Service Oriented Integration With ServiceMix
Service Oriented Integration With ServiceMixService Oriented Integration With ServiceMix
Service Oriented Integration With ServiceMix
 
Taking Apache Camel For A Ride
Taking Apache Camel For A RideTaking Apache Camel For A Ride
Taking Apache Camel For A Ride
 
Messaging With ActiveMQ
Messaging With ActiveMQMessaging With ActiveMQ
Messaging With ActiveMQ
 
Taking Apache Camel For A Ride
Taking Apache Camel For A RideTaking Apache Camel For A Ride
Taking Apache Camel For A Ride
 

Recently uploaded

A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessPixlogix Infotech
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 

Recently uploaded (20)

A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 

EIP In Practice

  • 1. Enterprise Integration Patterns in Practice Andreas Egloff Sun Microsystems Bruce Snyder SpringSource &
  • 2. What Are Design Patterns?  A design pattern is a formal way of documenting a solution to a design problem in a particular field of expertise. (Wikipedia) 2
  • 4. Core Principles of EIP > Patterns using asynchronous messaging as a style of integration > Pros • Scaling • Decoupling > Cons • Latency vs. throughput • Decoupling not always appropriate 4
  • 7. Layers of Functionality > Not an either/or choice, combine layers as appropriate 7
  • 8. Message Flow / Service Composition > Strengths and uses • De-coupling and re-using Services • Easier to evolve • Scaling, Throughput • Asynchronous nature • Message routing, processing, transformation • Easy to mediate 8
  • 9. Message Endpoints / Services > Message Endpoints / Services • Message based interface • Expose coarse grained services • Typically stateless • Anticipate re-use • Visibility scope examples • Within application • Within ESB • Anyone with access to JMS server • External 9
  • 10. Code Composition > Strengths and uses • Fine grained API access • Stateful, fine grained interactions • Low latency > Challenge • Interface tighter coupled 10
  • 11. Implicit and Explicit Patterns > Some patterns inherent in technology / framework • Not every pattern a "keyword" • e.g. JMS publish/subscribe ... > Patterns realized in user code  • e.g. Scatter-Gather realized in Java > Platform has pre-built constructs • e.g. Unix pipe symbol "|" : pipes-and-filters   • Route in Camel or Fuji: pipes-and-filters 11
  • 12. Visualizing EIPs • Stencils exist for Visio and OmniGraffle  • http://www.eaipatterns.com/downloads.html   12
  • 14. > Issue: Too little explicit support out-of-the-box • Too much roll your own > Issue: Explicit support out-of-the-box is too rigid • Does not exactly fit the use case • Forced to work around or again roll your own > What you want is out-of-the-box productivity with explicit constructs AND flexibility to customize the constructs Gotcha - Flexibility vs. Productivity 14
  • 15. Intro to Frameworks  • Apache Camel • http://camel.apache.org/ • Project Fuji / OpenESB v3 • http://fuji.dev.java.net/ 15
  • 16. What is Apache Camel?  A framework for simplifying integration through the use of the  Enterprise Integration Patterns for message mediation, processing, routing and transformation http://camel.apache.org/ 16
  • 17. Apache Camel is Focused on EIP 17 http://camel.apache.org/ => http://eaipatterns.com/
  • 19. Slightly More Complex Routing 19 from("file:///tmp/myFile.txt"). to("bean:MyBean?method=handleMessage"). to("jms:TEST.Q");
  • 22. Camel Components 22 >  70+ components supported
  • 23. What is Project Fuji?  > Basis for OpenESB v3 > Fuji Goals • Agility + Flexibility + Ease of Use = Productivity  > Service Platform to realize • Service Oriented Architecture (SOA) • Light weight SOA (aka Web Oriented Architecture) • Event Driven Architecture (EDA) • ... last but not least MOM style applications  > > 40 Components in OpenESB community today http://fuji.dev.java.net/ 23
  • 24. Interesting Properties of Fuji  • Convention, Configuration, Code... in that order • Light weight, OSGi based • Not JMS centric but Service Centric • In-VM service composition option • Choice of transport when going across VMs • E.g. load balancing via http or federating using JXTA • Visual and textual (DSL) editing for EIPs • Camel component is another option  24
  • 25. Web Tooling Option Service Composition with EIPs in a Browser 25
  • 26. Web UI Gives the User... • All-in-one interface for service composition • Service Definition • Routing, EIPs • Configuration • Deployment • Layered on textual representation (DSL) • Check out from version control, edit in IDE • Tooling option for different preferences and skills • e.g. casual technologist vs, Developer • Extensible 26
  • 27. Composition in an IDE / Text Editor A textual representation of EIPs > Goals • Simple, concise syntax • Easy to type and read • Top-down design • Generate service templates  • Concept • used to declare and configure services, routing • Sets up services and routing at deployment time; NOT interpreted on the fly at runtime "Hello World 1" -  simple routing 27
  • 28. Basic Concepts of the DSL Integration Flow Language "Hello World 2" -  pipes-and-filters Output of one filter/stage flows to input of next stage similar to Unix Pipes 28
  • 29. Basic Concepts of the DSL Explicit EIP Constructs "Hello World 3" -  adding EIP constructs 29
  • 31. Message Routing: Content-Based Router 31 RouteBuilder builder = new RouteBuilder() {     public void configure() {       from("activemq:NewOrders").       choice().           when(header("product").               isEqualTo("widget")).               to("http://remotehost:8888/someApp/").               to("activemq:Orders.Widgets").           when(header("product").               isEqualTo("gadget")).               to("ftp://bsnyder@remotehost/private/reports/").               to("activemq:Orders.Gadgets").           otherwise().               to("activemq:ERRORS");         }     }; } Apache Camel Java DSL
  • 32. Message Routing: Content-Based Router 32 <route> <from uri="activemq:NewOrders"/> <choice> <when> <xpath>/order/product = 'widget'</xpath> <to uri="activemq:Orders.Widgets"/> </when> <when> <xpath>/order/product = 'gadget'</xpath> <to uri="activemq:Orders.Gadgets"/> </when> <otherwise> <to uri="activemq:ERRORS"/> </otherwise> </choice> </route> Apache Camel Spring DSL
  • 33. Message Channels: Dead Letter Channel  33 RouteBuilder builder = new RouteBuilder() {     public void configure() {         errorHandler(deadLetterChannel("activemq:ERRORS.QUEUE"));         from("file:///tmp/MyFile.txt?delay=2000").         to("activemq:TEST.Q");         }     }; } Apache Camel Java DSL
  • 34. Message Channels: Dead Letter Channel  34 <bean id="errorHandler" class="org.apache.camel.builder.DeadLetterChannelBuilder"   p:deadLetterUri="smtp://mail.springsource.com:25" /> <camelContext id="camel" errorHandlerRef="errorHandler"    xmlns="http://camel.apache.org/schema/spring">   <route>     <from uri="seda:a" />     <to uri="seda:b" />   </route> </camelContext> Apache Camel Spring DSL
  • 35. Message Transformation: Content Filter 35 RouteBuilder builder = new RouteBuilder() {     public void configure() {         from("activemq:THIS.QUEUE").             process(new Processor() {                 public void process(Exchange e) {                     Message in = exchange.getIn();                     in.setBody(in.getBody(String.class) + " Ride the Camel!");                 }             }).         to("activemq:THAT.QUEUE");         }     }; } Apache Camel Java DSL
  • 36. Message Transformation: Content Filter 36 <bean id="transformerBean" class="com.mycompany.orders.transform.MyTransformerBean" /> <camelContext id="camel" xmlns="http://camel.apache.org/schema/spring">   <from uri="activemq:THIS.QUEUE" />   <bean ref="transformerBean" method="transformMessage" />   <to uri="activemq:THAT.QUEUE" /> </camelContext> Apache Camel Spring DSL
  • 37. Camel Pattern: Throttler > Limit the number of messages to be sent in a given time window > (only send three messages every 10 seconds) 37 public class MyRouteBuilder extends RouteBuilder {     public void configure() {       from("activemq:TEST.QUEUE”).         throttler(3).timePeriodMillis(10000).         to("http://remotehost:8888/meticProcessingService");     } } Apache Camel Java DSL
  • 38. Camel Pattern: Delayer > Impose a simple delay on messages before being sent along  > (delay messages for a duration of JMSTimestamp value plus three seconds) 38 public class MyRouteBuilder extends RouteBuilder {     public void configure() {       from("activemq:TEST.QUEUE").         delayer(header("JMSTimestamp", 3000).         to("http://remotehost:8888/meticProcessingService");     } } Apache Camel Java DSL
  • 42. Message Routing: Content-Based Router (dynamic) • CBR rules configured at deployment/runtime Fuji - DSL and Web UI 42
  • 43. Message Routing: Composed Message Processor Fuji - DSL and Web UI 43
  • 44. EIP Product Demo  • Apache Camel • Project Fuji 44