SlideShare a Scribd company logo
1 of 21
Download to read offline
Leveraging Asynchronous APIs to deliver
cross domain agile collaboration
September 2021
Nuwan Dias
Hello!
Nuwan Dias
VP and deputy CTO - WSO2
@nuwandias
Co-Author of Microservices Security in Action
● Synchronous vs Asynchronous APIs.
● Asynchronous API usages and applications.
● The AsyncAPI spec.
● Challenges faced by users of Asynchronous APIs.
● Management of Asynchronous APIs.
3
Agenda
4
Synchronous Communication
5
REST APIs
Client Server
Request
Response
● View your account balance.
● Transfer money from your account using your mobile app.
● Place an order through an e-commerce application.
● Web search.
● Upload your picture to social media.
“Synchronous APIs are great for getting things done on demand, not but so much
for reacting to events as they happen.”
6
Usages of synchronous APIs
● An alternative to synchronous communication to get data in near real time.
● Results in excessive processing for both client and server.
● <5% actual updates.
● Results in a poor user experience.
● Workarounds such as E-tags only solves part of the problem.
7
Polling
Client Server
Any update?
No
Any update?
Yes
● Provides a mechanism of being notified upon events.
● No polling required.
● Subscriber requires a method of being called.
● Enables limitless collaboration across systems.
8
Asynchronous Communication
Client
(Subscriber)
Server
(Publisher)
Subscribe to events with a callback
endpoint
Notify client through callback endpoint
Event
occurred.
● The broker pattern is a common mechanism of implementing asynchronous
communication.
● No client-server communication.
● Decouples the subscriber from the publisher.
● Allows publisher to focus on its business logic.
● Broker takes on responsibility of message delivery.
⦿ Ex: WebSub: Intent verification, partial updates, message redistribution. 9
Asynchronous Communication: Broker Pattern
Subscriber Publisher
Subscribe
Receive events
Event
occurred.
Broker
Publish
● Push Notifications
⦿ Notifications received on your mobile device.
⦿ Real time updates on apps.
● Automation Tasks.
⦿ Business automation tasks.
⦾ Ex: IFTTT, Zapier, Tray.io
⦿ Engineering process automation.
⦾ Ex: Github.
● Systems integration
⦿ Event driven architecture in Microservices.
10
Usages of Asynchronous APIs.
● HTTP Based
⦿ WebSockets: client-server, bidirectional
⦿ WebHooks: server-server, unidirectional
⦿ WebSub: server-servers, unidirectional
⦿ Server Sent Events (SSE): client-server, unidirectional (server push)
⦿ GraphQL subscriptions: client-server, unidirectional
● gRPC: server-server, bidirectional
● Kafka: server-server, bidirectional
● AMQP: server-sever, bidirectional
● MQTT: client-server, bidirectional
11
Technologies being used to implement Asynchronous APIs
● Used to describe Asynchronous
APIs from a client’s perspective.
● A “client” can be either a publisher
or a subscriber.
● Highly influenced by the OpenAPI
specification.
● https://www.asyncapi.com/
● Describes channels, messages and
brokers.
12
The #AsyncAPI Specification
● By Consumers
⦿ Discovery of all triggers in an organization.
⦿ Lack of a uniform subscription experience.
⦾ Caused by lack of adherence to a standard.
⦿ Unsupported protocol supported by Publisher.
● By Providers/Facilitators (not Publishers)
⦿ Securing Asynchronous APIs.
⦿ Rate limiting.
⦿ Ensuring adherence to contract.
⦿ Message processing/enrichment.
⦿ Monitoring and alerting.
⦿ Business insights.
13
Challenges faced when adopting Asynchronous APIs
14
Have a Developer Portal for discovering events used by an
organization
Subscribers
External Event Publishers
Internal Event Publishers
Register
Register
Developer Portal
Discover
● For HTTP based asynchronous APIs a
hub architecture can be used to unify
subscriptions.
● API providers subscribe the hub with
the API.
● API consumers subscribe with the
hub when/if they want to get notified
on events.
● The hub redistributes events to
everyone subscribed on the hub.
15
Using a Hub architecture for unifying subscriptions
Subscriber 1
Subscriber 2
Portal
Hub
Events from the API received
on the Hub
Hub redistributes events to
subscribers
Subscribers discover APIs on
the portal and subscribe at
the hub
● In certain use cases the clients wants
to use a protocol that is not
supported by the API.
● A hub can be used to convert the
protocol to the requested type. This
mostly works with HTTP based
protocols.
● This also allows the client to use an
appropriate security type for the
protocol.
16
Protocol conversion and security
Subscriber Hub
Publisher sends events on a
Kafka topic
Subscriber uses appropriate
security protocol supported
by the hub.
Subscriber receives events
on a WebSocket
Hub does a conversion from
Kafka event to WebSocket
frame
● An API always has a contract/spec.
● Subscribers expect event producers
to send events that adhere to the
contract.
● Subscribers would fail to process
messages that do not conform to the
contract.
● The Hub can be used as an enforcer
of the contract.
17
Ensuring adherence to contract
Subscriber Hub
Different versions of the API
submit events to the hub
Hub only delivers messages
that adhere to the contract
Hub inspects message to check
for conformance
v1.0
v1.1
● Subscribers may not be interested in
receiving all events published by a
producer.
● They may want to know about events
when certain conditions are met.
⦿ When the average temperature goes
beyond 70 degrees.
⦿ When a bid value goes beyond a
limit.
● Hubs may support message
aggregations, summarizations and
processing.
18
Message processing and Enrichment
Subscriber Hub
Notify whenever someone
places a bid on an item.
Notify subscriber only if
condition is met.
Check if bid goes beyond $50.
● Certain event producers may be too
chatty for the liking of the subscriber.
● The could expose these APIs over
rate limit plans that suit the
subscriber.
● These can be used as a way of
monetizing APIs as well.
19
Rate limiting for reducing chattiness and monetization of APIs
Subscriber Hub
Producers sends all events to
the Hub.
Subscriber only receives
events based on the usage
plan.
Hub rate limits based on
subscribers usage plan.
● Provides organizations insights on
Asynchronous APIs.
● Capture protocol specific usage attributes
⦿ Ex: WebSockets: Bandwidth, SSE: #events,
WebHooks: Active Users.
● Detection of abnormalities and usage
patterns.
20
Monitoring & Alerting
wso2.com
Thanks!
Contact: @nuwandias

More Related Content

What's hot

[APIdays Paris 2019] From Microservices to APIs: The API operator in Kubernetes
[APIdays Paris 2019] From Microservices to APIs: The API operator in Kubernetes[APIdays Paris 2019] From Microservices to APIs: The API operator in Kubernetes
[APIdays Paris 2019] From Microservices to APIs: The API operator in KubernetesWSO2
 
Productising your Microservices as API Products
Productising your Microservices  as API ProductsProductising your Microservices  as API Products
Productising your Microservices as API ProductsWSO2
 
Nginx Conference 2016 - Learnings and State of the Industry
Nginx Conference 2016 - Learnings and State of the IndustryNginx Conference 2016 - Learnings and State of the Industry
Nginx Conference 2016 - Learnings and State of the IndustryBenjamin Scholler
 
Building Microservices with gRPC and NATS
Building Microservices with gRPC and NATSBuilding Microservices with gRPC and NATS
Building Microservices with gRPC and NATSShiju Varghese
 
Building Real Time Web Applications with SignalR (NoVA Code Camp 2015)
Building Real Time Web Applications with SignalR (NoVA Code Camp 2015)Building Real Time Web Applications with SignalR (NoVA Code Camp 2015)
Building Real Time Web Applications with SignalR (NoVA Code Camp 2015)Kevin Griffin
 
MuleSoft Surat Virtual Meetup#20 - Unleash the power of Anypoint DataGraph
MuleSoft Surat Virtual Meetup#20 - Unleash the power of Anypoint DataGraphMuleSoft Surat Virtual Meetup#20 - Unleash the power of Anypoint DataGraph
MuleSoft Surat Virtual Meetup#20 - Unleash the power of Anypoint DataGraphJitendra Bafna
 
APIdays Helsinki 2019 - gRPC: Lightning Fast, Self-Documenting APIs with Moha...
APIdays Helsinki 2019 - gRPC: Lightning Fast, Self-Documenting APIs with Moha...APIdays Helsinki 2019 - gRPC: Lightning Fast, Self-Documenting APIs with Moha...
APIdays Helsinki 2019 - gRPC: Lightning Fast, Self-Documenting APIs with Moha...apidays
 
Kuberntes Ingress with Kong
Kuberntes Ingress with KongKuberntes Ingress with Kong
Kuberntes Ingress with KongNebulaworks
 
apidays LIVE Jakarta - Better API DX with a CLI by Phil Nash, Twilio
apidays LIVE Jakarta - Better API DX with a CLI by Phil Nash, Twilioapidays LIVE Jakarta - Better API DX with a CLI by Phil Nash, Twilio
apidays LIVE Jakarta - Better API DX with a CLI by Phil Nash, Twilioapidays
 
Andreas Nauerz and Michael Behrendt - Event Driven and Serverless Programming...
Andreas Nauerz and Michael Behrendt - Event Driven and Serverless Programming...Andreas Nauerz and Michael Behrendt - Event Driven and Serverless Programming...
Andreas Nauerz and Michael Behrendt - Event Driven and Serverless Programming...ServerlessConf
 
Apigee Insights: Data & Context-Driven Actions
Apigee Insights: Data & Context-Driven ActionsApigee Insights: Data & Context-Driven Actions
Apigee Insights: Data & Context-Driven ActionsApigee | Google Cloud
 
Introduction to SharePoint 2013 Apps
Introduction to SharePoint 2013 AppsIntroduction to SharePoint 2013 Apps
Introduction to SharePoint 2013 AppsRyan McIntyre
 
Combining WSO2 API Manager with WSO2 BAM for billing in the energy industry
Combining WSO2 API Manager with WSO2 BAM for billing in the energy industryCombining WSO2 API Manager with WSO2 BAM for billing in the energy industry
Combining WSO2 API Manager with WSO2 BAM for billing in the energy industryWSO2
 
Building Language Agnostic APIs with gRPC - JavaDay Istanbul 2017
Building Language Agnostic APIs with gRPC - JavaDay Istanbul 2017Building Language Agnostic APIs with gRPC - JavaDay Istanbul 2017
Building Language Agnostic APIs with gRPC - JavaDay Istanbul 2017Mustafa AKIN
 
Inter-Process Communication in Microservices using gRPC
Inter-Process Communication in Microservices using gRPCInter-Process Communication in Microservices using gRPC
Inter-Process Communication in Microservices using gRPCShiju Varghese
 
Grokking microservices in 5 minutes
Grokking microservices in 5 minutesGrokking microservices in 5 minutes
Grokking microservices in 5 minutesAndrew Siemer
 
Building High Performance APIs In Go Using gRPC And Protocol Buffers
Building High Performance APIs In Go Using gRPC And Protocol BuffersBuilding High Performance APIs In Go Using gRPC And Protocol Buffers
Building High Performance APIs In Go Using gRPC And Protocol BuffersShiju Varghese
 
Integrate 2019 - Creating a Processing Pipeline with Azure Functions and AIS
Integrate 2019 - Creating a Processing Pipeline with Azure Functions and AISIntegrate 2019 - Creating a Processing Pipeline with Azure Functions and AIS
Integrate 2019 - Creating a Processing Pipeline with Azure Functions and AISWagner Silveira
 

What's hot (20)

[APIdays Paris 2019] From Microservices to APIs: The API operator in Kubernetes
[APIdays Paris 2019] From Microservices to APIs: The API operator in Kubernetes[APIdays Paris 2019] From Microservices to APIs: The API operator in Kubernetes
[APIdays Paris 2019] From Microservices to APIs: The API operator in Kubernetes
 
Real time web with SignalR
Real time web with SignalRReal time web with SignalR
Real time web with SignalR
 
Productising your Microservices as API Products
Productising your Microservices  as API ProductsProductising your Microservices  as API Products
Productising your Microservices as API Products
 
Nginx Conference 2016 - Learnings and State of the Industry
Nginx Conference 2016 - Learnings and State of the IndustryNginx Conference 2016 - Learnings and State of the Industry
Nginx Conference 2016 - Learnings and State of the Industry
 
Building Microservices with gRPC and NATS
Building Microservices with gRPC and NATSBuilding Microservices with gRPC and NATS
Building Microservices with gRPC and NATS
 
02 api gateway
02 api gateway02 api gateway
02 api gateway
 
Building Real Time Web Applications with SignalR (NoVA Code Camp 2015)
Building Real Time Web Applications with SignalR (NoVA Code Camp 2015)Building Real Time Web Applications with SignalR (NoVA Code Camp 2015)
Building Real Time Web Applications with SignalR (NoVA Code Camp 2015)
 
MuleSoft Surat Virtual Meetup#20 - Unleash the power of Anypoint DataGraph
MuleSoft Surat Virtual Meetup#20 - Unleash the power of Anypoint DataGraphMuleSoft Surat Virtual Meetup#20 - Unleash the power of Anypoint DataGraph
MuleSoft Surat Virtual Meetup#20 - Unleash the power of Anypoint DataGraph
 
APIdays Helsinki 2019 - gRPC: Lightning Fast, Self-Documenting APIs with Moha...
APIdays Helsinki 2019 - gRPC: Lightning Fast, Self-Documenting APIs with Moha...APIdays Helsinki 2019 - gRPC: Lightning Fast, Self-Documenting APIs with Moha...
APIdays Helsinki 2019 - gRPC: Lightning Fast, Self-Documenting APIs with Moha...
 
Kuberntes Ingress with Kong
Kuberntes Ingress with KongKuberntes Ingress with Kong
Kuberntes Ingress with Kong
 
apidays LIVE Jakarta - Better API DX with a CLI by Phil Nash, Twilio
apidays LIVE Jakarta - Better API DX with a CLI by Phil Nash, Twilioapidays LIVE Jakarta - Better API DX with a CLI by Phil Nash, Twilio
apidays LIVE Jakarta - Better API DX with a CLI by Phil Nash, Twilio
 
Andreas Nauerz and Michael Behrendt - Event Driven and Serverless Programming...
Andreas Nauerz and Michael Behrendt - Event Driven and Serverless Programming...Andreas Nauerz and Michael Behrendt - Event Driven and Serverless Programming...
Andreas Nauerz and Michael Behrendt - Event Driven and Serverless Programming...
 
Apigee Insights: Data & Context-Driven Actions
Apigee Insights: Data & Context-Driven ActionsApigee Insights: Data & Context-Driven Actions
Apigee Insights: Data & Context-Driven Actions
 
Introduction to SharePoint 2013 Apps
Introduction to SharePoint 2013 AppsIntroduction to SharePoint 2013 Apps
Introduction to SharePoint 2013 Apps
 
Combining WSO2 API Manager with WSO2 BAM for billing in the energy industry
Combining WSO2 API Manager with WSO2 BAM for billing in the energy industryCombining WSO2 API Manager with WSO2 BAM for billing in the energy industry
Combining WSO2 API Manager with WSO2 BAM for billing in the energy industry
 
Building Language Agnostic APIs with gRPC - JavaDay Istanbul 2017
Building Language Agnostic APIs with gRPC - JavaDay Istanbul 2017Building Language Agnostic APIs with gRPC - JavaDay Istanbul 2017
Building Language Agnostic APIs with gRPC - JavaDay Istanbul 2017
 
Inter-Process Communication in Microservices using gRPC
Inter-Process Communication in Microservices using gRPCInter-Process Communication in Microservices using gRPC
Inter-Process Communication in Microservices using gRPC
 
Grokking microservices in 5 minutes
Grokking microservices in 5 minutesGrokking microservices in 5 minutes
Grokking microservices in 5 minutes
 
Building High Performance APIs In Go Using gRPC And Protocol Buffers
Building High Performance APIs In Go Using gRPC And Protocol BuffersBuilding High Performance APIs In Go Using gRPC And Protocol Buffers
Building High Performance APIs In Go Using gRPC And Protocol Buffers
 
Integrate 2019 - Creating a Processing Pipeline with Azure Functions and AIS
Integrate 2019 - Creating a Processing Pipeline with Azure Functions and AISIntegrate 2019 - Creating a Processing Pipeline with Azure Functions and AIS
Integrate 2019 - Creating a Processing Pipeline with Azure Functions and AIS
 

Similar to Leveraging Async APIs to deliver cross domain agile collaboration

apidays LIVE Australia 2021 - Leveraging Async APIs to deliver Cross Domain A...
apidays LIVE Australia 2021 - Leveraging Async APIs to deliver Cross Domain A...apidays LIVE Australia 2021 - Leveraging Async APIs to deliver Cross Domain A...
apidays LIVE Australia 2021 - Leveraging Async APIs to deliver Cross Domain A...apidays
 
apidays LIVE New York 2021 - Managing the usage of Asynchronous APIs: What do...
apidays LIVE New York 2021 - Managing the usage of Asynchronous APIs: What do...apidays LIVE New York 2021 - Managing the usage of Asynchronous APIs: What do...
apidays LIVE New York 2021 - Managing the usage of Asynchronous APIs: What do...apidays
 
[APIdays NY] Managing the usage of Asynchronous APIs: What does it take?
[APIdays NY] Managing the usage of Asynchronous APIs: What does it take?[APIdays NY] Managing the usage of Asynchronous APIs: What does it take?
[APIdays NY] Managing the usage of Asynchronous APIs: What does it take?WSO2
 
Highlights of WSO2 API Manager 4.0.0
Highlights of WSO2 API Manager 4.0.0Highlights of WSO2 API Manager 4.0.0
Highlights of WSO2 API Manager 4.0.0WSO2
 
MuleSoft_Meetup_Datagraph and Async APIs.pptx.pdf
MuleSoft_Meetup_Datagraph and Async APIs.pptx.pdfMuleSoft_Meetup_Datagraph and Async APIs.pptx.pdf
MuleSoft_Meetup_Datagraph and Async APIs.pptx.pdfVikalp Bhalia
 
WSO2 API Microgateway for Easier Development and Greater Scalability
WSO2 API Microgateway for Easier Development and Greater ScalabilityWSO2 API Microgateway for Easier Development and Greater Scalability
WSO2 API Microgateway for Easier Development and Greater ScalabilityWSO2
 
Anypoint new features_coimbatore_mule_meetup
Anypoint new features_coimbatore_mule_meetupAnypoint new features_coimbatore_mule_meetup
Anypoint new features_coimbatore_mule_meetupMergeStack
 
Brushing skills on SignalR for ASP.NET developers
Brushing skills on SignalR for ASP.NET developersBrushing skills on SignalR for ASP.NET developers
Brushing skills on SignalR for ASP.NET developersONE BCG
 
Api management best practices with wso2 api manager
Api management best practices with wso2 api managerApi management best practices with wso2 api manager
Api management best practices with wso2 api managerChanaka Fernando
 
[API World ] - Managing Asynchronous APIs
[API World ] - Managing Asynchronous APIs[API World ] - Managing Asynchronous APIs
[API World ] - Managing Asynchronous APIsWSO2
 
[WSO2 Integration Summit Bern 2019] Transforming Your Business through APIs
[WSO2 Integration Summit Bern 2019] Transforming Your Business through APIs[WSO2 Integration Summit Bern 2019] Transforming Your Business through APIs
[WSO2 Integration Summit Bern 2019] Transforming Your Business through APIsWSO2
 
Apicurio Registry: Event-driven APIs & Schema governance for Apache Kafka | F...
Apicurio Registry: Event-driven APIs & Schema governance for Apache Kafka | F...Apicurio Registry: Event-driven APIs & Schema governance for Apache Kafka | F...
Apicurio Registry: Event-driven APIs & Schema governance for Apache Kafka | F...HostedbyConfluent
 
Achieve Full API Lifecycle Management Using NGINX Controller – EMEA
Achieve Full API Lifecycle Management Using NGINX Controller – EMEAAchieve Full API Lifecycle Management Using NGINX Controller – EMEA
Achieve Full API Lifecycle Management Using NGINX Controller – EMEANGINX, Inc.
 
The Best of Both Worlds: Introducing WSO2 API Manager 4.0.0
The Best of Both Worlds: Introducing WSO2 API Manager 4.0.0The Best of Both Worlds: Introducing WSO2 API Manager 4.0.0
The Best of Both Worlds: Introducing WSO2 API Manager 4.0.0WSO2
 
5 Pillars of Building Enterprise0grade APIs
5 Pillars of Building Enterprise0grade APIs5 Pillars of Building Enterprise0grade APIs
5 Pillars of Building Enterprise0grade APIsWSO2
 
APIdays Paris 2014 - Workshop - Craft and Deploy Your API in a Few Clicks Wit...
APIdays Paris 2014 - Workshop - Craft and Deploy Your API in a Few Clicks Wit...APIdays Paris 2014 - Workshop - Craft and Deploy Your API in a Few Clicks Wit...
APIdays Paris 2014 - Workshop - Craft and Deploy Your API in a Few Clicks Wit...Restlet
 
Achieve Full API Lifecycle Management Using NGINX Controller
Achieve Full API Lifecycle Management Using NGINX ControllerAchieve Full API Lifecycle Management Using NGINX Controller
Achieve Full API Lifecycle Management Using NGINX ControllerNGINX, Inc.
 
WSO2 MASTER CLASS ITALIA #11 - APIM 4.0 & approccio event based
WSO2 MASTER CLASS ITALIA #11 - APIM 4.0 & approccio event basedWSO2 MASTER CLASS ITALIA #11 - APIM 4.0 & approccio event based
WSO2 MASTER CLASS ITALIA #11 - APIM 4.0 & approccio event basedProfesia Srl, Lynx Group
 
[Workshop] API Management in Microservices Architecture
[Workshop] API Management in Microservices Architecture[Workshop] API Management in Microservices Architecture
[Workshop] API Management in Microservices ArchitectureWSO2
 
[WSO2 API Manager Community Call: Streaming API Support in WSO2 API Manager 4.0
[WSO2 API Manager Community Call: Streaming API Support in WSO2 API Manager 4.0[WSO2 API Manager Community Call: Streaming API Support in WSO2 API Manager 4.0
[WSO2 API Manager Community Call: Streaming API Support in WSO2 API Manager 4.0WSO2
 

Similar to Leveraging Async APIs to deliver cross domain agile collaboration (20)

apidays LIVE Australia 2021 - Leveraging Async APIs to deliver Cross Domain A...
apidays LIVE Australia 2021 - Leveraging Async APIs to deliver Cross Domain A...apidays LIVE Australia 2021 - Leveraging Async APIs to deliver Cross Domain A...
apidays LIVE Australia 2021 - Leveraging Async APIs to deliver Cross Domain A...
 
apidays LIVE New York 2021 - Managing the usage of Asynchronous APIs: What do...
apidays LIVE New York 2021 - Managing the usage of Asynchronous APIs: What do...apidays LIVE New York 2021 - Managing the usage of Asynchronous APIs: What do...
apidays LIVE New York 2021 - Managing the usage of Asynchronous APIs: What do...
 
[APIdays NY] Managing the usage of Asynchronous APIs: What does it take?
[APIdays NY] Managing the usage of Asynchronous APIs: What does it take?[APIdays NY] Managing the usage of Asynchronous APIs: What does it take?
[APIdays NY] Managing the usage of Asynchronous APIs: What does it take?
 
Highlights of WSO2 API Manager 4.0.0
Highlights of WSO2 API Manager 4.0.0Highlights of WSO2 API Manager 4.0.0
Highlights of WSO2 API Manager 4.0.0
 
MuleSoft_Meetup_Datagraph and Async APIs.pptx.pdf
MuleSoft_Meetup_Datagraph and Async APIs.pptx.pdfMuleSoft_Meetup_Datagraph and Async APIs.pptx.pdf
MuleSoft_Meetup_Datagraph and Async APIs.pptx.pdf
 
WSO2 API Microgateway for Easier Development and Greater Scalability
WSO2 API Microgateway for Easier Development and Greater ScalabilityWSO2 API Microgateway for Easier Development and Greater Scalability
WSO2 API Microgateway for Easier Development and Greater Scalability
 
Anypoint new features_coimbatore_mule_meetup
Anypoint new features_coimbatore_mule_meetupAnypoint new features_coimbatore_mule_meetup
Anypoint new features_coimbatore_mule_meetup
 
Brushing skills on SignalR for ASP.NET developers
Brushing skills on SignalR for ASP.NET developersBrushing skills on SignalR for ASP.NET developers
Brushing skills on SignalR for ASP.NET developers
 
Api management best practices with wso2 api manager
Api management best practices with wso2 api managerApi management best practices with wso2 api manager
Api management best practices with wso2 api manager
 
[API World ] - Managing Asynchronous APIs
[API World ] - Managing Asynchronous APIs[API World ] - Managing Asynchronous APIs
[API World ] - Managing Asynchronous APIs
 
[WSO2 Integration Summit Bern 2019] Transforming Your Business through APIs
[WSO2 Integration Summit Bern 2019] Transforming Your Business through APIs[WSO2 Integration Summit Bern 2019] Transforming Your Business through APIs
[WSO2 Integration Summit Bern 2019] Transforming Your Business through APIs
 
Apicurio Registry: Event-driven APIs & Schema governance for Apache Kafka | F...
Apicurio Registry: Event-driven APIs & Schema governance for Apache Kafka | F...Apicurio Registry: Event-driven APIs & Schema governance for Apache Kafka | F...
Apicurio Registry: Event-driven APIs & Schema governance for Apache Kafka | F...
 
Achieve Full API Lifecycle Management Using NGINX Controller – EMEA
Achieve Full API Lifecycle Management Using NGINX Controller – EMEAAchieve Full API Lifecycle Management Using NGINX Controller – EMEA
Achieve Full API Lifecycle Management Using NGINX Controller – EMEA
 
The Best of Both Worlds: Introducing WSO2 API Manager 4.0.0
The Best of Both Worlds: Introducing WSO2 API Manager 4.0.0The Best of Both Worlds: Introducing WSO2 API Manager 4.0.0
The Best of Both Worlds: Introducing WSO2 API Manager 4.0.0
 
5 Pillars of Building Enterprise0grade APIs
5 Pillars of Building Enterprise0grade APIs5 Pillars of Building Enterprise0grade APIs
5 Pillars of Building Enterprise0grade APIs
 
APIdays Paris 2014 - Workshop - Craft and Deploy Your API in a Few Clicks Wit...
APIdays Paris 2014 - Workshop - Craft and Deploy Your API in a Few Clicks Wit...APIdays Paris 2014 - Workshop - Craft and Deploy Your API in a Few Clicks Wit...
APIdays Paris 2014 - Workshop - Craft and Deploy Your API in a Few Clicks Wit...
 
Achieve Full API Lifecycle Management Using NGINX Controller
Achieve Full API Lifecycle Management Using NGINX ControllerAchieve Full API Lifecycle Management Using NGINX Controller
Achieve Full API Lifecycle Management Using NGINX Controller
 
WSO2 MASTER CLASS ITALIA #11 - APIM 4.0 & approccio event based
WSO2 MASTER CLASS ITALIA #11 - APIM 4.0 & approccio event basedWSO2 MASTER CLASS ITALIA #11 - APIM 4.0 & approccio event based
WSO2 MASTER CLASS ITALIA #11 - APIM 4.0 & approccio event based
 
[Workshop] API Management in Microservices Architecture
[Workshop] API Management in Microservices Architecture[Workshop] API Management in Microservices Architecture
[Workshop] API Management in Microservices Architecture
 
[WSO2 API Manager Community Call: Streaming API Support in WSO2 API Manager 4.0
[WSO2 API Manager Community Call: Streaming API Support in WSO2 API Manager 4.0[WSO2 API Manager Community Call: Streaming API Support in WSO2 API Manager 4.0
[WSO2 API Manager Community Call: Streaming API Support in WSO2 API Manager 4.0
 

More from Nuwan Dias

The Kubernetes Gateway API and its role in Cloud Native API Management
The Kubernetes Gateway API and its role in Cloud Native API ManagementThe Kubernetes Gateway API and its role in Cloud Native API Management
The Kubernetes Gateway API and its role in Cloud Native API ManagementNuwan Dias
 
Building APIs in a Cloud Native Era
Building APIs in a Cloud Native EraBuilding APIs in a Cloud Native Era
Building APIs in a Cloud Native EraNuwan Dias
 
Building an API Factory: Turn your APIs into Products
Building an API Factory: Turn your APIs into ProductsBuilding an API Factory: Turn your APIs into Products
Building an API Factory: Turn your APIs into ProductsNuwan Dias
 
How to design a good rest api tools, techniques and best practices.
How to design a good rest api  tools, techniques and best practices.How to design a good rest api  tools, techniques and best practices.
How to design a good rest api tools, techniques and best practices.Nuwan Dias
 
Delivering the Modern API: Know what it takes
Delivering the Modern API: Know what it takesDelivering the Modern API: Know what it takes
Delivering the Modern API: Know what it takesNuwan Dias
 
Decentralized APIs for Agile Businesses
Decentralized APIs for Agile BusinessesDecentralized APIs for Agile Businesses
Decentralized APIs for Agile BusinessesNuwan Dias
 

More from Nuwan Dias (6)

The Kubernetes Gateway API and its role in Cloud Native API Management
The Kubernetes Gateway API and its role in Cloud Native API ManagementThe Kubernetes Gateway API and its role in Cloud Native API Management
The Kubernetes Gateway API and its role in Cloud Native API Management
 
Building APIs in a Cloud Native Era
Building APIs in a Cloud Native EraBuilding APIs in a Cloud Native Era
Building APIs in a Cloud Native Era
 
Building an API Factory: Turn your APIs into Products
Building an API Factory: Turn your APIs into ProductsBuilding an API Factory: Turn your APIs into Products
Building an API Factory: Turn your APIs into Products
 
How to design a good rest api tools, techniques and best practices.
How to design a good rest api  tools, techniques and best practices.How to design a good rest api  tools, techniques and best practices.
How to design a good rest api tools, techniques and best practices.
 
Delivering the Modern API: Know what it takes
Delivering the Modern API: Know what it takesDelivering the Modern API: Know what it takes
Delivering the Modern API: Know what it takes
 
Decentralized APIs for Agile Businesses
Decentralized APIs for Agile BusinessesDecentralized APIs for Agile Businesses
Decentralized APIs for Agile Businesses
 

Recently uploaded

costume and set research powerpoint presentation
costume and set research powerpoint presentationcostume and set research powerpoint presentation
costume and set research powerpoint presentationphoebematthew05
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 

Recently uploaded (20)

E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
costume and set research powerpoint presentation
costume and set research powerpoint presentationcostume and set research powerpoint presentation
costume and set research powerpoint presentation
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort ServiceHot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 

Leveraging Async APIs to deliver cross domain agile collaboration

  • 1. Leveraging Asynchronous APIs to deliver cross domain agile collaboration September 2021 Nuwan Dias
  • 2. Hello! Nuwan Dias VP and deputy CTO - WSO2 @nuwandias Co-Author of Microservices Security in Action
  • 3. ● Synchronous vs Asynchronous APIs. ● Asynchronous API usages and applications. ● The AsyncAPI spec. ● Challenges faced by users of Asynchronous APIs. ● Management of Asynchronous APIs. 3 Agenda
  • 6. ● View your account balance. ● Transfer money from your account using your mobile app. ● Place an order through an e-commerce application. ● Web search. ● Upload your picture to social media. “Synchronous APIs are great for getting things done on demand, not but so much for reacting to events as they happen.” 6 Usages of synchronous APIs
  • 7. ● An alternative to synchronous communication to get data in near real time. ● Results in excessive processing for both client and server. ● <5% actual updates. ● Results in a poor user experience. ● Workarounds such as E-tags only solves part of the problem. 7 Polling Client Server Any update? No Any update? Yes
  • 8. ● Provides a mechanism of being notified upon events. ● No polling required. ● Subscriber requires a method of being called. ● Enables limitless collaboration across systems. 8 Asynchronous Communication Client (Subscriber) Server (Publisher) Subscribe to events with a callback endpoint Notify client through callback endpoint Event occurred.
  • 9. ● The broker pattern is a common mechanism of implementing asynchronous communication. ● No client-server communication. ● Decouples the subscriber from the publisher. ● Allows publisher to focus on its business logic. ● Broker takes on responsibility of message delivery. ⦿ Ex: WebSub: Intent verification, partial updates, message redistribution. 9 Asynchronous Communication: Broker Pattern Subscriber Publisher Subscribe Receive events Event occurred. Broker Publish
  • 10. ● Push Notifications ⦿ Notifications received on your mobile device. ⦿ Real time updates on apps. ● Automation Tasks. ⦿ Business automation tasks. ⦾ Ex: IFTTT, Zapier, Tray.io ⦿ Engineering process automation. ⦾ Ex: Github. ● Systems integration ⦿ Event driven architecture in Microservices. 10 Usages of Asynchronous APIs.
  • 11. ● HTTP Based ⦿ WebSockets: client-server, bidirectional ⦿ WebHooks: server-server, unidirectional ⦿ WebSub: server-servers, unidirectional ⦿ Server Sent Events (SSE): client-server, unidirectional (server push) ⦿ GraphQL subscriptions: client-server, unidirectional ● gRPC: server-server, bidirectional ● Kafka: server-server, bidirectional ● AMQP: server-sever, bidirectional ● MQTT: client-server, bidirectional 11 Technologies being used to implement Asynchronous APIs
  • 12. ● Used to describe Asynchronous APIs from a client’s perspective. ● A “client” can be either a publisher or a subscriber. ● Highly influenced by the OpenAPI specification. ● https://www.asyncapi.com/ ● Describes channels, messages and brokers. 12 The #AsyncAPI Specification
  • 13. ● By Consumers ⦿ Discovery of all triggers in an organization. ⦿ Lack of a uniform subscription experience. ⦾ Caused by lack of adherence to a standard. ⦿ Unsupported protocol supported by Publisher. ● By Providers/Facilitators (not Publishers) ⦿ Securing Asynchronous APIs. ⦿ Rate limiting. ⦿ Ensuring adherence to contract. ⦿ Message processing/enrichment. ⦿ Monitoring and alerting. ⦿ Business insights. 13 Challenges faced when adopting Asynchronous APIs
  • 14. 14 Have a Developer Portal for discovering events used by an organization Subscribers External Event Publishers Internal Event Publishers Register Register Developer Portal Discover
  • 15. ● For HTTP based asynchronous APIs a hub architecture can be used to unify subscriptions. ● API providers subscribe the hub with the API. ● API consumers subscribe with the hub when/if they want to get notified on events. ● The hub redistributes events to everyone subscribed on the hub. 15 Using a Hub architecture for unifying subscriptions Subscriber 1 Subscriber 2 Portal Hub Events from the API received on the Hub Hub redistributes events to subscribers Subscribers discover APIs on the portal and subscribe at the hub
  • 16. ● In certain use cases the clients wants to use a protocol that is not supported by the API. ● A hub can be used to convert the protocol to the requested type. This mostly works with HTTP based protocols. ● This also allows the client to use an appropriate security type for the protocol. 16 Protocol conversion and security Subscriber Hub Publisher sends events on a Kafka topic Subscriber uses appropriate security protocol supported by the hub. Subscriber receives events on a WebSocket Hub does a conversion from Kafka event to WebSocket frame
  • 17. ● An API always has a contract/spec. ● Subscribers expect event producers to send events that adhere to the contract. ● Subscribers would fail to process messages that do not conform to the contract. ● The Hub can be used as an enforcer of the contract. 17 Ensuring adherence to contract Subscriber Hub Different versions of the API submit events to the hub Hub only delivers messages that adhere to the contract Hub inspects message to check for conformance v1.0 v1.1
  • 18. ● Subscribers may not be interested in receiving all events published by a producer. ● They may want to know about events when certain conditions are met. ⦿ When the average temperature goes beyond 70 degrees. ⦿ When a bid value goes beyond a limit. ● Hubs may support message aggregations, summarizations and processing. 18 Message processing and Enrichment Subscriber Hub Notify whenever someone places a bid on an item. Notify subscriber only if condition is met. Check if bid goes beyond $50.
  • 19. ● Certain event producers may be too chatty for the liking of the subscriber. ● The could expose these APIs over rate limit plans that suit the subscriber. ● These can be used as a way of monetizing APIs as well. 19 Rate limiting for reducing chattiness and monetization of APIs Subscriber Hub Producers sends all events to the Hub. Subscriber only receives events based on the usage plan. Hub rate limits based on subscribers usage plan.
  • 20. ● Provides organizations insights on Asynchronous APIs. ● Capture protocol specific usage attributes ⦿ Ex: WebSockets: Bandwidth, SSE: #events, WebHooks: Active Users. ● Detection of abnormalities and usage patterns. 20 Monitoring & Alerting