SlideShare uma empresa Scribd logo
1 de 14
API Façade Pattern with
Apache Synapse
Hiranya Jayathilaka
hiranya@apache.org
Apache Synapse
 A lightweight, open source Enterprise Service Bus (ESB)
 Visit http://synapse.apache.org
 Connect and integrate heterogeneous systems
What is an ESB?
Key Features of Synapse
 Message routing
 Message filtering
 Message transformation
 Message enrichment
 Protocol switching
 Load balancing
 Fail-over routing
 QoS enforcement
 Service virtualization
 Traffic throttling
 Task scheduling
Supported Protocol/Standards
 Communication protocols (Transports)
 HTTP/S, E-Mail (POP/IMAP), JMS,AMQP, FIX, FTP and other file
transfer protocols, RawTCP and UDP and more…
 Message formats (Content exchange formats)
 XML, SOAP, JSON, HTML, Plain text, Hessian, HL7,Various
binary formats and more…
 Other
 JDBC/SQL,WSDL and otherWS-* standards, REST, SNMP, JMX
Synapse Messaging Model
 Several types of configurable and composable constructs
 Mediators
 Sequences
 Proxy Services
 APIs
 Endpoints
 Templates
 Message stores and processors
Mediators
 Smallest configurable message processing unit in Synapse
 Synapse ships with a wide range of built-in mediators
Mediator
Input
Message
Output
Message
Config
Sequences
 An ordered list of mediators
 Provides the “message flow” abstraction
Log
Mediator
Header
Mediator
Send
Mediator
APIs/Proxy Services
 Connects a client application to a backend service
 Comprised of several sequences
 In sequence – Processes requests from client
 Out sequence – Processes responses from the service
 Fault sequence – Handles errors
Client
Application
Backend
Service
API/Proxy Service
In Sequence
Out Sequence
Synapse Configuration
 XML-based metalanguage
 Simple and intuitive – Protocol and message format agnostic
programming model
 Supports the familiar constructs of a programming language
 If-Then, Switch-Case,Try-Catch
 Reusable function-like constructs
 Hot deploy and hot update
API Façade Pattern
 Expose a non-RESTful application through a REST API
 Example use cases
 Expose a SOAP service as a RESTful service
 Expose a database as a service
 Expose a legacy system as a service
Demo
RESTClient
SOAP
Service
Synapse/ESB
Questions?
References
 Apache Synapse – http://synapse.apache.org
 WSO2 ESB - http://wso2.com/products/enterprise-service-bus/
 Demo artifacts - https://github.com/hiranya911/rest-gateway-
demo
 Demo documentation - https://rest-gateway-
demo.readthedocs.org/en/latest/
 API façade pattern -
http://asanka.abeysinghe.org/2013/04/pragmatic-approach-to-api-
facade-pattern.html

Mais conteúdo relacionado

Mais procurados

Mais procurados (19)

3.2 Streaming and Messaging
3.2 Streaming and Messaging3.2 Streaming and Messaging
3.2 Streaming and Messaging
 
Anypoint mq queues and exchanges
Anypoint mq queues and exchangesAnypoint mq queues and exchanges
Anypoint mq queues and exchanges
 
What's New in Apache Pulsar 2.9- Pulsar Summit Asia 2021
What's New in Apache Pulsar 2.9- Pulsar Summit Asia 2021What's New in Apache Pulsar 2.9- Pulsar Summit Asia 2021
What's New in Apache Pulsar 2.9- Pulsar Summit Asia 2021
 
Mule esb introduction
Mule esb introductionMule esb introduction
Mule esb introduction
 
Stream-Native Processing with Pulsar Functions
Stream-Native Processing with Pulsar FunctionsStream-Native Processing with Pulsar Functions
Stream-Native Processing with Pulsar Functions
 
Mule concepts components
Mule concepts componentsMule concepts components
Mule concepts components
 
Muletransformers
MuletransformersMuletransformers
Muletransformers
 
Mule ESB Fundamentals
Mule ESB FundamentalsMule ESB Fundamentals
Mule ESB Fundamentals
 
Mule Requester Usage Demo
Mule Requester Usage DemoMule Requester Usage Demo
Mule Requester Usage Demo
 
Building a Messaging Solutions for OVHcloud with Apache Pulsar_Pierre Zemb
Building a Messaging Solutions for OVHcloud with Apache Pulsar_Pierre ZembBuilding a Messaging Solutions for OVHcloud with Apache Pulsar_Pierre Zemb
Building a Messaging Solutions for OVHcloud with Apache Pulsar_Pierre Zemb
 
Spring integration
Spring integrationSpring integration
Spring integration
 
Shipping your logs to elk from mule app/cloudhub part 1
Shipping  your logs to elk from mule app/cloudhub   part 1Shipping  your logs to elk from mule app/cloudhub   part 1
Shipping your logs to elk from mule app/cloudhub part 1
 
Mule and web services
Mule and web servicesMule and web services
Mule and web services
 
Enterprise Integration Patterns
Enterprise Integration PatternsEnterprise Integration Patterns
Enterprise Integration Patterns
 
Using Apache Pulsar as a Modern, Scalable, High Performing JMS Platform - Pus...
Using Apache Pulsar as a Modern, Scalable, High Performing JMS Platform - Pus...Using Apache Pulsar as a Modern, Scalable, High Performing JMS Platform - Pus...
Using Apache Pulsar as a Modern, Scalable, High Performing JMS Platform - Pus...
 
FileCatalyst January 2016 Webinar: TransferAgent is coming to FileCatalyst Wo...
FileCatalyst January 2016 Webinar: TransferAgent is coming to FileCatalyst Wo...FileCatalyst January 2016 Webinar: TransferAgent is coming to FileCatalyst Wo...
FileCatalyst January 2016 Webinar: TransferAgent is coming to FileCatalyst Wo...
 
Server Load Balancing
Server Load BalancingServer Load Balancing
Server Load Balancing
 
Mule TCP Component
Mule TCP ComponentMule TCP Component
Mule TCP Component
 
Mule esb
Mule esbMule esb
Mule esb
 

Semelhante a API Facade Pattern with Apache Synapse

Exploring the WSO2 ESB 4.7
Exploring the WSO2 ESB 4.7 Exploring the WSO2 ESB 4.7
Exploring the WSO2 ESB 4.7
WSO2
 
Intro to web services
Intro to web servicesIntro to web services
Intro to web services
Neil Ghosh
 
Rest vs soap
Rest vs soapRest vs soap
Rest vs soap
Naseers
 
Presentation
PresentationPresentation
Presentation
Videoguy
 

Semelhante a API Facade Pattern with Apache Synapse (20)

LAJUG Napster REST API
LAJUG Napster REST APILAJUG Napster REST API
LAJUG Napster REST API
 
Exploring the WSO2 ESB 4.7
Exploring the WSO2 ESB 4.7 Exploring the WSO2 ESB 4.7
Exploring the WSO2 ESB 4.7
 
jkljklj
jkljkljjkljklj
jkljklj
 
SOAP Services
SOAP ServicesSOAP Services
SOAP Services
 
Web Service
Web ServiceWeb Service
Web Service
 
Service Oriented Development With Windows Communication Foundation 2003
Service Oriented Development With Windows Communication Foundation 2003Service Oriented Development With Windows Communication Foundation 2003
Service Oriented Development With Windows Communication Foundation 2003
 
Rest web service
Rest web serviceRest web service
Rest web service
 
Websphere - overview and introduction
Websphere - overview and introduction Websphere - overview and introduction
Websphere - overview and introduction
 
SOA and web services
SOA and web servicesSOA and web services
SOA and web services
 
Intro to web services
Intro to web servicesIntro to web services
Intro to web services
 
Web API or WCF - An Architectural Comparison
Web API or WCF - An Architectural ComparisonWeb API or WCF - An Architectural Comparison
Web API or WCF - An Architectural Comparison
 
Sending mail,web services
Sending mail,web servicesSending mail,web services
Sending mail,web services
 
Soap and restful webservice
Soap and restful webserviceSoap and restful webservice
Soap and restful webservice
 
Past, Present and Future of APIs of Mobile and Web Apps
Past, Present and Future of APIs of Mobile and Web AppsPast, Present and Future of APIs of Mobile and Web Apps
Past, Present and Future of APIs of Mobile and Web Apps
 
Web service
Web serviceWeb service
Web service
 
Service Oriented Development With Windows Communication Foundation Tulsa Dnug
Service Oriented Development With Windows Communication Foundation   Tulsa DnugService Oriented Development With Windows Communication Foundation   Tulsa Dnug
Service Oriented Development With Windows Communication Foundation Tulsa Dnug
 
Riding with camel
Riding with camelRiding with camel
Riding with camel
 
Web Server-Side Programming Techniques
Web Server-Side Programming TechniquesWeb Server-Side Programming Techniques
Web Server-Side Programming Techniques
 
Rest vs soap
Rest vs soapRest vs soap
Rest vs soap
 
Presentation
PresentationPresentation
Presentation
 

Último

Último (20)

TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 

API Facade Pattern with Apache Synapse

  • 1. API Façade Pattern with Apache Synapse Hiranya Jayathilaka hiranya@apache.org
  • 2. Apache Synapse  A lightweight, open source Enterprise Service Bus (ESB)  Visit http://synapse.apache.org  Connect and integrate heterogeneous systems
  • 3. What is an ESB?
  • 4. Key Features of Synapse  Message routing  Message filtering  Message transformation  Message enrichment  Protocol switching  Load balancing  Fail-over routing  QoS enforcement  Service virtualization  Traffic throttling  Task scheduling
  • 5. Supported Protocol/Standards  Communication protocols (Transports)  HTTP/S, E-Mail (POP/IMAP), JMS,AMQP, FIX, FTP and other file transfer protocols, RawTCP and UDP and more…  Message formats (Content exchange formats)  XML, SOAP, JSON, HTML, Plain text, Hessian, HL7,Various binary formats and more…  Other  JDBC/SQL,WSDL and otherWS-* standards, REST, SNMP, JMX
  • 6. Synapse Messaging Model  Several types of configurable and composable constructs  Mediators  Sequences  Proxy Services  APIs  Endpoints  Templates  Message stores and processors
  • 7. Mediators  Smallest configurable message processing unit in Synapse  Synapse ships with a wide range of built-in mediators Mediator Input Message Output Message Config
  • 8. Sequences  An ordered list of mediators  Provides the “message flow” abstraction Log Mediator Header Mediator Send Mediator
  • 9. APIs/Proxy Services  Connects a client application to a backend service  Comprised of several sequences  In sequence – Processes requests from client  Out sequence – Processes responses from the service  Fault sequence – Handles errors Client Application Backend Service API/Proxy Service In Sequence Out Sequence
  • 10. Synapse Configuration  XML-based metalanguage  Simple and intuitive – Protocol and message format agnostic programming model  Supports the familiar constructs of a programming language  If-Then, Switch-Case,Try-Catch  Reusable function-like constructs  Hot deploy and hot update
  • 11. API Façade Pattern  Expose a non-RESTful application through a REST API  Example use cases  Expose a SOAP service as a RESTful service  Expose a database as a service  Expose a legacy system as a service
  • 14. References  Apache Synapse – http://synapse.apache.org  WSO2 ESB - http://wso2.com/products/enterprise-service-bus/  Demo artifacts - https://github.com/hiranya911/rest-gateway- demo  Demo documentation - https://rest-gateway- demo.readthedocs.org/en/latest/  API façade pattern - http://asanka.abeysinghe.org/2013/04/pragmatic-approach-to-api- facade-pattern.html