![Page 1: Introduction to ESB Architecture and Message Flow](https://reader034.vdocument.in/reader034/viewer/2022052619/555c3b31d8b42a2c068b499e/html5/thumbnails/1.jpg)
Understanding WSO2 ESB -‐ Introduc7on to ESB Architecture and
Message Flow
Shafreen Anfar So#ware Engineer
Buddhima Wijeeweera So#ware Engineer
![Page 2: Introduction to ESB Architecture and Message Flow](https://reader034.vdocument.in/reader034/viewer/2022052619/555c3b31d8b42a2c068b499e/html5/thumbnails/2.jpg)
2
About the Presenter(s)
๏ Mohamed Shafreen, Sotware Engineer from ESB team, [email protected].
๏ Buddhima Wijeweera Sotware Engineer from ESB team, [email protected].
![Page 3: Introduction to ESB Architecture and Message Flow](https://reader034.vdocument.in/reader034/viewer/2022052619/555c3b31d8b42a2c068b499e/html5/thumbnails/3.jpg)
3
About WSO2 ๏ Global enterprise, founded in 2005 by
acknowledged leaders in XML, web services technologies, standards and open source
๏ Provides only open source plaMorm-‐as-‐a-‐service for private, public and hybrid cloud deployments
๏ All WSO2 products are 100% open source and released under the Apache License Version 2.0.
๏ Is an AcSve Member of OASIS, Cloud Security Alliance, OSGi Alliance, AMQP Working Group, OpenID FoundaSon and W3C.
๏ Driven by InnovaSon
๏ Launched first open source API Management soluSon in 2012
๏ Launched App Factory in 2Q 2013
๏ Launched Enterprise Store and first open source Mobile soluSon in 4Q 2013
![Page 4: Introduction to ESB Architecture and Message Flow](https://reader034.vdocument.in/reader034/viewer/2022052619/555c3b31d8b42a2c068b499e/html5/thumbnails/4.jpg)
4
What WSO2 delivers
![Page 5: Introduction to ESB Architecture and Message Flow](https://reader034.vdocument.in/reader034/viewer/2022052619/555c3b31d8b42a2c068b499e/html5/thumbnails/5.jpg)
Agenda
๏ Background of ESB ๏ WSO2 ESB ๏ ESB FuncSonal Components ๏ Message Flows ๏ Architecture
5
![Page 6: Introduction to ESB Architecture and Message Flow](https://reader034.vdocument.in/reader034/viewer/2022052619/555c3b31d8b42a2c068b499e/html5/thumbnails/6.jpg)
Why ESB? – Modern Enterprises
• Comprised of so many Systems and Services • Built based on open standards, custom-‐built, acquired from a third party, part of a legacy system or any such combinaSon
– Integra7on
• OrganizaSons move away from monolithic systems • MulSple Systems connected via SOA as the blue print
λ Source : h^p://bonfirehealth.com/week-‐13-‐insights-‐spark-‐integraSon/
Background
![Page 7: Introduction to ESB Architecture and Message Flow](https://reader034.vdocument.in/reader034/viewer/2022052619/555c3b31d8b42a2c068b499e/html5/thumbnails/7.jpg)
If We are Not Careful…
![Page 8: Introduction to ESB Architecture and Message Flow](https://reader034.vdocument.in/reader034/viewer/2022052619/555c3b31d8b42a2c068b499e/html5/thumbnails/8.jpg)
Why ESB? SpagheB Integra7on Dilemma
• How about ? – maintainability, scalability, troubleshooSng and governance etc.
Background
![Page 9: Introduction to ESB Architecture and Message Flow](https://reader034.vdocument.in/reader034/viewer/2022052619/555c3b31d8b42a2c068b499e/html5/thumbnails/9.jpg)
ESB in AcSon
![Page 10: Introduction to ESB Architecture and Message Flow](https://reader034.vdocument.in/reader034/viewer/2022052619/555c3b31d8b42a2c068b499e/html5/thumbnails/10.jpg)
Why ESB? – ESB – The standard infrastructure to implement the SOA
Background
![Page 11: Introduction to ESB Architecture and Message Flow](https://reader034.vdocument.in/reader034/viewer/2022052619/555c3b31d8b42a2c068b499e/html5/thumbnails/11.jpg)
Enterprise Service Bus (ESB) • An ESB is a middleware soluSon that enables interoperability
among heterogeneous environments using a service-‐oriented model.
• Stateless and Seamless IntegraSon • Standard Protocols – SOAP, REST, JSON etc. • Transports – HTTP/S, JMS, TCP, VFS etc.
λ Source : h^p://graegert.com/programming/no-‐soa-‐criScism-‐somewhere
Background
![Page 12: Introduction to ESB Architecture and Message Flow](https://reader034.vdocument.in/reader034/viewer/2022052619/555c3b31d8b42a2c068b499e/html5/thumbnails/12.jpg)
• A lightweight, high performance ESB
• Feature rich and standards compliant – SOAP and WS-‐* standards – REST support – Domain specific protocol support (eg: FIX, HL7)
• User friendly and highly extensible • 100% free and open source with commercial support
WSO2 ESB
![Page 13: Introduction to ESB Architecture and Message Flow](https://reader034.vdocument.in/reader034/viewer/2022052619/555c3b31d8b42a2c068b499e/html5/thumbnails/13.jpg)
Key Features: Rou7ng
![Page 14: Introduction to ESB Architecture and Message Flow](https://reader034.vdocument.in/reader034/viewer/2022052619/555c3b31d8b42a2c068b499e/html5/thumbnails/14.jpg)
Key Features: Filtering
![Page 15: Introduction to ESB Architecture and Message Flow](https://reader034.vdocument.in/reader034/viewer/2022052619/555c3b31d8b42a2c068b499e/html5/thumbnails/15.jpg)
Key Features: Transforma7on
![Page 16: Introduction to ESB Architecture and Message Flow](https://reader034.vdocument.in/reader034/viewer/2022052619/555c3b31d8b42a2c068b499e/html5/thumbnails/16.jpg)
Key Features: Protocol Switching
![Page 17: Introduction to ESB Architecture and Message Flow](https://reader034.vdocument.in/reader034/viewer/2022052619/555c3b31d8b42a2c068b499e/html5/thumbnails/17.jpg)
Key Features: Load Balancing
![Page 18: Introduction to ESB Architecture and Message Flow](https://reader034.vdocument.in/reader034/viewer/2022052619/555c3b31d8b42a2c068b499e/html5/thumbnails/18.jpg)
Key Features: QOS
![Page 19: Introduction to ESB Architecture and Message Flow](https://reader034.vdocument.in/reader034/viewer/2022052619/555c3b31d8b42a2c068b499e/html5/thumbnails/19.jpg)
ESB FuncSonal Components • Mediators • Sequences • Endpoints • Proxy Services • REST API • Message Stores & Processors • Templates • Tasks • Local Entries • Priority Executors • Registry
![Page 20: Introduction to ESB Architecture and Message Flow](https://reader034.vdocument.in/reader034/viewer/2022052619/555c3b31d8b42a2c068b499e/html5/thumbnails/20.jpg)
Building Blocks
20
Client Service
Endpoints
Mediators
Sequences
Transports
![Page 21: Introduction to ESB Architecture and Message Flow](https://reader034.vdocument.in/reader034/viewer/2022052619/555c3b31d8b42a2c068b499e/html5/thumbnails/21.jpg)
1. The most basic message flow
![Page 22: Introduction to ESB Architecture and Message Flow](https://reader034.vdocument.in/reader034/viewer/2022052619/555c3b31d8b42a2c068b499e/html5/thumbnails/22.jpg)
Invoking Messages Flows
22
Service
Messages can be injected into sequences through the following interfaces: o Proxy Services o Main Sequence o APIs (h^p services) o Tasks
![Page 23: Introduction to ESB Architecture and Message Flow](https://reader034.vdocument.in/reader034/viewer/2022052619/555c3b31d8b42a2c068b499e/html5/thumbnails/23.jpg)
Entry Points : Proxy Services
High-level Message Flow (Programming Model)
23
Client Service
In Sequence
Out Sequence
Fault Seq.
1 2 3
6 5 4
!
![Page 24: Introduction to ESB Architecture and Message Flow](https://reader034.vdocument.in/reader034/viewer/2022052619/555c3b31d8b42a2c068b499e/html5/thumbnails/24.jpg)
<proxy name="StockQuoteProxy" > <target> <inSequence>
… <send> <endpoint key=“BankService” </send>
</inSequence>
<outSequence> <send/>
</outSequence> <faultSequence>
… </faultSequence> </target> </proxy>
Entry Points : Proxy services
![Page 25: Introduction to ESB Architecture and Message Flow](https://reader034.vdocument.in/reader034/viewer/2022052619/555c3b31d8b42a2c068b499e/html5/thumbnails/25.jpg)
2. Calling mulSple services
![Page 26: Introduction to ESB Architecture and Message Flow](https://reader034.vdocument.in/reader034/viewer/2022052619/555c3b31d8b42a2c068b499e/html5/thumbnails/26.jpg)
Invoking Service_01
Invoking Service_02
Syntax 1 (Send Mediator): <proxy name="StockQuoteProxy" > <target> <inSequence> <log/> <send receive=“NextSeq"> <endpoint key="Service_01"/> </send> </inSequence> </target> </proxy> <sequence name=“NextSeq"> <send receive=“RespondSeq"> <endpoint key="Service_02"/> </send> </sequence> <sequence name="RespondSeq"> <respond/> </sequence>
* Note: this is just the syntax
![Page 27: Introduction to ESB Architecture and Message Flow](https://reader034.vdocument.in/reader034/viewer/2022052619/555c3b31d8b42a2c068b499e/html5/thumbnails/27.jpg)
Syntax 2 (Call Mediator):
<proxy name="StockQuoteProxy" > <target> <inSequence> <call> <endpoint key="Service_01"/> </call>
<!-‐ -‐ Mediate Message -‐ -‐> <call> <endpoint key=" Service_02"/> </call> <respond/> </inSequence> </target> </proxy>
Invoking Service_01
Invoking Service_02
* Note: this is just the syntax
![Page 28: Introduction to ESB Architecture and Message Flow](https://reader034.vdocument.in/reader034/viewer/2022052619/555c3b31d8b42a2c068b499e/html5/thumbnails/28.jpg)
3. Store & Forward
![Page 29: Introduction to ESB Architecture and Message Flow](https://reader034.vdocument.in/reader034/viewer/2022052619/555c3b31d8b42a2c068b499e/html5/thumbnails/29.jpg)
Syntax:
Storing Messages
Message Store
Message Processor
<proxy name="StockQuoteProxy" > <target> <inSequence> <property name="FORCE_SC_ACCEPTED" value="true" scope="axis2"/> <property name="OUT_ONLY" value="true"/> <property name="target.endpoint" value="Service"/> <store messageStore=“ My_Store "/> </inSequence> </target> </proxy> <messageStore name=" My_Store "/> <messageProcessor name=“Forwarding_Processor" messageStore=" My_Store "> <parameter name="interval">20000</parameter> </messageProcessor>
* Note: this is just the syntax
![Page 30: Introduction to ESB Architecture and Message Flow](https://reader034.vdocument.in/reader034/viewer/2022052619/555c3b31d8b42a2c068b499e/html5/thumbnails/30.jpg)
4. Task
![Page 31: Introduction to ESB Architecture and Message Flow](https://reader034.vdocument.in/reader034/viewer/2022052619/555c3b31d8b42a2c068b499e/html5/thumbnails/31.jpg)
Syntax:
<task name="CheckPrice"> <property name="to" value="Service"/> <property name="soapAcSon" value="urn:getQuote"/> <property name="message"> <m0:getQuote xmlns:m0="h^p://services.samples/xsd"> <m0:request> <m0:symbol>WSO2</m0:symbol> </m0:request> </m0:getQuote> </property> <trigger interval="5000"/> </task> <in> <send/> </in> <out> <log /> </out>
Message Template Task DefiniSon
* Note: this is just the syntax
![Page 32: Introduction to ESB Architecture and Message Flow](https://reader034.vdocument.in/reader034/viewer/2022052619/555c3b31d8b42a2c068b499e/html5/thumbnails/32.jpg)
Architecture
Request
Response
![Page 33: Introduction to ESB Architecture and Message Flow](https://reader034.vdocument.in/reader034/viewer/2022052619/555c3b31d8b42a2c068b499e/html5/thumbnails/33.jpg)
Architecture
• Transports • HTTP, JMS, Mail, … etc.
• Message Builders & Message Forma^ers • For SOAP, JSON, … etc.
• Quality of Service (QoS) • Security, Thro^ling, Caching, … etc.
![Page 34: Introduction to ESB Architecture and Message Flow](https://reader034.vdocument.in/reader034/viewer/2022052619/555c3b31d8b42a2c068b499e/html5/thumbnails/34.jpg)
Thank You!
![Page 35: Introduction to ESB Architecture and Message Flow](https://reader034.vdocument.in/reader034/viewer/2022052619/555c3b31d8b42a2c068b499e/html5/thumbnails/35.jpg)
Q & A
![Page 36: Introduction to ESB Architecture and Message Flow](https://reader034.vdocument.in/reader034/viewer/2022052619/555c3b31d8b42a2c068b499e/html5/thumbnails/36.jpg)
36
Business Model
![Page 37: Introduction to ESB Architecture and Message Flow](https://reader034.vdocument.in/reader034/viewer/2022052619/555c3b31d8b42a2c068b499e/html5/thumbnails/37.jpg)
37
Call to acSon page
๏ Official website : h^p://wso2.com/products/enterprise-‐service-‐bus/
๏ DocumentaSon : h^ps://docs.wso2.com/display/ESB481/WSO2+Enterprise+Service+Bus+DocumentaSon
![Page 38: Introduction to ESB Architecture and Message Flow](https://reader034.vdocument.in/reader034/viewer/2022052619/555c3b31d8b42a2c068b499e/html5/thumbnails/38.jpg)
Contact us !