Introduction to mule Esbs

Post on 16-Apr-2017

264 views 0 download

transcript

INTRODUCTION TO ESBS:MULE

By Prabhat Gangwar

AGENDA What is an ESB? Java Business Integration (JBI) Mule Architecture Mule in the Real World

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

DEFINITION(S)

Gartner Group

Giant exercise in Separation of Concerns

ESB FEATURES

Routing Message Transformation Message Enhancement Protocol Transformation Service Mapping

Message Processing Process Choreography Service Orchestration Transaction Management Security

AN ESB BLUEPRINT

General case

Client calls Choreographer Client calls Mediator

vs

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

JBI EXAMPLE

XSLT – message transformation PXE – choreography Groovy – scripting

JBI CASE STUDY: SERVICE MIX

Service Mix

Binding Components

Service Engines

MULE ARCHITECTURE

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 CONNECTOR VIEW

http://myapp.com pop3://user@userland.comhttp→xml xml→pop3

myUMO (xml→xml)

[Mule]

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

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 PROGRAMMING MODEL

Application logic

Application glue

Mule glue

MULE ROUTERS

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>

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://ross@muleumo.org"/><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>

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>

ESB FEATURES

Routing Message Transformation Message Enhancement Protocol Transformation Service Mapping

Message Processing Process Choreography Service Orchestration Transaction Management Security

XX

√√√√