Chapter 6. AsyncAPI
An API-led strategy isn’t a one-size-fits-all solution. Different organizations have unique needs, goals, and technical environments, so it’s important to tailor the plan to fit those specific circumstances. Each organization must evaluate its unique context to develop an effective API-led strategy.
Suppose event-driven architecture (EDA) is part of your strategy. In that case, allowing different components to react to events in real time can further enhance the responsiveness and scalability of your system. This can be particularly beneficial for applications that require real-time data processing and updates, such as live chat apps, online gaming, or Internet of Things (IoT) systems.
An asynchronous API (async API) is a way for different software programs to talk to each other without having to wait for a response right away. Imagine you’re texting a friend. With a regular (synchronous) API, it’s as if you send a text and you can’t do anything else until your friend replies. But with an async API, you send a text, and while waiting for a reply, you can do other things like play a game or chat with another friend. In this chapter, we will look at async APIs and learn how to design and implement one in ACB.
Event-Driven Architecture
So far in this book, we have focused on REST APIs, where a request is made and a response is awaited. However, there are instances where an immediate response is optional. In such cases, only a confirmation that the request was ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access