Your SlideShare is downloading. ×
0
Service Oriented Integration
 With Apache ServiceMix
        Bruce Snyder
        bsnyder@apache.org
        7 Nov 2008
  ...
Agenda

• Enterprise Service Bus
• Java Business Integration
• Apache ServiceMix ESB
• ServiceMix 4
Integration is Messy!
What is an
 ESB?
What is an ESB?


quot;An Enterprise Service Bus (ESB) is a new architecture
that exploits Web services, messaging middlew...
What is an ESB?

An ESB acts as a shared messaging layer for connecting
applications and other services throughout an ente...
What is an ESB?

An ESB is an open standards, message-based,
distributed, integration solution that provides routing,
invo...
Do I need an ESB?


               ESB-oriented architecture:
          The wrong approach to adopting SOA



http://www.i...
Use a Planning Process

   ESB Planning Process
What is
 JBI?
What is JBI?


JBI defines an architecture that allows the construction
of integration systems from plug-in components, th...
Java Business Integration
Java Business Integration
JBI Normalized Message
JBI Packaging
Apache ServiceMix




http://servicemix.apache.org/
Apache ServiceMix
   Architecture
ServiceMix Features
• Supports many protocols
  – File, FTP, HTTP/S, JMS, SMTP, SOAP, TCP, XMPP
• Supports many engines
  ...
Apache Software
  Foundation
Message Routing
Message Routing
Example
Configuration
The File Poller
<beans xmlns:file='http://servicemix.apache.org/file/1.0'
       xmlns:test=quot;urn:testquot;>

  <file:p...
The Wiretap
<beans xmlns:eip=quot;http://servicemix.apache.org/eip/1.0quot;
       xmlns:test=quot;urn:testquot; >

 <eip:...
The Logger
    public class MyLogger extends RouteBuilder {
    public void configure() {
        from(quot;jbi:service:ur...
The Logger
    <beans xmlns=quot;http://www.springframework.org/schema/beansquot;
       xmlns:xsi=quot;http://www.w3.org/...
The Content-Based Router
<beans xmlns:eip=quot;http://servicemix.apache.org/eip/1.0quot;
       xmlns:test=quot;urn:testqu...
The Content-Based Router
...
      <eip:routing-rule>
        <eip:predicate>
          <eip:xpath-predicate
            x...
The JMS Sender
<beans xmlns:jms=quot;http://servicemix.apache.org/jms/1.0quot;
       xmlns:test=quot;urn:test”
       xml...
The JMS Sender
...
      <jms:endpoint service=quot;test:queue3quot;
                    endpoint=quot;myProviderquot;
   ...
Example
JBI Packaging
DEMO

• ServiceMix demo
Visualization
Distribution of
ServiceMix Containers
Apache
ServiceMix
    4.0
Lessons Learned
           From JBI 1.0
✓ Normalized Exchange and Messages
✓ Normalized Message Router
  ✓ The only way to...
ServiceMix 4.0
          Building Blocks
• Runtime: OSGi (Apache Felix)
  – JBI support still intact
  – NMR is an OSGi se...
ServiceMix 4 Architecture
ServiceMix 4 Architecture
What is Apache Camel?




http://activemq.apache.org/camel/
What is EIP?
Example Pattern:
Content Based Router



RouteBuilder MyRoute = new RouteBuilder() {
   public void configure() {
     fro...
Example Pattern:
Content Based Router
<camelContext id=quot;simpleRouteWithChoicequot;
    xmlns=quot;http://activemq.apac...
Thank You for Attending!




 Questions?
Service Oriented Integration With ServiceMix
Service Oriented Integration With ServiceMix
Upcoming SlideShare
Loading in...5
×

Service Oriented Integration With ServiceMix

5,186

Published on

Presentation from ApacheCon US 2008

Published in: Technology
0 Comments
12 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
5,186
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
451
Comments
0
Likes
12
Embeds 0
No embeds

No notes for slide

Transcript of "Service Oriented Integration With ServiceMix"

  1. 1. Service Oriented Integration With Apache ServiceMix Bruce Snyder bsnyder@apache.org 7 Nov 2008 New Orleans, Louisiana
  2. 2. Agenda • Enterprise Service Bus • Java Business Integration • Apache ServiceMix ESB • ServiceMix 4
  3. 3. Integration is Messy!
  4. 4. What is an ESB?
  5. 5. What is an ESB? quot;An Enterprise Service Bus (ESB) is a new architecture that exploits Web services, messaging middleware, intelligent routing, and transformation. ESBs act as a lightweight, ubiquitous integration backbone through which software services and application components flow.” (Gartner)
  6. 6. What is an ESB? An ESB acts as a shared messaging layer for connecting applications and other services throughout an enterprise computing infrastructure. It supplements its core asynchronous messaging backbone with intelligent transformation and routing to ensure messages are passed reliably. Services participate in the ESB using either web services messaging standards or JMS (LooselyCoupled.com)
  7. 7. What is an ESB? An ESB is an open standards, message-based, distributed, integration solution that provides routing, invocation, and mediation services to facilitate the interactions of disparate distributed information technology resources (applications, services, information, platforms) in a reliable manner. (Brenda Michelson, Elemental Links)
  8. 8. Do I need an ESB? ESB-oriented architecture: The wrong approach to adopting SOA http://www.ibm.com/developerworks/webservices/library/ws-soa-esbarch/index.html?ca=drs-
  9. 9. Use a Planning Process ESB Planning Process
  10. 10. What is JBI?
  11. 11. What is JBI? JBI defines an architecture that allows the construction of integration systems from plug-in components, that interoperate through the method of mediated message exchange. (JBI 1.0 Spec)
  12. 12. Java Business Integration
  13. 13. Java Business Integration
  14. 14. JBI Normalized Message
  15. 15. JBI Packaging
  16. 16. Apache ServiceMix http://servicemix.apache.org/
  17. 17. Apache ServiceMix Architecture
  18. 18. ServiceMix Features • Supports many protocols – File, FTP, HTTP/S, JMS, SMTP, SOAP, TCP, XMPP • Supports many engines – Apache Camel, Apache CXF, Apache ODE, Drools, OS Workflow, POJOs, Quartz, Scripting, Saxon XQuery and XSLT, WS-Notification • Supports Security – JAAS, WS-Security • Web Container/App Server Integration – Geronimo, JBoss, Jetty, Tomcat, Weblogic, Websphere
  19. 19. Apache Software Foundation
  20. 20. Message Routing
  21. 21. Message Routing
  22. 22. Example
  23. 23. Configuration
  24. 24. The File Poller <beans xmlns:file='http://servicemix.apache.org/file/1.0' xmlns:test=quot;urn:testquot;> <file:poller service=quot;test:filequot; endpoint=quot;endpointquot; targetService=quot;test:wiretapInquot; file=quot;/Users/bsnyder/smxdropboxquot;> </beans>
  25. 25. The Wiretap <beans xmlns:eip=quot;http://servicemix.apache.org/eip/1.0quot; xmlns:test=quot;urn:testquot; > <eip:wire-tap service=quot;test:wiretapInquot; endpoint=quot;endpointquot;> <eip:target> <eip:exchange-target service=quot;test:cbrquot; /> </eip:target> <eip:inListener> <eip:exchange-target service=quot;test:loggerquot; /> </eip:inListener> </eip:wire-tap> </beans>
  26. 26. The Logger public class MyLogger extends RouteBuilder { public void configure() { from(quot;jbi:service:urn:test:loggerquot;). process(new Processor() { public void process(Exchange exchange) { Message in = exchange.getIn(); in.setBody(in.getBody(String.class) + quot;<foo>xxxxxxxxxxxxxxxxxxxxxxxxxxxx</foo>quot;); } }) to(quot;log:demoquot;); } }
  27. 27. The Logger <beans xmlns=quot;http://www.springframework.org/schema/beansquot; xmlns:xsi=quot;http://www.w3.org/2001/XMLSchema-instancequot; xsi:schemaLocation=quot; http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd http://activemq.apache.org/camel/schema/spring http://activemq.apache.org/camel/schema/spring/camel-spring.xsdquot;> <camelContext id=quot;camelquot; xmlns=quot;http://activemq.apache.org/camel/schema/springquot;> <package>com.mycompany</package> </camelContext> </beans>
  28. 28. The Content-Based Router <beans xmlns:eip=quot;http://servicemix.apache.org/eip/1.0quot; xmlns:test=quot;urn:testquot;> <eip:content-based-router service=quot;test:cbrquot; endpoint=quot;endpointquot;> <eip:rules> <eip:routing-rule> <eip:predicate> <eip:xpath-predicate xpath=quot;/message/cheese/text() = 'gouda'quot; /> </eip:predicate> <eip:target> <eip:exchange-target service=quot;test:queue1quot; /> </eip:target> </eip:routing-rule> ...
  29. 29. The Content-Based Router ... <eip:routing-rule> <eip:predicate> <eip:xpath-predicate xpath=quot;/message/cheese/text() = 'swiss'quot; /> </eip:predicate> <eip:target> <eip:exchange-target service=quot;test:queue2quot; /> </eip:target> </eip:routing-rule> <eip:routing-rule> <eip:target> <eip:exchange-target service=quot;test:queue3quot; /> </eip:target> </eip:routing-rule> </eip:rules> </eip:content-based-router>
  30. 30. The JMS Sender <beans xmlns:jms=quot;http://servicemix.apache.org/jms/1.0quot; xmlns:test=quot;urn:test” xmlns:amq=quot;http://activemq.org/config/1.0quot;> <jms:endpoint service=quot;test:queue1quot; endpoint=quot;myProviderquot; role=quot;providerquot; destinationStyle=quot;queuequot; jmsProviderDestinationName=quot;queue1quot; connectionFactory=quot;#connectionFactoryquot; /> <jms:endpoint service=quot;test:queue2quot; endpoint=quot;myProviderquot; role=quot;providerquot; destinationStyle=quot;queuequot; jmsProviderDestinationName=quot;queue2quot; connectionFactory=quot;#connectionFactoryquot;/>
  31. 31. The JMS Sender ... <jms:endpoint service=quot;test:queue3quot; endpoint=quot;myProviderquot; role=quot;providerquot; destinationStyle=quot;queuequot; jmsProviderDestinationName=quot;queue3quot; connectionFactory=quot;#connectionFactoryquot;/> <amq:connectionFactory id=quot;connectionFactoryquot; brokerURL=quot;tcp://localhost:61616quot; /> </beans>
  32. 32. Example
  33. 33. JBI Packaging
  34. 34. DEMO • ServiceMix demo
  35. 35. Visualization
  36. 36. Distribution of ServiceMix Containers
  37. 37. Apache ServiceMix 4.0
  38. 38. Lessons Learned From JBI 1.0 ✓ Normalized Exchange and Messages ✓ Normalized Message Router ✓ The only way to plug in third party components ๏ XML normalization can be problematic ๏ Packaging/classloaders not very flexible ๏ Creating components is not easy ๏ Not always the best fit for a given API
  39. 39. ServiceMix 4.0 Building Blocks • Runtime: OSGi (Apache Felix) – JBI support still intact – NMR is an OSGi service • Message Broker: Apache ActiveMQ • Web Services: Apache CXF • Routing Engine: Apache Camel
  40. 40. ServiceMix 4 Architecture
  41. 41. ServiceMix 4 Architecture
  42. 42. What is Apache Camel? http://activemq.apache.org/camel/
  43. 43. What is EIP?
  44. 44. Example Pattern: Content Based Router RouteBuilder MyRoute = new RouteBuilder() { public void configure() { from(quot;activemq:TEST.QUEUEquot;).choice() .when(header(quot;fooquot;).isEqualTo(quot;barquot;)) .to(quot;file:target/fooquot;) .when(header(quot;fooquot;).isEqualTo(quot;cheesequot;)) .to(quot;ftp://myserver:1234/targetquot;) .otherwise().to(quot;log:TESTINGquot;); } };
  45. 45. Example Pattern: Content Based Router <camelContext id=quot;simpleRouteWithChoicequot; xmlns=quot;http://activemq.apache.org/camel/schema/springquot;> <route> <from uri=quot;activemq:TEST.QUEUEquot;/> <choice> <when> <predicate> <header name=quot;fooquot;/> <isEqualTo value=quot;barquot;/> </predicate> <to uri=quot;file:target/fooquot;/> </when> <when> <predicate> <header name=quot;fooquot;/> <isEqualTo value=quot;cheesequot;/> </predicate> <to uri=quot;seda:cquot;/> </when> <otherwise><to uri=quot;seda:dquot;/></otherwise> </choice> </route> </camelContext>
  46. 46. Thank You for Attending! Questions?
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×