Creating APIs with the WSO2 Platform

25
Crea&ng APIs with the WSO2 Pla6orm Sagara Gunathunga Senior Technical Lead WSO2

description

Creating APIs with the WSO2 Platform

Transcript of Creating APIs with the WSO2 Platform

   

Crea&ng  APIs  with  the  WSO2  Pla6orm      

Sagara  Gunathunga            Senior  Technical  Lead  

WSO2              

API    

Sources  –  h;p://ismart-­‐ledtv.blogspot.com/2013/06/Toshiba-­‐42L6200U-­‐42-­‐Inch-­‐1080p-­‐120Hz-­‐3DP-­‐LED-­‐TV-­‐Smart-­‐TV.html    h;p://www.huffingtonpost.com/hillel-­‐fuld/  

Contract  &  ImplementaUon    

Sources  -­‐  h;p://www.fujifilmholdings.com/en/sustainability/acUvityreport/csr/fpd/index.html,    

 Contract  &  ImplementaUon    

Sources  -­‐  h;p://www.fujifilmholdings.com/en/sustainability/acUvityreport/csr/fpd/index.html,    

       API  Contract    

API  ImplementaUon    

Façade  Pa;ern    

Provide  a  unified  interface  to  a  set  of  interfaces  in  a  subsystem.  Facade  defines  a  higher-­‐level  interface  that  makes  the  subsystem  easier  to  use  

API  Façade  pa;ern    

Facade  

MediaUon  

Backend  Services  

 API  Façade    

AuthenUcaUon  

• Basic  Auth  • OAuth  • SAML  • NTLM  • Social  login  

AuthorizaUon  

• OAuth    Scope  • XACML  

SLA  

• Thro;ling  • Scaling  • Billing      

AnalyUc  

• RealUme  events  • Business  Intelligence  

• Reports  

Management    

• Publishing    • SubscripUon  management  

• Token  management          

Discovery  

• Search  • DocumentaUon    • Swagger    • Samples    • Forum  

MediaUon    

QoS  

• Basic  Auth,  OAuth  • WS-­‐Security  • WS-­‐RM  • Store  and  Forward    

Connectors    

• SalesForce  • Gdoc,  Gmail  • Twi;er    • ………….  

Tasks  

• Inbuilt  • Custom    

TransformaUons  

• XSLT  • XQuery  • Smokes  • XPath  

Content  Switching  

• SOAP  1.1/1.2  • JSON  • XML  • Text  • CVS          

Transport  switching  

• HTTP/S  • JMS  • AMQP  • MQTT  • SMTP  

MediaUon    

•  It  is  possible  to  combine  façade  and  mediaUon  layers  into  a  single  layer  to  reduce  latency  and  maintenance  overhead  but  generally  it  is  recommended  to  keep  these  two  layers  separately      

•  When  WSO2  Business  Process  Server  used  in  mediaUon  layer  it  actually  perform    “Service  OrchestraUon”    

•  If  the  backend  service  is  API-­‐friendly  then  it  is  possible  to  omit  this  layer  so  that  API  façade  directly  call  backend  services  but  this  is  depends  on  business  level  requirements  as  well      

API  Façade  pa;ern  &  WSO2  plajorm    

Facade   MediaUon   Backend  service  

WSO2  ESB  •  High  performance  ESB  based  on  Apache  Synapse    

•  Provides  message  and  service  mediaUon    

•  Facilitate  to  expose  exisUng  legacy  system  as  APIs    

•  API  implementaUons  can  be  •  A  REST  API  •  A  Proxy  Service    

API  creaUon  with  WSO2  ESB  

                       API                    MediaUon                          Backend  service      

Backend  service    

API    

API    

Proxy  

API    

SOAP  XML  TEXT  CVS  Binary  FIX  SAP  EJB  VFS  

Pass-­‐through  

JMS  AMQP  MQTT  

API  Gateway   MediaUon  

WSO2  ApplicaUon  Server  

•  Lightweight  applicaUon  server  based  on  Apache  Tomcat    

•  API  implementaUons  can  be  •  JAX-­‐RS  service  •  JAX-­‐WS  Service    •  Jaggery    REST  service    •  Axis2  REST  or  SOAP  service  

•  Can  be  also  used  to  host  back  end  service.    •  Binary  services  based  on  Protocol  Buffer      

API  creaUon  with  WSO2  AS  

                       API                                                            Services  on  AS      

API    

API    API  

Gateway  

JAX-­‐RS  

JAX-­‐WS  

Jaggery  

Axis2  

Pass-­‐through  

API  creaUon  with  WSO2  AS  

                       API                            MediaUon                          service  on  AS      

API    

API    

Proxy  

API    API  

Gateway   MediaUon  

JAX-­‐WS  

Axis2  

Binary    Binary  (TCP)  

HTTP/JMS  HTTP/S  

HTTP/S  

WSO2  Data  Services  Server  •  Encapsulate data access logic and expose as standard services

–  RESTfull data services –  SOAP 1.1/1.2 based services

•  Support for service management & QoS features –  Security , Transactions Throttling, Caching ,Data

Federation

•  In-built data sources and ability to create your own –  RDBMS – MySQL, Oracle, DB2, MS-SQLServer, Postgresql –  NoSQL - Cassandra, MongoDb –  Google spread sheet, Excel , CSV

API  creaUon  with  WSO2  DSS  

                       API                                                            Data  Services        

API    

API    API  

Gateway  

REST  

SOAP  

Pass-­‐through  

WSO2  Business  Process  Server  

•  Expose  business  process  wri;en  in  BPEL  as  services  and  execute  them  

•  Based  on  Apache  ODE  engine  

•   Support  for  WS-­‐BPEL  2.0,  BPEL4WS  1.1  ,  BPMN  

•   Full  persistent  support  for  long-­‐running  processes    

API  creaUon  with  WSO2  BPS  

         API                      OrchestraUon                    Backend  service      

Backend  service    

API     Business  Process  

API  Gateway   OrchestraUon    

Service  

WSO2  Business  Rule  Server  

•  Business  rules  are  exposed  as  services  

•  Default  rules  engine  is  Drools  but  possible  to  plug-­‐in  any  engine  supported  for  JSR-­‐94    

•  Basic  rule  support  also  available  in  WSO2  ESB  as  a  mediator  

API  creaUon  with  WSO2  BRS  

                       API                                                            Rule  Services        

API    

API    API  

Gateway  

REST  

SOAP  

Pass-­‐through  

API  Everywhere    The  idea  is  to  embed  API  Gateway  capabiliUes  into  carbon  based  products  to  provide  API  management  capabiliUes  without  another  network  hop.    •  For  small  deployments  API  Store  ,  API  Publisher  and  Key  Manger  can  

also  embedded  into  same  carbon  instance      

•  Reduce  latency    

•  Reduce  cost  for  small  or  medium  scale  deployments  

•  Not  a  replacement  for  distributed  API-­‐Manager  deployments.    

API  Everywhere    -­‐AS    

API  Everywhere    -­‐AS    

Thank  You