To understand AsyncAPI and why it's important,
we first have to talk about two key concepts.
Those include synchronous communication.
And asynchronous communication.
Let's say you just downloaded a mobile app.
Let's take a mobile banking app.
For this example.
There are two sides that make up
a great user experience.
First, sometimes
you want to engage the app.
Let's say it's that time of the
month to pay your bill and
you need to make sure that you have
enough money in your account to
cover it.
So you go into
your account.
And you view your current balance
you expect
a response that's
in answer to your question.
So you're asking the app, What's
my current balance?
Let's say that
answer was
$500.
Let's also say you
just moved into a new place and
you need to update your mailing
address with your bank.
So again, you go into your app,
you go to account details and
you update
your address. Again, you're
asking the app to update
your address and you'd
expect a response
confirming that change was made.
In this situation
this represents synchronous
communication because both the
application and the user are
engaged at the same time.
Other times the app
wants to engage you.
So you open up your phone
and you go to your you go to your
mobile banking app and you see
that there was a notification
of
suspicious activity detected
on your account.
So there was a transaction on a
remote system and
this information was shared
with the user.
It's really important in
this situation for
the user to be notified as soon
as something happens so
that they can act quickly.
You wouldn't want to have to go into
your account every day to see
if it's safe and secure.
You just want and need to be told
when your account might be at risk.
So for this situation,
since the application in
the user do not have to
be engaged, at the same time, it
represents asynchronous
communication.
Event based approaches
to integration like webhook
callbacks or pubish/subscribe
messaging solutions are a more
efficient way to facilitating
asynchronous interactions.
Apache Kafka has emerged
as a leading
open source event streaming
platform.
With Apache Kafka,
streams of events are
published
to topics
that consuming applications like
our mobile banking app can
subscribe directly to
for real time access to
business critical data.
And there are many uses for
Apache Kafka.
Take our mobile banking app example.
Let's say they send you a
personalized promotional offer
based off of your
account exceeding a certain limit,
or that you engaged in
a level of high spending.
That's a perfect example
where it could be used.
So now that we have
this understanding of both
synchronous communication and
asynchronous communication, we can
bring async API
back into the picture
to understand what it is and
how it's useful.
So the async API
specification is used
to describe message driven
API flows.
It's protocol agnostic, so
you can use it for APIs
that use any asynchronous
protocol.
For our situation,
we're
using it as a specification
to describe
events on Kafka topics.
And this is really important because
it's much like
an open API
which is used as a standard for
describing API's.
Events - they they must be
described in a way that captures
enough information so that the user
can make good use
of it.
So essentially, so you
can build those ultra responsive
applications
that we talked about earlier.
But it doesn't stop it being
described.
Events - they also have
to be
discoverable.
And when they're described, it not
only includes technical information,
but also vital business
context as well.
So coming full circle
we can use async API
specification as a standard
to describe events
and we can
use that
when we do API management,
good API management,
when we're managing events across
the enterprise.
Thank you. If you like this video
and want to see more like it, please
like and subscribe.
If you have questions, please drop
them in the comments below.