Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
A Developer's Guide to Building Resilient Cloud Applications with Azure

You're reading from   A Developer's Guide to Building Resilient Cloud Applications with Azure Deploy applications on serverless and event-driven architecture using a cloud database

Arrow left icon
Product type Paperback
Published in Feb 2023
Publisher Packt
ISBN-13 9781804611715
Length 296 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Hamida Rebai Hamida Rebai
Author Profile Icon Hamida Rebai
Hamida Rebai
Arrow right icon
View More author details
Toc

Table of Contents (18) Chapters Close

Preface 1. Part 1: Building Cloud-Oriented Apps Using Patterns and Technologies
2. Chapter 1: Introduction to Serverless Architecture, Event-Driven Architecture, and Cloud Databases FREE CHAPTER 3. Chapter 2: API Management – Import, Manage, and Publish Your First API 4. Chapter 3: Developing Event-Based and Message-Based Solutions 5. Part 2: Connecting Your Application with Azure Databases
6. Chapter 4: Creating and Deploying a Function App in Azure 7. Chapter 5: Develop an Azure Service Fabric Distributed Application 8. Chapter 6: Introduction to Application Data 9. Chapter 7: Working with Azure SQL Database 10. Chapter 8: Working with Azure Storage 11. Chapter 9: Working with Azure Cosmos DB to Manage Database Services 12. Chapter 10: Big Data Storage Overview 13. Part 3: Ensuring Continuous Integration and Continuous Container Deployment on Azure
14. Chapter 11: Containers and Continuous Deployment on Azure 15. Assessments 16. Index 17. Other Books You May Enjoy

Understanding event-driven architecture

Event-driven architecture is a software architecture that uses events in order to be able to communicate between decoupled services. It is a pattern for designing applications that are loosely coupled and is used in modern applications built with microservices. When consumers are listening to an event, which could be a status change or an update, event producers are not able to know which event consumers are listening to and do not even know the consequences of its occurrence.

In an event-driven architecture, we have the following three key components:

  • Event producers: These generate a stream of events
  • Event routers: These manage event delivery between producers and consumers
  • Event consumers: These listen to the events

The following diagram illustrates these components:

Figure 1.1 – Event-driven architecture

Figure 1.1 – Event-driven architecture

The source of an event is triggered by internal or external inputs. They can be generated by either a user (by clicking or using keyboard input, for example), an external source (such as a sensor output), or through a system (such as loading a program).

In an event-driven architecture, we can use event streaming or a publisher/subscriber model. But what is the difference between event streaming and a publisher/subscriber model?

  • Publisher/subscriber model: This provides a framework that enables message exchanges between publishers and subscribers. This pattern involves the publisher and the subscriber and depends on a message broker that reroutes messages from the publisher to the subscriber.
  • Event streaming: When a stream of events is published to a broker, the clients are able to subscribe to the stream and join at any time; they have access to them and can consume multiple preferred streams, and they are able to read from any part and advance their position. The events are always written in a log file.

Event-driven architectures are recommended to improve agility and move quickly. They are used in modern applications, mainly microservices, or in any application that includes several decoupled components. When adopting an event-driven architecture, you may need to rethink how you view your application design.

In this section, we have explored event-driven architecture and the different key components.

You have been reading a chapter from
A Developer's Guide to Building Resilient Cloud Applications with Azure
Published in: Feb 2023
Publisher: Packt
ISBN-13: 9781804611715
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image