2. Agenda
• What is an ESB?
• Java Business Integration (JBI)
• Mule Architecture
• Mule in the Real World
3. Source Material
• [Ric] Mark Richards, “The Role of the
Enterprise Service Bus”, NFJS, Oct 23, 2006.
http://www.infoq.com/presentations/Enterprise-Service-Bus
• [Mul] Mule Architecture Guide.
http://mule.mulesource.org/display/MULE/Architecture+Guide
• September [mule-user archive]
4. Problems Addressed by ESBs
• Integration of existing systems
• Refactorable in real time
• Flexibility to change as requirements change
• Decentralized (service-location transparency)
• Scalable (point solutions to full enterprise)
• Sharing of services across enterprise
• Ability to separate Business Services from
Service Implementations
• Leverages standards
19. Selective Consumer (inbound)
• Applies one or more filters to incoming payload, then
branch based on filter
<inbound-router>
<catch-all-strategy
className="org.mule.routing.ForwardingCatchAllStrategy">
<endpoint address="jms://topic:error.topic"/>
</catch-all-strategy>
<router
className="org.mule.routing.inbound.SelectiveConsumer">
<filter expression="msg/header/resultcode = 'success'"
className="org.mule.routing.filters.xml.JXPathFilter"/>
</router>
</inbound-router>
21. Nested Router
• Allows synchronous callouts that can be intercepted and routed
<mule-descriptor name="InvokerComponent"
implementation="org.mule.foo.Invoker">
<inbound-router>
<endpoint address="jms://Invoker.in"/>
</inbound-router>
<nested-router>
<binding interface="org.mule.foo.HelloInterface">
<endpoint
address="axis:http://192.168.2.14:81/services/HelloWebComponent?
method=helloMethod" remoteSync="true"/>
</binding>
</nested-router>
<outbound-router>
<router
className="org.mule.routing.outbound.OutboundPassThroughRouter">
<endpoint address="jms://Invoker.out"/>
</router>
</outbound-router>
</mule-descriptor>
22. Dog Days with Mule
• September [mule-user archive]
– How to get a hold of Endpoint object from the
component? {mule}
– Failed to throw UserDefined Exception {jaxws}
– Failed to invoke lifecycle “start” using CXF in
JBOSS {cxf}
– Problem in loading xsd files {mule}
– Problems with RemoteDispatcher {mule}
– Inject MuleClient Singleton with Spring {mule}
– Mule transaction support {mule}
23. ESB Features
• Routing
• Message Transformation
• Message Enhancement
• Protocol Transformation
• Service Mapping
Message Processing
Process Choreography
Service Orchestration
Transaction Management
Security
X
X
√
√
√
√
√
24. Take Away Messages
• Mule’s generality results in great flexibility, but at the cost of
great complexity for users
• Mule is the focal point of ambiguity and difficulties with many
standards-based packages
• Mule delivers (to a degree) on:
– Integration, flexibility, decentralized operation, scalability
• Mule doesn’t deliver (so much) on:
– Runtime refactoring, conceptualization
Notes de l'éditeur
Routing – ability to channel a request to a particular service provider based on deterministic or variable routing criteria (e.g., static/deterministic, content-based, policy-based, or complex rule-based)
Message Transformation – ability to convert the structure and format of the incoming business service request to the structure and format expected by the service provider (e.g., xml→xml, xml→Cobol Copybook, object→xml)
Message Enhancement – ability to add or modify the information contained in the message as required by the service provider (e.g., date format conversion, supplemental data, data conversion, rules-based enhancement)
Protocol Transformation – The ability to accept one type of protocol from the consumer as input (e.g., SOAP/JMS) and communicate to the service provider through a different protocol (e.g., IIOP) – concerned with message structure, not payload – has attributes of physical connection and logical connectivity
Service Mapping – The ability to translate a business service into the corresponding service implementation and provide binding and location information (includes implementation service name, service protocols and binding information, protocol-specific information, service-specific routing information)
Message Processing – The ability to manage state and perform request management by accepting an input request and ensuring delivery back to the client via message synchronization
Process Choreography – The ability to manage complex business processes that require the coordination of multiple business services to fulfill a single business service request (usually BPEL-based, often a manifestation of a use case or business process)
Service Orchestration – The ability to manage the coordination of multiple implementation services (usually inter-service communication or aggregate services)
Transaction Management – The ability to provide a single unit of work for a business service request by providing a framework for the coordination of multiple resources across multiple disparate services (e.g., compensatory transactional framework, WS-Coordination or JSR-95 Activity Service)
Security – The ability to protect enterprise services from unauthorized access (e.g., Authentication, Authorization, Auditing, and Administration via access to external managers)
Choreographer entrypoint (containing business processes and rules) requires that all services have BPEL coordination. Problems with performance, maintenance, and complexity. Common vendor solution.
Mediator entrypoint allows choreography where appropriate. Good scalability, performance, reduced complexity. Avoids layers … and mediators are fast (~ms). Choreographer is just another service provider.
Create standards-based architecture for integrating middleware components to perform ESB capabilities
Concerned with how internal customers (not external services) interact with service providers – transformation, security, etc.
Defines service engines (SE – choreographers, transformers, security, etc) and binding components (BC – xml, http, etc)
avoids vendor lockin
incentivizes best of breed SE and BC
Not addressing federation of ESBs
Mule is a lightweight UMO container
UMO = Universal Messaging Objects (POJO)
UMOs are endpoints that know how to send and receive requests
Constructor is called by component resolver to create object
Initialize called when component is registered with Mule model
Start is called when the component (server/UMO) is started
onCall is called when event is received for component … can resolve to any method within UMO
Stop is called when Mule server is stopped
Dispose is called when Mule server is shut down
Routing – ability to channel a request to a particular service provider based on deterministic or variable routing criteria (e.g., static/deterministic, content-based, policy-based, or complex rule-based)
Message Transformation – ability to convert the structure and format of the incoming business service request to the structure and format expected by the service provider (e.g., xml→xml, xml→Cobol Copybook, object→xml)
Message Enhancement – ability to add or modify the information contained in the message as required by the service provider (e.g., date format conversion, supplemental data, data conversion, rules-based enhancement)
Protocol Transformation – The ability to accept one type of protocol from the consumer as input (e.g., SOAP/JMS) and communicate to the service provider through a different protocol (e.g., IIOP) – concerned with message structure, not payload – has attributes of physical connection and logical connectivity
Service Mapping – The ability to translate a business service into the corresponding service implementation and provide binding and location information (includes implementation service name, service protocols and binding information, protocol-specific information, service-specific routing information)
Message Processing – The ability to manage state and perform request management by accepting an input request and ensuring delivery back to the client via message synchronization
Process Choreography – The ability to manage complex business processes that require the coordination of multiple business services to fulfill a single business service request (usually BPEL-based, often a manifestation of a use case or business process)
Service Orchestration – The ability to manage the coordination of multiple implementation services (usually inter-service communication or aggregate services)
Transaction Management – The ability to provide a single unit of work for a business service request by providing a framework for the coordination of multiple resources across multiple disparate services (e.g., compensatory transactional framework, WS-Coordination or JSR-95 Activity Service)
Security – The ability to protect enterprise services from unauthorized access (e.g., Authentication, Authorization, Auditing, and Administration via access to external managers)