SlideShare ist ein Scribd-Unternehmen logo
1 von 23
Downloaden Sie, um offline zu lesen
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
New York
JULY
Australia
SEPTEMBER
Singapore
APRIL
Helsinki & North
MARCH
Paris
DECEMBER
London
OCTOBER
Jakarta
FEBRUARY
Hong Kong
AUGUST
JUNE
India
MAY
Check out our API Conferences here
50+ events since 2012, 14 countries, 2,000+ speakers, 50,000+ attendees,
300k+ online community
Want to talk at one of our conferences?
Apply to speak here
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
New York
JULY
Australia
SEPTEMBER
Singapore
APRIL
Helsinki & North
MARCH
Paris
DECEMBER
London
OCTOBER
Jakarta
FEBRUARY
Hong Kong
AUGUST
JUNE
India
MAY
Check out our API Conferences here
50+ events since 2012, 14 countries, 2,000+ speakers, 50,000+ attendees,
300k+ online community
Want to talk at one of our conferences?
Apply to speak here

Weitere ähnliche Inhalte

Was ist angesagt?

Was ist angesagt? (20)

apidays LIVE London 2021 - Leveraging Webauthn for Payments by Chris Wood
apidays LIVE London 2021 - Leveraging Webauthn for Payments by Chris Woodapidays LIVE London 2021 - Leveraging Webauthn for Payments by Chris Wood
apidays LIVE London 2021 - Leveraging Webauthn for Payments by Chris Wood
 
apidays LIVE LONDON - Toward certifying Financial-grade API profile with Keyc...
apidays LIVE LONDON - Toward certifying Financial-grade API profile with Keyc...apidays LIVE LONDON - Toward certifying Financial-grade API profile with Keyc...
apidays LIVE LONDON - Toward certifying Financial-grade API profile with Keyc...
 
apidays LIVE Australia 2021 - How to Achieve Zero-Trust Security With Kuma Se...
apidays LIVE Australia 2021 - How to Achieve Zero-Trust Security With Kuma Se...apidays LIVE Australia 2021 - How to Achieve Zero-Trust Security With Kuma Se...
apidays LIVE Australia 2021 - How to Achieve Zero-Trust Security With Kuma Se...
 
apidays LIVE Hong Kong 2021 - Digital Identity Centric Approach to Accelerate...
apidays LIVE Hong Kong 2021 - Digital Identity Centric Approach to Accelerate...apidays LIVE Hong Kong 2021 - Digital Identity Centric Approach to Accelerate...
apidays LIVE Hong Kong 2021 - Digital Identity Centric Approach to Accelerate...
 
Open Bank Project Presentation Tel Aviv CA 4th April 2017
Open Bank Project Presentation Tel Aviv CA 4th April 2017 Open Bank Project Presentation Tel Aviv CA 4th April 2017
Open Bank Project Presentation Tel Aviv CA 4th April 2017
 
apidays LIVE Jakarta - Follow the money: connecting payments by Luis Ereneta,...
apidays LIVE Jakarta - Follow the money: connecting payments by Luis Ereneta,...apidays LIVE Jakarta - Follow the money: connecting payments by Luis Ereneta,...
apidays LIVE Jakarta - Follow the money: connecting payments by Luis Ereneta,...
 
apidays LIVE India - Digital Trust Infrastructure - Key to digital transforma...
apidays LIVE India - Digital Trust Infrastructure - Key to digital transforma...apidays LIVE India - Digital Trust Infrastructure - Key to digital transforma...
apidays LIVE India - Digital Trust Infrastructure - Key to digital transforma...
 
Value Networks in Open Banking
Value Networks in Open BankingValue Networks in Open Banking
Value Networks in Open Banking
 
apidays LIVE New York 2021 - Simplify Open Policy Agent with Styra DAS by Tim...
apidays LIVE New York 2021 - Simplify Open Policy Agent with Styra DAS by Tim...apidays LIVE New York 2021 - Simplify Open Policy Agent with Styra DAS by Tim...
apidays LIVE New York 2021 - Simplify Open Policy Agent with Styra DAS by Tim...
 
INTERFACE, by apidays - How APIs are making innovation exponential by Shaile...
INTERFACE, by apidays  - How APIs are making innovation exponential by Shaile...INTERFACE, by apidays  - How APIs are making innovation exponential by Shaile...
INTERFACE, by apidays - How APIs are making innovation exponential by Shaile...
 
apidays LIVE Jakarta - E5 ways to make your integration more resilient by Je...
apidays LIVE Jakarta - E5 ways to make your integration more resilient  by Je...apidays LIVE Jakarta - E5 ways to make your integration more resilient  by Je...
apidays LIVE Jakarta - E5 ways to make your integration more resilient by Je...
 
5 Tips for Scaling API Governance
5 Tips for Scaling API Governance5 Tips for Scaling API Governance
5 Tips for Scaling API Governance
 
Explaining API Integration: How Does API Integration work?
Explaining API Integration: How Does API Integration work?Explaining API Integration: How Does API Integration work?
Explaining API Integration: How Does API Integration work?
 
apidays LIVE Paris 2021 - APIs and Data products: How do they impact your bus...
apidays LIVE Paris 2021 - APIs and Data products: How do they impact your bus...apidays LIVE Paris 2021 - APIs and Data products: How do they impact your bus...
apidays LIVE Paris 2021 - APIs and Data products: How do they impact your bus...
 
apidays LIVE London 2021 - Open up the vault by Katrien Van Gijsel, KBC
apidays LIVE London 2021 - Open up the vault by Katrien Van Gijsel, KBCapidays LIVE London 2021 - Open up the vault by Katrien Van Gijsel, KBC
apidays LIVE London 2021 - Open up the vault by Katrien Van Gijsel, KBC
 
5 Things Every Product Leader Needs to Know About API
5 Things Every Product Leader Needs to Know About API5 Things Every Product Leader Needs to Know About API
5 Things Every Product Leader Needs to Know About API
 
[apidays LIVE HONK KONG] - Building an Integrated Supply Chain for APIs
[apidays LIVE HONK KONG] - Building an Integrated Supply Chain for APIs [apidays LIVE HONK KONG] - Building an Integrated Supply Chain for APIs
[apidays LIVE HONK KONG] - Building an Integrated Supply Chain for APIs
 
APIs for... Your Mom
APIs for... Your MomAPIs for... Your Mom
APIs for... Your Mom
 
[WSO2 Summit APAC 2020] Enabling Digital Transformation and Ecosystem Collabo...
[WSO2 Summit APAC 2020] Enabling Digital Transformation and Ecosystem Collabo...[WSO2 Summit APAC 2020] Enabling Digital Transformation and Ecosystem Collabo...
[WSO2 Summit APAC 2020] Enabling Digital Transformation and Ecosystem Collabo...
 
apidays LIVE London 2021 - Best practices when monetizing APIs by Derric Gill...
apidays LIVE London 2021 - Best practices when monetizing APIs by Derric Gill...apidays LIVE London 2021 - Best practices when monetizing APIs by Derric Gill...
apidays LIVE London 2021 - Best practices when monetizing APIs by Derric Gill...
 

Ähnlich wie apidays LIVE Australia 2021 - Leveraging Async APIs to deliver Cross Domain Agile Collaboration by Nuwan Dias, WSO2

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
WSO2
 

Ähnlich wie apidays LIVE Australia 2021 - Leveraging Async APIs to deliver Cross Domain Agile Collaboration by Nuwan Dias, WSO2 (20)

[apidays Live Australia] Leveraging Async APIs to deliver Cross Domain Agile ...
[apidays Live Australia] Leveraging Async APIs to deliver Cross Domain Agile ...[apidays Live Australia] Leveraging Async APIs to deliver Cross Domain Agile ...
[apidays Live Australia] Leveraging Async APIs to deliver Cross Domain Agile ...
 
Leveraging Async APIs to deliver cross domain agile collaboration
Leveraging Async APIs to deliver cross domain agile collaboration Leveraging Async APIs to deliver cross domain agile collaboration
Leveraging Async APIs to deliver cross domain agile collaboration
 
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?
 
[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
 
Anypoint new features_coimbatore_mule_meetup
Anypoint new features_coimbatore_mule_meetupAnypoint new features_coimbatore_mule_meetup
Anypoint new features_coimbatore_mule_meetup
 
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
 
How to Define and Share your Event APIs using AsyncAPI and Event API Products...
How to Define and Share your Event APIs using AsyncAPI and Event API Products...How to Define and Share your Event APIs using AsyncAPI and Event API Products...
How to Define and Share your Event APIs using AsyncAPI and Event API Products...
 
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...
 
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
 
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
 
[WSO2 Summit EMEA 2020] Building an Interactive API Marketplace
[WSO2 Summit EMEA 2020] Building an Interactive API Marketplace[WSO2 Summit EMEA 2020] Building an Interactive API Marketplace
[WSO2 Summit EMEA 2020] Building an Interactive API Marketplace
 
Kochi mulesoft meetup 02
Kochi mulesoft meetup 02Kochi mulesoft meetup 02
Kochi mulesoft meetup 02
 
Event Mesh Presentation at Gartner AADI Mumbai
Event Mesh Presentation at Gartner AADI MumbaiEvent Mesh Presentation at Gartner AADI Mumbai
Event Mesh Presentation at Gartner AADI Mumbai
 
MuleSoft Integration with WhatsApp | Mysore MuleSoft Meetup #1
MuleSoft Integration with WhatsApp | Mysore MuleSoft Meetup #1MuleSoft Integration with WhatsApp | Mysore MuleSoft Meetup #1
MuleSoft Integration with WhatsApp | Mysore MuleSoft Meetup #1
 
Setting the Foundation for Digital Transformation Through API Management and ...
Setting the Foundation for Digital Transformation Through API Management and ...Setting the Foundation for Digital Transformation Through API Management and ...
Setting the Foundation for Digital Transformation Through API Management and ...
 
[WSO2 Summit Americas 2020] Building an Interactive API Marketplace
[WSO2 Summit Americas 2020] Building an Interactive API Marketplace[WSO2 Summit Americas 2020] Building an Interactive API Marketplace
[WSO2 Summit Americas 2020] Building an Interactive API Marketplace
 
apidays LIVE India 2022_Maximizing the Value of Your EDA.pptx
apidays LIVE India 2022_Maximizing the Value of Your EDA.pptxapidays LIVE India 2022_Maximizing the Value of Your EDA.pptx
apidays LIVE India 2022_Maximizing the Value of Your EDA.pptx
 
Introduction to AWS API Gateway Presentation
Introduction to AWS API Gateway PresentationIntroduction to AWS API Gateway Presentation
Introduction to AWS API Gateway Presentation
 
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
 

Mehr von apidays

Mehr von apidays (20)

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
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Apidays New York 2024 - The secrets to Graph success, by Leah Hurwich Adler, ...
Apidays New York 2024 - The secrets to Graph success, by Leah Hurwich Adler, ...Apidays New York 2024 - The secrets to Graph success, by Leah Hurwich Adler, ...
Apidays New York 2024 - The secrets to Graph success, by Leah Hurwich Adler, ...
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
Apidays New York 2024 - API Discovery - From Crawl to Run by Rob Dickinson, G...
Apidays New York 2024 - API Discovery - From Crawl to Run by Rob Dickinson, G...Apidays New York 2024 - API Discovery - From Crawl to Run by Rob Dickinson, G...
Apidays New York 2024 - API Discovery - From Crawl to Run by Rob Dickinson, G...
 
Apidays Singapore 2024 - Building with the Planet in Mind by Sandeep Joshi, M...
Apidays Singapore 2024 - Building with the Planet in Mind by Sandeep Joshi, M...Apidays Singapore 2024 - Building with the Planet in Mind by Sandeep Joshi, M...
Apidays Singapore 2024 - Building with the Planet in Mind by Sandeep Joshi, M...
 
Apidays Singapore 2024 - Connecting Cross Border Commerce with Payments by Gu...
Apidays Singapore 2024 - Connecting Cross Border Commerce with Payments by Gu...Apidays Singapore 2024 - Connecting Cross Border Commerce with Payments by Gu...
Apidays Singapore 2024 - Connecting Cross Border Commerce with Payments by Gu...
 
Apidays Singapore 2024 - Privacy Enhancing Technologies for AI by Mark Choo, ...
Apidays Singapore 2024 - Privacy Enhancing Technologies for AI by Mark Choo, ...Apidays Singapore 2024 - Privacy Enhancing Technologies for AI by Mark Choo, ...
Apidays Singapore 2024 - Privacy Enhancing Technologies for AI by Mark Choo, ...
 
Apidays Singapore 2024 - Blending AI and IoT for Smarter Health by Matthew Ch...
Apidays Singapore 2024 - Blending AI and IoT for Smarter Health by Matthew Ch...Apidays Singapore 2024 - Blending AI and IoT for Smarter Health by Matthew Ch...
Apidays Singapore 2024 - Blending AI and IoT for Smarter Health by Matthew Ch...
 
Apidays Singapore 2024 - OpenTelemetry for API Monitoring by Danielle Kayumbi...
Apidays Singapore 2024 - OpenTelemetry for API Monitoring by Danielle Kayumbi...Apidays Singapore 2024 - OpenTelemetry for API Monitoring by Danielle Kayumbi...
Apidays Singapore 2024 - OpenTelemetry for API Monitoring by Danielle Kayumbi...
 
Apidays Singapore 2024 - Connecting Product and Engineering Teams with Testin...
Apidays Singapore 2024 - Connecting Product and Engineering Teams with Testin...Apidays Singapore 2024 - Connecting Product and Engineering Teams with Testin...
Apidays Singapore 2024 - Connecting Product and Engineering Teams with Testin...
 
Apidays Singapore 2024 - The Growing Carbon Footprint of Digitalization and H...
Apidays Singapore 2024 - The Growing Carbon Footprint of Digitalization and H...Apidays Singapore 2024 - The Growing Carbon Footprint of Digitalization and H...
Apidays Singapore 2024 - The Growing Carbon Footprint of Digitalization and H...
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Apidays Singapore 2024 - API Monitoring x SRE by Ryan Ashneil and Eugene Wong...
Apidays Singapore 2024 - API Monitoring x SRE by Ryan Ashneil and Eugene Wong...Apidays Singapore 2024 - API Monitoring x SRE by Ryan Ashneil and Eugene Wong...
Apidays Singapore 2024 - API Monitoring x SRE by Ryan Ashneil and Eugene Wong...
 
Apidays Singapore 2024 - A nuanced approach on AI costs and benefits for the ...
Apidays Singapore 2024 - A nuanced approach on AI costs and benefits for the ...Apidays Singapore 2024 - A nuanced approach on AI costs and benefits for the ...
Apidays Singapore 2024 - A nuanced approach on AI costs and benefits for the ...
 
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu SubbuApidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
 
Apidays Singapore 2024 - How APIs drive business at BNP Paribas by Quy-Doan D...
Apidays Singapore 2024 - How APIs drive business at BNP Paribas by Quy-Doan D...Apidays Singapore 2024 - How APIs drive business at BNP Paribas by Quy-Doan D...
Apidays Singapore 2024 - How APIs drive business at BNP Paribas by Quy-Doan D...
 

Kürzlich hochgeladen

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 

Kürzlich hochgeladen (20)

How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
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
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
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
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
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...
 

apidays LIVE Australia 2021 - Leveraging Async APIs to deliver Cross Domain Agile Collaboration by Nuwan Dias, WSO2

  • 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
  • 5. New York JULY Australia SEPTEMBER Singapore APRIL Helsinki & North MARCH Paris DECEMBER London OCTOBER Jakarta FEBRUARY Hong Kong AUGUST JUNE India MAY Check out our API Conferences here 50+ events since 2012, 14 countries, 2,000+ speakers, 50,000+ attendees, 300k+ online community Want to talk at one of our conferences? Apply to speak here
  • 7. ● 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
  • 8. ● 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
  • 9. ● 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.
  • 10. ● 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
  • 11. ● 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.
  • 12. ● 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
  • 13. ● 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
  • 14. ● 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
  • 15. 14 Have a Developer Portal for discovering events used by an organization Subscribers External Event Publishers Internal Event Publishers Register Register Developer Portal Discover
  • 16. ● 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
  • 17. ● 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
  • 18. ● 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
  • 19. ● 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.
  • 20. ● 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.
  • 21. ● 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
  • 23. New York JULY Australia SEPTEMBER Singapore APRIL Helsinki & North MARCH Paris DECEMBER London OCTOBER Jakarta FEBRUARY Hong Kong AUGUST JUNE India MAY Check out our API Conferences here 50+ events since 2012, 14 countries, 2,000+ speakers, 50,000+ attendees, 300k+ online community Want to talk at one of our conferences? Apply to speak here