38
Understanding WSO2 ESB Introduc7on to ESB Architecture and Message Flow Shafreen Anfar So#ware Engineer Buddhima Wijeeweera So#ware Engineer

Introduction to ESB Architecture and Message Flow

  • Upload
    wso2

  • View
    1.380

  • Download
    2

Embed Size (px)

Citation preview

Page 1: Introduction to ESB Architecture and Message Flow

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

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

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

4  

What  WSO2  delivers  

Page 5: Introduction to ESB Architecture and Message Flow

Agenda  

๏ Background  of  ESB  ๏ WSO2  ESB  ๏  ESB  FuncSonal  Components  ๏ Message  Flows  ๏ Architecture  

5  

Page 6: Introduction to ESB Architecture and Message Flow

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

If  We  are  Not  Careful…  

Page 8: Introduction to ESB Architecture and Message Flow

Why  ESB?    SpagheB  Integra7on  Dilemma  

•   How  about  ?  – maintainability,  scalability,  troubleshooSng  and  governance  etc.  

Background  

Page 9: Introduction to ESB Architecture and Message Flow

ESB  in  AcSon  

Page 10: Introduction to ESB Architecture and Message Flow

Why  ESB?    – ESB  –  The  standard  infrastructure  to  implement  the  SOA  

Background  

Page 11: Introduction to ESB Architecture and Message Flow

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

•   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

Key  Features:  Rou7ng  

Page 14: Introduction to ESB Architecture and Message Flow

Key  Features:  Filtering  

Page 15: Introduction to ESB Architecture and Message Flow

Key  Features:  Transforma7on  

Page 16: Introduction to ESB Architecture and Message Flow

Key  Features:  Protocol  Switching  

Page 17: Introduction to ESB Architecture and Message Flow

Key  Features:  Load  Balancing  

Page 18: Introduction to ESB Architecture and Message Flow

Key  Features:  QOS  

Page 19: Introduction to ESB Architecture and Message Flow

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

Building  Blocks  

20  

Client   Service  

Endpoints  

Mediators  

Sequences  

Transports  

Page 21: Introduction to ESB Architecture and Message Flow

1.  The  most  basic  message  flow  

Page 22: Introduction to ESB Architecture and Message Flow

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

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

 <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

2.  Calling  mulSple  services  

Page 26: Introduction to ESB Architecture and Message Flow

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

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

3.  Store  &  Forward  

Page 29: Introduction to ESB Architecture and Message Flow

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

4.  Task  

Page 31: Introduction to ESB Architecture and Message Flow

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

Architecture  

Request  

Response  

Page 33: Introduction to ESB Architecture and Message Flow

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

Thank  You!  

Page 35: Introduction to ESB Architecture and Message Flow

Q  &  A  

Page 36: Introduction to ESB Architecture and Message Flow

36  

Business  Model  

Page 37: Introduction to ESB Architecture and Message Flow

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

Contact  us  !