introduction to esbs: mule uc san diego cse 294 november 14, 2008 barry demchak
TRANSCRIPT
![Page 1: Introduction to ESBs: Mule UC San Diego CSE 294 November 14, 2008 Barry Demchak](https://reader035.vdocuments.mx/reader035/viewer/2022062517/56649eca5503460f94bd8ce8/html5/thumbnails/1.jpg)
Introduction to ESBs:Mule
UC San DiegoCSE 294
November 14, 2008Barry Demchak
![Page 2: Introduction to ESBs: Mule UC San Diego CSE 294 November 14, 2008 Barry Demchak](https://reader035.vdocuments.mx/reader035/viewer/2022062517/56649eca5503460f94bd8ce8/html5/thumbnails/2.jpg)
Agenda
What is an ESB? Java Business Integration (JBI) Mule Architecture Mule in the Real World
![Page 3: Introduction to ESBs: Mule UC San Diego CSE 294 November 14, 2008 Barry Demchak](https://reader035.vdocuments.mx/reader035/viewer/2022062517/56649eca5503460f94bd8ce8/html5/thumbnails/3.jpg)
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]
![Page 4: Introduction to ESBs: Mule UC San Diego CSE 294 November 14, 2008 Barry Demchak](https://reader035.vdocuments.mx/reader035/viewer/2022062517/56649eca5503460f94bd8ce8/html5/thumbnails/4.jpg)
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
![Page 5: Introduction to ESBs: Mule UC San Diego CSE 294 November 14, 2008 Barry Demchak](https://reader035.vdocuments.mx/reader035/viewer/2022062517/56649eca5503460f94bd8ce8/html5/thumbnails/5.jpg)
Definition(s)
Gartner Group
Giant exercise in Separation of Concerns
[Ric]
![Page 6: Introduction to ESBs: Mule UC San Diego CSE 294 November 14, 2008 Barry Demchak](https://reader035.vdocuments.mx/reader035/viewer/2022062517/56649eca5503460f94bd8ce8/html5/thumbnails/6.jpg)
Definitions (more)
www.datapower.com
[Ric]
![Page 7: Introduction to ESBs: Mule UC San Diego CSE 294 November 14, 2008 Barry Demchak](https://reader035.vdocuments.mx/reader035/viewer/2022062517/56649eca5503460f94bd8ce8/html5/thumbnails/7.jpg)
ESB Features
Routing Message Transformation Message Enhancement Protocol Transformation Service Mapping
Message Processing Process Choreography Service Orchestration Transaction Management Security
[Ric]
![Page 8: Introduction to ESBs: Mule UC San Diego CSE 294 November 14, 2008 Barry Demchak](https://reader035.vdocuments.mx/reader035/viewer/2022062517/56649eca5503460f94bd8ce8/html5/thumbnails/8.jpg)
An ESB Blueprint
General case
Client calls Choreographer Client calls Mediator
vs
[Ric]
![Page 9: Introduction to ESBs: Mule UC San Diego CSE 294 November 14, 2008 Barry Demchak](https://reader035.vdocuments.mx/reader035/viewer/2022062517/56649eca5503460f94bd8ce8/html5/thumbnails/9.jpg)
Java Business Integration (JBI)
JSR-208 Standard Defines service engines (SE – choreographers,
transformers, security, etc) and binding components (BC – xml, http, etc)
Concerned with how internal customers (not external services) interact with service providers
COTS
[Ric]
![Page 10: Introduction to ESBs: Mule UC San Diego CSE 294 November 14, 2008 Barry Demchak](https://reader035.vdocuments.mx/reader035/viewer/2022062517/56649eca5503460f94bd8ce8/html5/thumbnails/10.jpg)
JBI Example
XSLT – message transformation PXE – choreography Groovy – scripting
[Ric]
![Page 11: Introduction to ESBs: Mule UC San Diego CSE 294 November 14, 2008 Barry Demchak](https://reader035.vdocuments.mx/reader035/viewer/2022062517/56649eca5503460f94bd8ce8/html5/thumbnails/11.jpg)
JBI Case Study: Service Mix
Service Mix
Binding Components
Service Engines
[Ric]
![Page 12: Introduction to ESBs: Mule UC San Diego CSE 294 November 14, 2008 Barry Demchak](https://reader035.vdocuments.mx/reader035/viewer/2022062517/56649eca5503460f94bd8ce8/html5/thumbnails/12.jpg)
Mule Architecture
[Mule]
![Page 13: Introduction to ESBs: Mule UC San Diego CSE 294 November 14, 2008 Barry Demchak](https://reader035.vdocuments.mx/reader035/viewer/2022062517/56649eca5503460f94bd8ce8/html5/thumbnails/13.jpg)
Mule Flow View
Channel – a method of connecting between two points (not part of Mule)
Connector – a transport provider (e.g., http, jms, soap, smtp, etc) implementing message receive and message dispatch
Transformer – converts message structure/format (e.g., http to xml)
Router – moves messages amongst UMOs and connectors
[Mule]
![Page 15: Introduction to ESBs: Mule UC San Diego CSE 294 November 14, 2008 Barry Demchak](https://reader035.vdocuments.mx/reader035/viewer/2022062517/56649eca5503460f94bd8ce8/html5/thumbnails/15.jpg)
Mule Transports
AS400 DQ EJB E-mail File FTP HTTP IMAP JDBC
JMS Multicast POP3 Quartz
RMI Servlet SMTP SOAP
SSL Stream TCP UDP VFS VM WSDL XMPP
![Page 16: Introduction to ESBs: Mule UC San Diego CSE 294 November 14, 2008 Barry Demchak](https://reader035.vdocuments.mx/reader035/viewer/2022062517/56649eca5503460f94bd8ce8/html5/thumbnails/16.jpg)
UMO Execution
Requires a component resolver (e.g., Spring or Pico) for Instantiation of UMOs Configuration of UMOs
Event processing Asynchronous Synchronous Request-Response
[Mule]
![Page 17: Introduction to ESBs: Mule UC San Diego CSE 294 November 14, 2008 Barry Demchak](https://reader035.vdocuments.mx/reader035/viewer/2022062517/56649eca5503460f94bd8ce8/html5/thumbnails/17.jpg)
Mule Programming Model
Application logic
Application glue
Mule glue
[Mule]
![Page 18: Introduction to ESBs: Mule UC San Diego CSE 294 November 14, 2008 Barry Demchak](https://reader035.vdocuments.mx/reader035/viewer/2022062517/56649eca5503460f94bd8ce8/html5/thumbnails/18.jpg)
Mule Routers
[Mule]
![Page 19: Introduction to ESBs: Mule UC San Diego CSE 294 November 14, 2008 Barry Demchak](https://reader035.vdocuments.mx/reader035/viewer/2022062517/56649eca5503460f94bd8ce8/html5/thumbnails/19.jpg)
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>
![Page 20: Introduction to ESBs: Mule UC San Diego CSE 294 November 14, 2008 Barry Demchak](https://reader035.vdocuments.mx/reader035/viewer/2022062517/56649eca5503460f94bd8ce8/html5/thumbnails/20.jpg)
Filtering Outbound (outbound)<outbound-router>
<catch-all-strategy className="org.mule.routing.ForwardingCatchAllStrategy">
<endpoint="jms://error.queue"/></catch-all-strategy>
<router className="org.mule.routing.outbound.FilteringOutboundRouter"><endpoint address="smtp://[email protected]"/><filter expectedType="java.lang.Exception"
className="org.mule.routing.filters.PayloadTypeFilter"/></router>
<router className="org.mule.routing.outbound.FilteringOutboundRouter"><endpoint address="jms://string.queue"/><filter className="org.mule.routing.filters.logic.AndFilter">
<left-filter expectedType="java.lang.String"className="org.mule.routing.filters.PayloadTypeFilter"/><right-filter pattern="the quick brown (.*)"className="org.mule.routing.filters.RegExFilter"/>
</filter></router>
</outbound-router>
![Page 21: Introduction to ESBs: Mule UC San Diego CSE 294 November 14, 2008 Barry Demchak](https://reader035.vdocuments.mx/reader035/viewer/2022062517/56649eca5503460f94bd8ce8/html5/thumbnails/21.jpg)
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>
![Page 22: Introduction to ESBs: Mule UC San Diego CSE 294 November 14, 2008 Barry Demchak](https://reader035.vdocuments.mx/reader035/viewer/2022062517/56649eca5503460f94bd8ce8/html5/thumbnails/22.jpg)
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}
![Page 23: Introduction to ESBs: Mule UC San Diego CSE 294 November 14, 2008 Barry Demchak](https://reader035.vdocuments.mx/reader035/viewer/2022062517/56649eca5503460f94bd8ce8/html5/thumbnails/23.jpg)
ESB Features
Routing Message Transformation Message Enhancement Protocol Transformation Service Mapping
Message Processing Process Choreography Service Orchestration Transaction Management Security
XX
√√√√
√
![Page 24: Introduction to ESBs: Mule UC San Diego CSE 294 November 14, 2008 Barry Demchak](https://reader035.vdocuments.mx/reader035/viewer/2022062517/56649eca5503460f94bd8ce8/html5/thumbnails/24.jpg)
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