Chapter 6. More on Integration: Event-Driven Architecture
In the last chapter, we touched a bit on one-way messaging architectures and their utility in integrating existing monoliths. In this chapter, we’re going to dive in and explore the patterns of event-driven architecture (sometimes called EDA) and how serverless can be a compelling fit for these applications. Event-driven applications produce and consume events as their primary I/O interfaces, usually interacting with some sort of message bus or event router.
Serverless is a great fit for event-driven architectures because each message acts an individual independent unit of work that can be processed serverlessly.1 Many serverless systems have built-in event-handling architectures, and some (AWS Lambda in particular) are built specifically around an event-processing lens such that even synchronous requests are treated as events and corresponding responses.
If you’ve done much UI programming in the last 20 years, you’re probably familiar with events from a desktop application perspective—rather than poll for the current mouse position, keys pressed, etc., you can register event handlers for certain events of interest, and specify a function that should be called when that event happens. Internally, your computer fires hundreds of events every minute—keys pressed, keys released, time passing, mouse moving, windows updating—every behavior you might be interested in reacting to is presented as an event.
Similarly, an enterprise ...
Get Building Serverless Applications on Knative now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.