16
1 By Vamsi Krishna M

Mule esb intoduction

Embed Size (px)

Citation preview

1

By Vamsi Krishna M

What is Mule?How do you use Mule?What are the core Mule concepts?Learning mule with File endpoints

2

Mule is an open-source Enterprise Service Backbone (ESB)

3

SEDA Staged Event-Driven Architecture

Java NIO Java New Input/output

4

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

5

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

6

Folder to folderQueue to queueShared memory to shared memoryUsing different types of transportsIn a flexible way

7

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)

8

Flow of XML document through approval processes

9

SubmitCRV

DeedMatched

CRV

SSNStripped

CRV

IncomeTax

Audit

CountyAudit

CountyApproval

StateAudit

StateApproval

Example of XML Operations used on CRV

10

Validate Split

RemoveSSN

Element

Store

ModifyValue

AddElement

ModifyValue

AddElement

Focus on specifying "What" not "How"Empower business analysis to write machine-readable specificationsHide the "How" behind services with clear interfaces (SOA)

11

Mule ManagerMule ModelUniversal Message Object (UMO)EndpointsExternal Applications

12

<?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>

13

XML Schema validation will generate an error message when it gets to the fourth invalid data element:

Given the following XML Schema file:

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

14

To validate the XML Schema, just add two properties:1) tell it to validate the document2) tell it what file to use and where to find it

document : cvc-complex-type.2.4.d: Invalid content was found starting with element 'DansInvalidDataElement'. No child element is expected at this point.

15

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?

16