Azure Event Grid is a fully managed, intelligent event routing service available within the Microsoft Azure umbrella. With Azure Event Grid, enterprise applications can leverage event-driven programming models to build reactive interfaces that can be used to connect external or internal enterprise applications. Using Azure Event Grid as a middleware messaging layer for application and interface integration helps organizations to optimize the performance of their software resources with a notification-based design pattern rather than a data pull-based operation model.
On the architecture side, Azure Event Grid follows the publish-subscribe design pattern, where one or more client applications or software systems can publish events to an Azure Event Grid topic and there will be one or more systems reacting and listening to the broadcast events through an Azure Event Grid topic subscription.
Following a pattern similar to that of other serverless platforms and services available in the cloud, Azure Event Grid comes with many benefits for organizations, such as easy startup, on-demand scaling capabilities, multiple language support through a unified SDK, consumption-based pricing, and good monitoring capabilities through the Azure portal. Organizations can leverage these features to build next-generation integration frameworks based on microservices and the reactive programming model.
When it comes to supporting resource types for eventing, in addition to external applications and software resources to publish and route events, Azure Event Grid also has built-in support for multiple Azure components to publish and subscribe to platform-specific events. Some of the platforms that support eventing through Azure Event Grid are Azure Subscription, Media Storage, Event Hub, Blob Storage, Data Factory, Azure Service Bus, Automation, IoT hub, and Resource Group. The following diagram describes the current event publishing sources, along with multiple event subscribers for Azure Event Grid:
Eventing patterns and a reactive programming model help organizations to remain close to customer sentiments with near-real time communication. This also helps enterprises to remain competitive in the market, with frequent changes in product and service catalogs being based on customer and client requirements. To get started with Azure Event Grid and event-based design patterns, there are many great resources available in the Microsoft documentation and GitHub. In this chapter, we will follow the same steps to get our basic foundation covered before moving into many more granular and advanced integration patterns covering real-world implementations.
When we discuss Azure Event Grid's potential for offering modern integration and event-based architectures to organizations, one of the most important things to discuss is the difference between events and messages. What do we mean by events and messages in software development and enterprise system communications, and how can we differentiate between them? It's also important to choose the right communication pattern for system communication. For example, you can choose eventing, or messaging, or a combination of both, as per the requirements of your organization's solution.
In this chapter, we will learn about the basics of events and messages. This chapter will also help us to understand why we should care about emitting and consuming events when building applications on top of cloud resources or external resources.
The topics that we are going to cover are listed here:
- Eventing and messaging
- Event sources and event handlers
- Azure Event Grid topics
- Azure Event Grid security and authentication
- Azure Event Grid management access control
- Example 1 – storage events and Logic Apps single event listeners
- Example 2 – custom Azure Event Grid topics and event broadcasts
- Event domains and broadcast events
We will start our discussion with an introduction to events and messages, which are microcomponents of the messaging system. When discussing events, we will derive the characteristics of events and eventing. Moving on, we will cover important concepts such as event sources, event subscribers, and event middleware, and then we will move on to the security features of Azure Event Grid and the basic publish-subscribe design pattern. The concepts and exercises discussed in this chapter will give us some best practices for choosing patterns and implementing them in software integration. In the final section of this chapter, we will also cover Event Grid Domains and how we can get started with them to work with enterprise-wide eventing by using what we will learn about Azure Event Grid topics.
With the rise of multiple cloud platforms and various Software-as-a-Service (SaaS) products, there has been a paradigm shift in the integration of architecture patterns. Concepts and patterns that might have been relevant a few years back do not make much impact now because of changes in the infrastructure and software market. This has been seen in the digital transformation paths of many enterprises. Organizations are taking advantage of machine learning, big data platforms, and serverless features (such as Azure Functions and Azure Logic Apps), and are moving to more granular microservice-based models of application design. Such application designs allow organizations to have real-time customer interactions and offer a better service model where further innovation is concerned.
As organizations move closer to the cloud with next-generation solutions in mind, integration is becoming more critical than ever. With current market trends, organizations are not dealing with serving a single customer base or working with a single set of software. Rather, most organizations have a global footprint and own a multitude of software and services to serve customers worldwide. As organizations' business dimensions grow& in different areas, such as marketing, service catalogs, and customer bases, we have seen a fast-paced shift toward better integrated solutions. These integrated solutions generally connect multiple applications over various protocols, such as HTTP, SFTP, AMQP, file-based transfers, and more.
Organizations are trying to take advantage of the data available to them and learn from existing systems by implementing hybrid communication models. In hybrid solutions, the structure o...