Event driven–first – Enterprise Readiness for Serverless

All-at-Once Service Rewrite

Event driven–first

Asynchronous communication and event-driven architecture are terms you will often hear in serverless and throughout this book. These terms sometimes trouble tradi‐ tional engineering minds that are accustomed to developing monolithic applications using legacy practices and on-premises technologies. Even if the event-driven concept is new to your teams, it is essential that they begin to understand its significance. Asynchronicity, eventual consistency, and event-driven communication are the driv‐ ing forces behind the managed services that power serverless. To highlight their significance in serverless and modern cloud computing, Dr. Werner Vogels, CTO of Amazon.com, declared in his keynote at AWS’s annual re:Invent conference in 2022 that “The world is asynchronous.” The core of Dr. Werner’s message was to demon‐ strate how event-driven architecture with serverless technology enables businesses to innovate at scale.

An event, in general, is something that has already happened. A domain event is about something that has happened within your business domain. Event-driven architecture (EDA) is an architectural concept that uses events to communicate between decoupled microservices asynchronously. In EDA, there are sys‐ tems that produce events (producers), systems that consume events (consumers), applications that transport events (event buses, mes‐ saging systems, etc.), and systems that react to events. Among several other benefits, EDA is key to the scaling and resiliency of applications.

Approaching serverless adoption with a clear understanding of event-driven concepts and their application in practice is core to stream-aligned teams building distributed and loosely coupled microservices. Event-driven thinking elegantly connects domain thinking with serverless thinking — upholding contractual boundaries and keepingmicroservices loosely coupled. Identifying domain events and knowing what data goes out (is published) and what data comes in (is subscribed to) are as important as the API contracts. Familiarizing yourself with domain events and activities such as EventStorming is therefore crucial when your organization goes through a digital transformation and serverless adoption. You will learn why EventStorming is essen‐ tial in serverless development in Chapter 3.

Figure 2-7 shows a simple event-driven architecture where two applications consume an “order placed” event published by an ordering app to update the inventory and ship the order, respectively.

Figure 2-7. Illustration of a simple event-driven architecture

Chapters 3 and 5 discuss event-driven concepts alongside serverless architectures and implementation patterns, respectively.

Leave a Comment

Your email address will not be published. Required fields are marked *