Transcript
Page 1: Introduction to WSO2 ESB
Page 2: Introduction to WSO2 ESB
Page 3: Introduction to WSO2 ESB

Page 4: Introduction to WSO2 ESB
Page 5: Introduction to WSO2 ESB

Page 6: Introduction to WSO2 ESB

Page 7: Introduction to WSO2 ESB

๏๏

Page 8: Introduction to WSO2 ESB

Page 9: Introduction to WSO2 ESB

Page 10: Introduction to WSO2 ESB

Page 11: Introduction to WSO2 ESB

Page 12: Introduction to WSO2 ESB

Page 13: Introduction to WSO2 ESB
Page 14: Introduction to WSO2 ESB
Page 15: Introduction to WSO2 ESB
Page 16: Introduction to WSO2 ESB
Page 17: Introduction to WSO2 ESB
Page 18: Introduction to WSO2 ESB
Page 19: Introduction to WSO2 ESB
Page 20: Introduction to WSO2 ESB
Page 21: Introduction to WSO2 ESB
Page 22: Introduction to WSO2 ESB
Page 23: Introduction to WSO2 ESB
Page 24: Introduction to WSO2 ESB
Page 25: Introduction to WSO2 ESB

Page 26: Introduction to WSO2 ESB

• The simplest functional component available in WSO2 ESB

• A black box which accepts a message and carries out a predefined task on it

• WSO2 ESB comes with a rich library of built-in mediators–Log mediator : Logs the message–Send mediator: Sends the message to a URL–XSLT mediator : Performs an XSLT transformation on the message

Configuration Data

Input Message Output Message

Page 27: Introduction to WSO2 ESB

• Transforming messages–eg: XSLT mediator, Payload factory mediator

• Manipulating message headers and properties–eg: Header mediator, Property mediator

• Replicating, splitting and aggregating messages–eg: Clone mediator, Aggregate mediator

• Filtering messages–eg: Filter mediator, Switch mediator

• Custom Mediation–Eg: Class mediator, Script mediator

• And lot more…–http://docs.wso2.org/display/ESB481/Mediators - complete list

Page 28: Introduction to WSO2 ESB

• A sequential arrangement of mediators – A mediator chain!

• When a message is handed to a sequence it is given to the first mediator of the chain - The outcome of that will be handed to the second mediator of the chain and so on…

• The messages are sent through the chain while mediators perform various actions on it along the way

• Pipelining in action!

Page 29: Introduction to WSO2 ESB

● Consider the example sequence shown above− Messages are first logged by the log mediator− The property mediator sets a property on the messages− Then they are sent to a specified endpoint by the send

mediator− It is a simple log-and-forward message flow!

Page 30: Introduction to WSO2 ESB

● Defines an endpoint reference (EPR) to which messages can be sent/forwarded from the ESB

− The send mediator takes an endpoint as an argument

● Various operational constraints can be enforced on an endpoint

− Timeout duration− Message format (REST, POX, SOAP 1.1, SOAP 1.2)

● QoS expectations can be set on an endpoint− Security

Page 31: Introduction to WSO2 ESB

● Main types of endpoints− Address endpoint (A simple URL)− WSDL endpoint (Extracts the EPR from a WSDL)− HTTP endpoint ( To invoke REST services with URL

parameters)− Default endpoint ( Adding QoS and other constraints)− Load balance endpoints (Divides the requests among

several child endpoints)− Fail over endpoints (Detects errors that can occur while

sending the messages and resends them to a backup endpoint)

Page 32: Introduction to WSO2 ESB

● Acts like a virtual service that can receive requests from clients

● Received client requests are processed and routed to a specified endpoint (usually to an actual service – backend service)

● Responses coming back from the backend service are further processed and forwarded to the clients

● Resembles traditional HTTP proxy servers

Page 33: Introduction to WSO2 ESB
Page 34: Introduction to WSO2 ESB

Runtime Architecture

Page 35: Introduction to WSO2 ESB

o If you have a REST front-end client, REST back-end service, or both a REST client and service, you can use a proxy service in the ESB to handle the communication between the front end and back end

o REST Client and SOAP Service

o SOAP Client and REST Service

o REST Client and REST Service

o JMS Client and REST Service

o https://docs.wso2.org/display/ESB481/Using+REST+with+a+Proxy+Service

*

Page 36: Introduction to WSO2 ESB

o API anchored at URL contexto e.g., GET /test

o Resourceso Component of API accessed through HTTP call

o Similar to proxy service (in, out, and fault sequences) but more limited

o Can restrict resource’s scope using URL patterns and URI templates

*

Page 37: Introduction to WSO2 ESB

*

Page 38: Introduction to WSO2 ESB

o URL mappingoPath mappings (eg: /test/*, /foo/bar/*)oExtension mappings (eg: *.jsp, *.do)oExact mappings (eg: /test, /test/foo)

o URI templateo/order/{orderId} would process /order/A0001o/dictionary/{char}/{word} would process/dictionary/c/cat

o Use get-property to retrieve exact values

<log level="custom"> <property name="Character" expression="get-property('uri.var.char')"/> <property name="Word" expression="get-property('uri.var.word')"/></log>

*

Page 39: Introduction to WSO2 ESB

Page 40: Introduction to WSO2 ESB

Page 41: Introduction to WSO2 ESB

Page 42: Introduction to WSO2 ESB

Page 43: Introduction to WSO2 ESB

Page 44: Introduction to WSO2 ESB

Page 45: Introduction to WSO2 ESB

Page 46: Introduction to WSO2 ESB

Page 47: Introduction to WSO2 ESB

Page 48: Introduction to WSO2 ESB

Page 49: Introduction to WSO2 ESB

Page 50: Introduction to WSO2 ESB
Page 51: Introduction to WSO2 ESB
Page 53: Introduction to WSO2 ESB

Page 55: Introduction to WSO2 ESB
Page 56: Introduction to WSO2 ESB
Page 58: Introduction to WSO2 ESB
Page 59: Introduction to WSO2 ESB

Top Related