1. Global Scale ESB with Mule
Andrew D Kennedy
grkvlt@apache.org
March 2011
2. Who Am I
• Enterprise Java Developer
• Apache Qpid Committer
• Previously Security Engineer
• Over 15 Years Java Experience
• Worked with various Investment Banks
• Interested in Data Mining and
Visualisation
3. This Presentation
• What is an ESB
• What is Mule
• Mule Applications
• Mule Scalability
4. What is an ESB
• Enterprise Service Bus
• SOA
– Service Oriented Architecture
• SEDA
– Staged Event-Driven Architecture
• EIP
– Enterprise Integration Patterns
5. Service Oriented Architecture
• Services
– Shared Business Functions
• Decoupling
– Local and Remote Services
• Distributed Applications
• Directory and Discovery
6. EIP
• Similar to Design Patterns
– Gang of Four Book
• Shared Terminology
• Names for Common Concepts
• Allows Discussion
• Simplifies Design
7. (Some) Common Patterns
• Aggregator (268)
• Channel Adapter (127)
• Content Based Router (230)
• Dead Letter Channel (119)
• Selective Consumer (515)
• Message Translator (85)
• Guaranteed Delivery (122)
8. What is Mule
• Open Source Project
• MuleSoft
– Mule Forge
– Mule Enterprise
– Mule MQ
– Tcat Server
• 2.x - Legacy Applications
• 3.1.1 - Current Community Release
• 3.2.0 - Latest Developer Build
11. VM
• Communication within VM
• Synchronous or Asynchronous
• Transactional
<vm:connector name="async"
queueEvents="true” />
<vm:inbound-endpoint path="in"
connector-ref="async"/>
25. Services
• Combine Endpoints, Routers and
Components
• Mule 2.0 idiom
• Replaced with Flows and Patterns
– Simpler to use and configure
– Some features still not available
27. Components
• Carry out actions
• Business logic in a flow
• Simple components
– Logging
– Passthrough
– Testing
• Spring or POJO
• Web services
28. Message Processors
• Aggregator and Splitter
• Message Filters
• Recipient List
• Resequencer
• Round Robin
• Wire Tap
29. Example Flow
<flow name=”OrderFlow">
<file:inbound-endpoint path="/incoming">
<file:filename-filter name=”order-*.xml"/>
</file:inbound-endpoint>
<xml:xslt-transformer xsl-file=”order-transform.xsl"/>
<splitter expression="xpath://order"/>
<!-- The following message processors will be invoked for each order in the xml file -->
<expression-filter expression="xpath://order[@type='book']"/>
<component class=”com.example.BookOrderProcessor"/>
<smtp:outbound-endpoint subject="Order Confirmation" address="#[variable:email]"/>
<jdbc:outbound-endpoint ref=“saveOrder"/ >
<default-exception-strategy>
<jms:outbound-endpoint queue="failedOrders"/>
</default-exception-strategy>
</flow>
32. Patterns
• Specific integration Features
• Simple Service
– Exposes Components as Web Services
• Web Service Proxy
• Bridge
– Message Adapter and Transformer
• Validator
– Validates inbound messages synchronously
– Processes asynchronously
35. Mule Scalability
• Global Enterprises
• Performance
• Multiple Data Locations, Sources,
Destinations and Owners
• Services
– Software as a Service
– Infrastructure as a Service
– Platform as a Service
37. Transactions
• ACID
– Atomicity, Consistency, Isolation, Durability
• Easy on one system
• Hard with distributed systems
– Pick your boundaries
• Robust failure handling