SlideShare a Scribd company logo
1 of 40
M
D 1
The Enterprise Service Bus
Introduction using Mule
Introduction to Open-Source ESB
Authors: Achyuta Laxmi
Date: 10/06/2015
Version: DRAFT 0.1
M
D 2
Agenda
• What is Mule?
• How do you use Mule?
• What are the core Mule concepts?
• Learning mule with File endpoints
M
D 3
Enterprise Service Backbone
• Mule is an open-source Enterprise Service
Backbone (ESB)
M
D 4
Mule is Has Advanced
Technologies
• SEDA
– Staged Event-Driven Architecture
• Java NIO
– Java New Input/Output
M
D 5
SEDA
• SEDA decomposes a complex, event-driven software application into a set
of stages connected by queues
• This design avoids the high overhead associated with thread-based
concurrency models, and decouples event and thread scheduling from
application logic
• By performing admission control on each event queue, the service can be
well-conditioned to load, preventing resources from being overcommitted
when demand exceeds service capacity
• SEDA employs dynamic control to automatically tune runtime parameters
(such as the scheduling parameters of each stage) as well as to manage
load, for example, by performing adaptive load shedding
• Decomposing services into a set of stages also enables modularity and code
reuse, as well as the development of debugging tools for complex event-
driven applications
M
D 6
Java NIO
• NIO is a collection of Java programming language APIs
that offer advanced features for intensive I/O operations
• NIO facilitates an implementations that can directly use
the most efficient operations of the underlying platform
• NIO includes:
– Buffers for data of primitive types
– Character set encoders and decoders
– A pattern-matching facility based on Perl-style regular expressions
(in package java.util.regex)
– Channels, a new primitive I/O abstraction
– A file interface that supports locks and memory mapping
– A multiplexed, non-blocking I/O facility for writing scalable
servers
M
D 7
Mule’s “Moves Things Around”
• Folder to folder
• Queue to queue
• Shared memory to shared memory
• Using different types of transports
• In a flexible way
M
D 8
XML Pipeline
• An XML pipeline is a series of operation
that are performed on one or more XML
files
• Examples include:
– validate
– transform
– prune (remove nodes)
– split (break a single XML file into many files)
– merge (join two or more files together)
M
D 9
CRV Example
• Flow of XML document through approval
processes
Submit
CRV
Deed
Matched
CRV
SSN
Stripped
CRV
Income
Tax
Audit
County
Audit
County
Approval
State
Audit
State
Approval
M
D 10
Decomposition
• Example of XML Operations used on CRV
Validate Split
Remove
SSN
Element
Store
Modify
Value
Add
Element
Modify
Value
Add
Element
M
D 11
Declarative Approach
• Focus on specifying "What" not "How"
• Empower business analysis to write
machine-readable specifications
• Hide the "How" behind services with clear
interfaces (SOA)
M
D 12
Core Mule Concepts
• Mule Manager
• Mule Model
• Universal Message Object (UMO)
• Endpoints
• External Applications
M
D 13
Universal Message Object (UMO)
• A UMO is a type of Java object that can
– receive events "from anywhere"
– send events
• UMO Components are usually your business
objects. They are components that execute
business logic on an incoming event
• UMO are standard JavaBeans (containers)
• There is no Mule-specific code in your
components
• Mule handles all routing and transformation of
events to and from your objects based on the
configuration of your component
M
D 14
Transport
• A transport or "provider", is a set of objects
that add support to Mule to handle a
specific kind of transport or protocol
• Examples
– the "Email Provider" enables Mule to send and
receive messages via the SMTP, POP and
IMAP protocols
M
D 15
Connector
• A connector is the object that sends and
receives messages on behalf of an endpoint.
• Connectors are bundled as part of specific
transports or providers.
• For example, the FileConnector can
read and write file system files.
M
D 16
Router
• A router is the object that do something
with messages once they have been
received by a connector, or prior to being
sent out by the connector
M
D 17
Filter
• A filter optionally filters incoming or outgoing
messages that are coming into or going out from a
connector.
• For example, the File Provider comes with a
FilenameWildcardFilter that restricts
which files are read by the connector based on file
name patterns. For example only files with the
.xml extension can be routed.
• Filters are used in conjunction with Routers.
M
D 18
Transformer
• A transformer optionally changes incoming
or outgoing messages in some way
• This is usually done to make the message
format useable by a downstream function
• Examples:
– the ByteArrayToString transformer converts
byte arrays into String objects.
M
D 19
Mule Event Flow
• The nine stages of a
mule event
– first 2 – inbound
– middle 4 –
component
– last 2 – outbound
Endpoint
(Message Receiver)
Endpoint
(Message Dispatcher)
Inbound Router
Outbound Router
Inbound Transformer
Outbound Transformer
Interceptor
Service Invocation
Interceptor
Inbound
Component
Outbound
Optional Step
M
D 20
Message Receiver Endpoint
• Some event triggers a
message flow
– A file being written into a
folder
– A message arriving on a
message queue
– A record in a database
– Data written to a socket
Endpoint
(Message Dispatcher)
Inbound Router
Outbound Router
Inbound Transformer
Outbound Transformer
Interceptor
Service Invocation
Interceptor
Endpoint
(Message Receiver)
M
D 21
Inbound Router
• The inbound router is the fist step in a
message. Functions typically
performed by an inbound router
– Filtering
– Remove duplicate messages
– Matching messages
– Aggregation (combining)
– Re-sequence data
– Forwarding
• See also
– IdempotentReceiver
– CorrolationAggregator
– CorrelationResequencer
Endpoint
(Message Dispatcher)
Inbound Router
Outbound Router
Inbound Transformer
Outbound Transformer
Interceptor
Service Invocation
Interceptor
Endpoint
(Message Receiver)
M
D 22
Interceptor
• Used to intercept message flow
into your service component
• Used trigger monitor/events or
interrupt the flow of the message
• Example: an authorization
interceptor could ensure that the
current request has the correct
credentials to invoke the service.
Endpoint
(Message Dispatcher)
Inbound Router
Outbound Router
Inbound Transformer
Outbound Transformer
Service Invocation
Interceptor
Endpoint
(Message Receiver)
Interceptor
M
D 23
Inbound Transformer
• If the inbound data is
not in the correct
format for the
service it must be
transformed at this
point
Endpoint
(Message Receiver)
Endpoint
(Message Dispatcher)
Inbound Router
Outbound Router
Outbound Transformer
Interceptor
Service Invocation
Interceptor
Inbound Transformer
M
D 24
Service Invocation
• The actual service is
performed
• In mule, this is generally a
Java object
• Service invocation can also
be a "pass through"
Endpoint
(Message Receiver)
Endpoint
(Message Dispatcher)
Inbound Router
Outbound Router
Outbound Transformer
Interceptor
Interceptor
Inbound Transformer
Service Invocation
M
D 25
Outbound Router
• Dispatching the data
to all the relevant
endpoints
Endpoint
(Message Receiver)
Endpoint
(Message Dispatcher)
Inbound Router
Outbound Transformer
Interceptor
Interceptor
Inbound Transformer
Service Invocation
Outbound Router
M
D 26
Built-in Router Classes
Inbound Outbound Response
Idempotent Receiver Filtering Outbound Router Response Aggregator
Selective Consumer Recipient List
Aggregator Multicasting Router
Resequencer Chaining Router
Forwarding Consumer Message Splitter
Filtering List Message
Splitter
Filtering Xml Message
Splitter
Exception Based Router
M
D 27
Outbound Transformer
• Any transformations that needs to be
done on the message after a service
has been performed on the message
can be executed before it is put into
the endpoint
• See Also
– EnvelopeInterceptor
Endpoint
(Message Receiver)
Endpoint
(Message Dispatcher)
Inbound Router
Interceptor
Interceptor
Inbound Transformer
Service Invocation
Outbound Router
Outbound Transformer
M
D 28
Test Environment
M
D 29
Omitted From Examples for Brevity
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mule-configuration PUBLIC "-//MuleSource
//DTD mule-configuration XML V1.0//EN"
"http://mule.mulesource.org/dtds/mule-
configuration.dtd">
M
D 30
Outline of Move All Files
<mule-configuration>
<model>
<mule-descriptor>
<inbound-router>
<endpoint
address="file:///c:/mule-class/in"/>
</inbound-router>
<outbound-router>
<router>
<endpoint
address="file:///c:/mule-class/out"/>
</router>
</outbound-router>
</mule-descriptor>
</model>
</mule-configuration>
M
D 31
Move All Files – Procedural
Details
<mule-configuration id="Mule_File_Move" version=" 1.0">
<connector name="SystemStreamConnector"
className="org.mule.providers.stream.SystemStreamConnector"
/>
<model name="move-all-files">
<mule-descriptor name="move-file"
implementation="org.mule.components.simple.BridgeComponent"
>
<inbound-router>
<endpoint address="file:///c:/tmp/in"/>
</inbound-router>
<outbound-router>
<router
className="org.mule.routing.outbound.OutboundPassThroughRou
ter">
<endpoint address="file:///c:/tmp/out"/>
</router>
</outbound-router>
</mule-descriptor>
</model>
</mule-configuration>
M
D 32
Only Moving XML Files
<inbound-router>
<endpoint address="file:///c:/mule-class/in">
<filter pattern="*.xml"
className=
"org.mule.providers.file.filters.FilenameWildcardFilter"/>
</endpoint>
</inbound-router>
Add the filter line to only move files with the extension
"*.xml". If you add a file "foobar.txt to the input folder it
will not be moved.
M
D 33
Keeping the Name The Same
<outbound-router>
<router
className="org.mule.routing.outbound.OutboundPassThroughRouter">
<endpoint
address=
"file:///c:/mule-class/out?outputPattern=$[ORIGINALNAME]"
/>
</router>
</outbound-router>
Add the outputPattern parameter to keep the output
name the same as the input.
M
D 34
Happy Path and Exceptions
• By default, error free documents follow a central path known as
the "happy path"
• Documents that have errors may be handled in different ways
(rejected, warnings etc.)
Start StopStep 1 Step 2 Step 3
Stop Stop Stop
M
D 35
Exception Handling
• Mule has a special way of handling non-happy path processing. This
is called an "Exception Strategy" but is it really just and exception
path and there is very little strategy involved.
• There are three places you can associate an exception strategy
– connector
– component
– model (set for all components in a model)
M
D 36
Exception Strategy
<exception-strategy
className=org.mule.impl.DefaultComponentExceptionStrategy">
<endpoint address="file:///c:/mule-class/error"/>
</exception-strategy>
We want all invalid documents to be moved into the
error folder.
M
D 37
Sample XML
<?xml version="1.0" encoding="UTF-8"?>
<Data>
<Element1>Hello World!</Element1>
<Element2>String</Element2>
<Element3>String</Element3>
<DansInvalidDataElement>This is Dans invalid data element</DansInvalidDataElement>
</Data>
XML Schema validation will generate an error message
when it gets to the fourth invalid data element:
Given the following XML Schema file:
M
D 38
Validating against an XML Schema
<outbound-router>
<router className="org.mule.routing.outbound.FilteringXmlMessageSplitter">
<endpoint
address="file:///c:/mule-class/out?outputPattern=$[ORIGINALNAME]"/>
<properties>
<property name="validateSchema" value="true"/>
<property name="externalSchemaLocation"
value="file:///c:/mule-class/labs/07-validate/my-
schema.xsd"/>
</properties>
</router>
</outbound-router>
To validate the XML Schema, just add two properties:
1) tell it to validate the document
2) tell it what file to use and where to find it
M
D 39
Error Message
document : cvc-complex-type.2.4.d: Invalid content was found
starting with element 'DansInvalidDataElement'. No child
element is expected at this point.
This error message is generated on the Mule console
when an invalid data element is found. But what should
we do with it? How do we redirect it to the appropriate
user?
M
D 40
Thank You!

More Related Content

What's hot

Mulesoft corporate template final
Mulesoft corporate template  final Mulesoft corporate template  final
Mulesoft corporate template final Bui Kiet
 
Mulesoft Anypoint platform introduction
Mulesoft Anypoint platform introductionMulesoft Anypoint platform introduction
Mulesoft Anypoint platform introductiongijish
 
Clustering, Server setup and Hybrid deployment setup using Anypoint Runtime M...
Clustering, Server setup and Hybrid deployment setup using Anypoint Runtime M...Clustering, Server setup and Hybrid deployment setup using Anypoint Runtime M...
Clustering, Server setup and Hybrid deployment setup using Anypoint Runtime M...Manish Kumar Yadav
 
Salesforce integration best practices columbus meetup
Salesforce integration best practices   columbus meetupSalesforce integration best practices   columbus meetup
Salesforce integration best practices columbus meetupMuleSoft Meetup
 
MuleSoft Architecture Presentation
MuleSoft Architecture PresentationMuleSoft Architecture Presentation
MuleSoft Architecture PresentationRupesh Sinha
 
MuleSoft Sizing Guidelines - VirtualMuleys
MuleSoft Sizing Guidelines - VirtualMuleysMuleSoft Sizing Guidelines - VirtualMuleys
MuleSoft Sizing Guidelines - VirtualMuleysAngel Alberici
 
MuleSoft for Enterprises
MuleSoft for EnterprisesMuleSoft for Enterprises
MuleSoft for EnterprisesPrashantGolani1
 
MuleSoft Surat Meetup#41 - Universal API Management, Anypoint Flex Gateway an...
MuleSoft Surat Meetup#41 - Universal API Management, Anypoint Flex Gateway an...MuleSoft Surat Meetup#41 - Universal API Management, Anypoint Flex Gateway an...
MuleSoft Surat Meetup#41 - Universal API Management, Anypoint Flex Gateway an...Jitendra Bafna
 
Anypoint Platform for Pivotal Cloud Foundry
Anypoint Platform for Pivotal Cloud FoundryAnypoint Platform for Pivotal Cloud Foundry
Anypoint Platform for Pivotal Cloud FoundryMuleSoft
 
MuleSoft Deployment Strategies (RTF vs Hybrid vs CloudHub)
MuleSoft Deployment Strategies (RTF vs Hybrid vs CloudHub)MuleSoft Deployment Strategies (RTF vs Hybrid vs CloudHub)
MuleSoft Deployment Strategies (RTF vs Hybrid vs CloudHub)Prashanth Kurimella
 
Best Practices for Middleware and Integration Architecture Modernization with...
Best Practices for Middleware and Integration Architecture Modernization with...Best Practices for Middleware and Integration Architecture Modernization with...
Best Practices for Middleware and Integration Architecture Modernization with...Claus Ibsen
 
[Madrid-Meetup April 22] UAPIM.pptx
[Madrid-Meetup April 22] UAPIM.pptx[Madrid-Meetup April 22] UAPIM.pptx
[Madrid-Meetup April 22] UAPIM.pptxjorgelebrato
 
MuleSoft Runtime Fabric (RTF): Foundations : MuleSoft Virtual Muleys Meetups
MuleSoft Runtime Fabric (RTF): Foundations  : MuleSoft Virtual Muleys MeetupsMuleSoft Runtime Fabric (RTF): Foundations  : MuleSoft Virtual Muleys Meetups
MuleSoft Runtime Fabric (RTF): Foundations : MuleSoft Virtual Muleys MeetupsAngel Alberici
 
MuleSoft's Approach to Driving Customer Outcomes
MuleSoft's Approach to Driving Customer Outcomes MuleSoft's Approach to Driving Customer Outcomes
MuleSoft's Approach to Driving Customer Outcomes MuleSoft
 
Mule 4 migration + Common Integration Challenges : MuleSoft Virtual Muleys Me...
Mule 4 migration + Common Integration Challenges : MuleSoft Virtual Muleys Me...Mule 4 migration + Common Integration Challenges : MuleSoft Virtual Muleys Me...
Mule 4 migration + Common Integration Challenges : MuleSoft Virtual Muleys Me...Angel Alberici
 
MuleSoft PKO - C4E and Platform Insights
MuleSoft PKO - C4E and Platform InsightsMuleSoft PKO - C4E and Platform Insights
MuleSoft PKO - C4E and Platform InsightsAngel Alberici
 
MuleSoft Event Driven Architecture (EDA Patterns in MuleSoft) - VirtualMuleys63
MuleSoft Event Driven Architecture (EDA Patterns in MuleSoft) - VirtualMuleys63MuleSoft Event Driven Architecture (EDA Patterns in MuleSoft) - VirtualMuleys63
MuleSoft Event Driven Architecture (EDA Patterns in MuleSoft) - VirtualMuleys63Angel Alberici
 
Rtf v2 ingress muleSoft meetup self managed kubernetes
Rtf v2 ingress muleSoft meetup self managed kubernetesRtf v2 ingress muleSoft meetup self managed kubernetes
Rtf v2 ingress muleSoft meetup self managed kubernetesSandeep Deshmukh
 
MuleSoft Surat Meetup#54 - MuleSoft Automation
MuleSoft Surat Meetup#54 - MuleSoft AutomationMuleSoft Surat Meetup#54 - MuleSoft Automation
MuleSoft Surat Meetup#54 - MuleSoft AutomationJitendra Bafna
 
Apache Kafka at LinkedIn
Apache Kafka at LinkedInApache Kafka at LinkedIn
Apache Kafka at LinkedInGuozhang Wang
 

What's hot (20)

Mulesoft corporate template final
Mulesoft corporate template  final Mulesoft corporate template  final
Mulesoft corporate template final
 
Mulesoft Anypoint platform introduction
Mulesoft Anypoint platform introductionMulesoft Anypoint platform introduction
Mulesoft Anypoint platform introduction
 
Clustering, Server setup and Hybrid deployment setup using Anypoint Runtime M...
Clustering, Server setup and Hybrid deployment setup using Anypoint Runtime M...Clustering, Server setup and Hybrid deployment setup using Anypoint Runtime M...
Clustering, Server setup and Hybrid deployment setup using Anypoint Runtime M...
 
Salesforce integration best practices columbus meetup
Salesforce integration best practices   columbus meetupSalesforce integration best practices   columbus meetup
Salesforce integration best practices columbus meetup
 
MuleSoft Architecture Presentation
MuleSoft Architecture PresentationMuleSoft Architecture Presentation
MuleSoft Architecture Presentation
 
MuleSoft Sizing Guidelines - VirtualMuleys
MuleSoft Sizing Guidelines - VirtualMuleysMuleSoft Sizing Guidelines - VirtualMuleys
MuleSoft Sizing Guidelines - VirtualMuleys
 
MuleSoft for Enterprises
MuleSoft for EnterprisesMuleSoft for Enterprises
MuleSoft for Enterprises
 
MuleSoft Surat Meetup#41 - Universal API Management, Anypoint Flex Gateway an...
MuleSoft Surat Meetup#41 - Universal API Management, Anypoint Flex Gateway an...MuleSoft Surat Meetup#41 - Universal API Management, Anypoint Flex Gateway an...
MuleSoft Surat Meetup#41 - Universal API Management, Anypoint Flex Gateway an...
 
Anypoint Platform for Pivotal Cloud Foundry
Anypoint Platform for Pivotal Cloud FoundryAnypoint Platform for Pivotal Cloud Foundry
Anypoint Platform for Pivotal Cloud Foundry
 
MuleSoft Deployment Strategies (RTF vs Hybrid vs CloudHub)
MuleSoft Deployment Strategies (RTF vs Hybrid vs CloudHub)MuleSoft Deployment Strategies (RTF vs Hybrid vs CloudHub)
MuleSoft Deployment Strategies (RTF vs Hybrid vs CloudHub)
 
Best Practices for Middleware and Integration Architecture Modernization with...
Best Practices for Middleware and Integration Architecture Modernization with...Best Practices for Middleware and Integration Architecture Modernization with...
Best Practices for Middleware and Integration Architecture Modernization with...
 
[Madrid-Meetup April 22] UAPIM.pptx
[Madrid-Meetup April 22] UAPIM.pptx[Madrid-Meetup April 22] UAPIM.pptx
[Madrid-Meetup April 22] UAPIM.pptx
 
MuleSoft Runtime Fabric (RTF): Foundations : MuleSoft Virtual Muleys Meetups
MuleSoft Runtime Fabric (RTF): Foundations  : MuleSoft Virtual Muleys MeetupsMuleSoft Runtime Fabric (RTF): Foundations  : MuleSoft Virtual Muleys Meetups
MuleSoft Runtime Fabric (RTF): Foundations : MuleSoft Virtual Muleys Meetups
 
MuleSoft's Approach to Driving Customer Outcomes
MuleSoft's Approach to Driving Customer Outcomes MuleSoft's Approach to Driving Customer Outcomes
MuleSoft's Approach to Driving Customer Outcomes
 
Mule 4 migration + Common Integration Challenges : MuleSoft Virtual Muleys Me...
Mule 4 migration + Common Integration Challenges : MuleSoft Virtual Muleys Me...Mule 4 migration + Common Integration Challenges : MuleSoft Virtual Muleys Me...
Mule 4 migration + Common Integration Challenges : MuleSoft Virtual Muleys Me...
 
MuleSoft PKO - C4E and Platform Insights
MuleSoft PKO - C4E and Platform InsightsMuleSoft PKO - C4E and Platform Insights
MuleSoft PKO - C4E and Platform Insights
 
MuleSoft Event Driven Architecture (EDA Patterns in MuleSoft) - VirtualMuleys63
MuleSoft Event Driven Architecture (EDA Patterns in MuleSoft) - VirtualMuleys63MuleSoft Event Driven Architecture (EDA Patterns in MuleSoft) - VirtualMuleys63
MuleSoft Event Driven Architecture (EDA Patterns in MuleSoft) - VirtualMuleys63
 
Rtf v2 ingress muleSoft meetup self managed kubernetes
Rtf v2 ingress muleSoft meetup self managed kubernetesRtf v2 ingress muleSoft meetup self managed kubernetes
Rtf v2 ingress muleSoft meetup self managed kubernetes
 
MuleSoft Surat Meetup#54 - MuleSoft Automation
MuleSoft Surat Meetup#54 - MuleSoft AutomationMuleSoft Surat Meetup#54 - MuleSoft Automation
MuleSoft Surat Meetup#54 - MuleSoft Automation
 
Apache Kafka at LinkedIn
Apache Kafka at LinkedInApache Kafka at LinkedIn
Apache Kafka at LinkedIn
 

Similar to Mulesoft ppt (20)

Mule esb
Mule esbMule esb
Mule esb
 
Mule overview
Mule overviewMule overview
Mule overview
 
Mule
MuleMule
Mule
 
Mule overview
Mule overviewMule overview
Mule overview
 
Mule enterprise service bus
Mule enterprise service busMule enterprise service bus
Mule enterprise service bus
 
Mule overview
Mule overviewMule overview
Mule overview
 
Mule Overview
Mule OverviewMule Overview
Mule Overview
 
Mule overview
Mule overviewMule overview
Mule overview
 
Overview of Mule
Overview of MuleOverview of Mule
Overview of Mule
 
Mule overview
Mule overviewMule overview
Mule overview
 
Mule overview
Mule overviewMule overview
Mule overview
 
mule-overview.ppt
mule-overview.pptmule-overview.ppt
mule-overview.ppt
 
Mulesoftppt
Mulesoftppt Mulesoftppt
Mulesoftppt
 
Mule overview
Mule overviewMule overview
Mule overview
 
ESB introduction using Mule
ESB introduction using MuleESB introduction using Mule
ESB introduction using Mule
 
Overview of Mule
Overview of MuleOverview of Mule
Overview of Mule
 
Mule overview
Mule overviewMule overview
Mule overview
 
Mule overview-ppt
Mule overview-pptMule overview-ppt
Mule overview-ppt
 
Red Hat Open Day JBoss Fuse
Red Hat Open Day JBoss FuseRed Hat Open Day JBoss Fuse
Red Hat Open Day JBoss Fuse
 
An introduction to Apache Camel
An introduction to Apache CamelAn introduction to Apache Camel
An introduction to Apache Camel
 

More from Achyuta Lakshmi

Anypoint platform for API's glossary
Anypoint platform for API's glossaryAnypoint platform for API's glossary
Anypoint platform for API's glossaryAchyuta Lakshmi
 
The anypoint platform for API's
The anypoint platform for API'sThe anypoint platform for API's
The anypoint platform for API'sAchyuta Lakshmi
 
Mule high availability (ha) cluster
Mule high availability (ha) clusterMule high availability (ha) cluster
Mule high availability (ha) clusterAchyuta Lakshmi
 
Creating a custom connector in mule
Creating a custom connector in muleCreating a custom connector in mule
Creating a custom connector in muleAchyuta Lakshmi
 
Creating a custom connector in mule
Creating a custom connector in muleCreating a custom connector in mule
Creating a custom connector in muleAchyuta Lakshmi
 
Introduction to es bs mule
Introduction to es bs   muleIntroduction to es bs   mule
Introduction to es bs muleAchyuta Lakshmi
 

More from Achyuta Lakshmi (8)

Anypoint platform for API's glossary
Anypoint platform for API's glossaryAnypoint platform for API's glossary
Anypoint platform for API's glossary
 
The anypoint platform for API's
The anypoint platform for API'sThe anypoint platform for API's
The anypoint platform for API's
 
Mule high availability (ha) cluster
Mule high availability (ha) clusterMule high availability (ha) cluster
Mule high availability (ha) cluster
 
Anypoint b2 b
Anypoint b2 bAnypoint b2 b
Anypoint b2 b
 
Mule management console
Mule management consoleMule management console
Mule management console
 
Creating a custom connector in mule
Creating a custom connector in muleCreating a custom connector in mule
Creating a custom connector in mule
 
Creating a custom connector in mule
Creating a custom connector in muleCreating a custom connector in mule
Creating a custom connector in mule
 
Introduction to es bs mule
Introduction to es bs   muleIntroduction to es bs   mule
Introduction to es bs mule
 

Recently uploaded

CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embeddingZilliz
 
Vector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesVector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesZilliz
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Wonjun Hwang
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr LapshynFwdays
 

Recently uploaded (20)

CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embedding
 
Vector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesVector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector Databases
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 

Mulesoft ppt

  • 1. M D 1 The Enterprise Service Bus Introduction using Mule Introduction to Open-Source ESB Authors: Achyuta Laxmi Date: 10/06/2015 Version: DRAFT 0.1
  • 2. M D 2 Agenda • What is Mule? • How do you use Mule? • What are the core Mule concepts? • Learning mule with File endpoints
  • 3. M D 3 Enterprise Service Backbone • Mule is an open-source Enterprise Service Backbone (ESB)
  • 4. M D 4 Mule is Has Advanced Technologies • SEDA – Staged Event-Driven Architecture • Java NIO – Java New Input/Output
  • 5. M D 5 SEDA • SEDA decomposes a complex, event-driven software application into a set of stages connected by queues • This design avoids the high overhead associated with thread-based concurrency models, and decouples event and thread scheduling from application logic • By performing admission control on each event queue, the service can be well-conditioned to load, preventing resources from being overcommitted when demand exceeds service capacity • SEDA employs dynamic control to automatically tune runtime parameters (such as the scheduling parameters of each stage) as well as to manage load, for example, by performing adaptive load shedding • Decomposing services into a set of stages also enables modularity and code reuse, as well as the development of debugging tools for complex event- driven applications
  • 6. M D 6 Java NIO • NIO is a collection of Java programming language APIs that offer advanced features for intensive I/O operations • NIO facilitates an implementations that can directly use the most efficient operations of the underlying platform • NIO includes: – Buffers for data of primitive types – Character set encoders and decoders – A pattern-matching facility based on Perl-style regular expressions (in package java.util.regex) – Channels, a new primitive I/O abstraction – A file interface that supports locks and memory mapping – A multiplexed, non-blocking I/O facility for writing scalable servers
  • 7. M D 7 Mule’s “Moves Things Around” • Folder to folder • Queue to queue • Shared memory to shared memory • Using different types of transports • In a flexible way
  • 8. M D 8 XML Pipeline • An XML pipeline is a series of operation that are performed on one or more XML files • Examples include: – validate – transform – prune (remove nodes) – split (break a single XML file into many files) – merge (join two or more files together)
  • 9. M D 9 CRV Example • Flow of XML document through approval processes Submit CRV Deed Matched CRV SSN Stripped CRV Income Tax Audit County Audit County Approval State Audit State Approval
  • 10. M D 10 Decomposition • Example of XML Operations used on CRV Validate Split Remove SSN Element Store Modify Value Add Element Modify Value Add Element
  • 11. M D 11 Declarative Approach • Focus on specifying "What" not "How" • Empower business analysis to write machine-readable specifications • Hide the "How" behind services with clear interfaces (SOA)
  • 12. M D 12 Core Mule Concepts • Mule Manager • Mule Model • Universal Message Object (UMO) • Endpoints • External Applications
  • 13. M D 13 Universal Message Object (UMO) • A UMO is a type of Java object that can – receive events "from anywhere" – send events • UMO Components are usually your business objects. They are components that execute business logic on an incoming event • UMO are standard JavaBeans (containers) • There is no Mule-specific code in your components • Mule handles all routing and transformation of events to and from your objects based on the configuration of your component
  • 14. M D 14 Transport • A transport or "provider", is a set of objects that add support to Mule to handle a specific kind of transport or protocol • Examples – the "Email Provider" enables Mule to send and receive messages via the SMTP, POP and IMAP protocols
  • 15. M D 15 Connector • A connector is the object that sends and receives messages on behalf of an endpoint. • Connectors are bundled as part of specific transports or providers. • For example, the FileConnector can read and write file system files.
  • 16. M D 16 Router • A router is the object that do something with messages once they have been received by a connector, or prior to being sent out by the connector
  • 17. M D 17 Filter • A filter optionally filters incoming or outgoing messages that are coming into or going out from a connector. • For example, the File Provider comes with a FilenameWildcardFilter that restricts which files are read by the connector based on file name patterns. For example only files with the .xml extension can be routed. • Filters are used in conjunction with Routers.
  • 18. M D 18 Transformer • A transformer optionally changes incoming or outgoing messages in some way • This is usually done to make the message format useable by a downstream function • Examples: – the ByteArrayToString transformer converts byte arrays into String objects.
  • 19. M D 19 Mule Event Flow • The nine stages of a mule event – first 2 – inbound – middle 4 – component – last 2 – outbound Endpoint (Message Receiver) Endpoint (Message Dispatcher) Inbound Router Outbound Router Inbound Transformer Outbound Transformer Interceptor Service Invocation Interceptor Inbound Component Outbound Optional Step
  • 20. M D 20 Message Receiver Endpoint • Some event triggers a message flow – A file being written into a folder – A message arriving on a message queue – A record in a database – Data written to a socket Endpoint (Message Dispatcher) Inbound Router Outbound Router Inbound Transformer Outbound Transformer Interceptor Service Invocation Interceptor Endpoint (Message Receiver)
  • 21. M D 21 Inbound Router • The inbound router is the fist step in a message. Functions typically performed by an inbound router – Filtering – Remove duplicate messages – Matching messages – Aggregation (combining) – Re-sequence data – Forwarding • See also – IdempotentReceiver – CorrolationAggregator – CorrelationResequencer Endpoint (Message Dispatcher) Inbound Router Outbound Router Inbound Transformer Outbound Transformer Interceptor Service Invocation Interceptor Endpoint (Message Receiver)
  • 22. M D 22 Interceptor • Used to intercept message flow into your service component • Used trigger monitor/events or interrupt the flow of the message • Example: an authorization interceptor could ensure that the current request has the correct credentials to invoke the service. Endpoint (Message Dispatcher) Inbound Router Outbound Router Inbound Transformer Outbound Transformer Service Invocation Interceptor Endpoint (Message Receiver) Interceptor
  • 23. M D 23 Inbound Transformer • If the inbound data is not in the correct format for the service it must be transformed at this point Endpoint (Message Receiver) Endpoint (Message Dispatcher) Inbound Router Outbound Router Outbound Transformer Interceptor Service Invocation Interceptor Inbound Transformer
  • 24. M D 24 Service Invocation • The actual service is performed • In mule, this is generally a Java object • Service invocation can also be a "pass through" Endpoint (Message Receiver) Endpoint (Message Dispatcher) Inbound Router Outbound Router Outbound Transformer Interceptor Interceptor Inbound Transformer Service Invocation
  • 25. M D 25 Outbound Router • Dispatching the data to all the relevant endpoints Endpoint (Message Receiver) Endpoint (Message Dispatcher) Inbound Router Outbound Transformer Interceptor Interceptor Inbound Transformer Service Invocation Outbound Router
  • 26. M D 26 Built-in Router Classes Inbound Outbound Response Idempotent Receiver Filtering Outbound Router Response Aggregator Selective Consumer Recipient List Aggregator Multicasting Router Resequencer Chaining Router Forwarding Consumer Message Splitter Filtering List Message Splitter Filtering Xml Message Splitter Exception Based Router
  • 27. M D 27 Outbound Transformer • Any transformations that needs to be done on the message after a service has been performed on the message can be executed before it is put into the endpoint • See Also – EnvelopeInterceptor Endpoint (Message Receiver) Endpoint (Message Dispatcher) Inbound Router Interceptor Interceptor Inbound Transformer Service Invocation Outbound Router Outbound Transformer
  • 29. M D 29 Omitted From Examples for Brevity <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE mule-configuration PUBLIC "-//MuleSource //DTD mule-configuration XML V1.0//EN" "http://mule.mulesource.org/dtds/mule- configuration.dtd">
  • 30. M D 30 Outline of Move All Files <mule-configuration> <model> <mule-descriptor> <inbound-router> <endpoint address="file:///c:/mule-class/in"/> </inbound-router> <outbound-router> <router> <endpoint address="file:///c:/mule-class/out"/> </router> </outbound-router> </mule-descriptor> </model> </mule-configuration>
  • 31. M D 31 Move All Files – Procedural Details <mule-configuration id="Mule_File_Move" version=" 1.0"> <connector name="SystemStreamConnector" className="org.mule.providers.stream.SystemStreamConnector" /> <model name="move-all-files"> <mule-descriptor name="move-file" implementation="org.mule.components.simple.BridgeComponent" > <inbound-router> <endpoint address="file:///c:/tmp/in"/> </inbound-router> <outbound-router> <router className="org.mule.routing.outbound.OutboundPassThroughRou ter"> <endpoint address="file:///c:/tmp/out"/> </router> </outbound-router> </mule-descriptor> </model> </mule-configuration>
  • 32. M D 32 Only Moving XML Files <inbound-router> <endpoint address="file:///c:/mule-class/in"> <filter pattern="*.xml" className= "org.mule.providers.file.filters.FilenameWildcardFilter"/> </endpoint> </inbound-router> Add the filter line to only move files with the extension "*.xml". If you add a file "foobar.txt to the input folder it will not be moved.
  • 33. M D 33 Keeping the Name The Same <outbound-router> <router className="org.mule.routing.outbound.OutboundPassThroughRouter"> <endpoint address= "file:///c:/mule-class/out?outputPattern=$[ORIGINALNAME]" /> </router> </outbound-router> Add the outputPattern parameter to keep the output name the same as the input.
  • 34. M D 34 Happy Path and Exceptions • By default, error free documents follow a central path known as the "happy path" • Documents that have errors may be handled in different ways (rejected, warnings etc.) Start StopStep 1 Step 2 Step 3 Stop Stop Stop
  • 35. M D 35 Exception Handling • Mule has a special way of handling non-happy path processing. This is called an "Exception Strategy" but is it really just and exception path and there is very little strategy involved. • There are three places you can associate an exception strategy – connector – component – model (set for all components in a model)
  • 36. M D 36 Exception Strategy <exception-strategy className=org.mule.impl.DefaultComponentExceptionStrategy"> <endpoint address="file:///c:/mule-class/error"/> </exception-strategy> We want all invalid documents to be moved into the error folder.
  • 37. M D 37 Sample XML <?xml version="1.0" encoding="UTF-8"?> <Data> <Element1>Hello World!</Element1> <Element2>String</Element2> <Element3>String</Element3> <DansInvalidDataElement>This is Dans invalid data element</DansInvalidDataElement> </Data> XML Schema validation will generate an error message when it gets to the fourth invalid data element: Given the following XML Schema file:
  • 38. M D 38 Validating against an XML Schema <outbound-router> <router className="org.mule.routing.outbound.FilteringXmlMessageSplitter"> <endpoint address="file:///c:/mule-class/out?outputPattern=$[ORIGINALNAME]"/> <properties> <property name="validateSchema" value="true"/> <property name="externalSchemaLocation" value="file:///c:/mule-class/labs/07-validate/my- schema.xsd"/> </properties> </router> </outbound-router> To validate the XML Schema, just add two properties: 1) tell it to validate the document 2) tell it what file to use and where to find it
  • 39. M D 39 Error Message document : cvc-complex-type.2.4.d: Invalid content was found starting with element 'DansInvalidDataElement'. No child element is expected at this point. This error message is generated on the Mule console when an invalid data element is found. But what should we do with it? How do we redirect it to the appropriate user?