39. Summary
Event-driven design allows for cost-effective, real-
time, responsive applications
Eventing is not the same as messaging
Event Grid provides a robust serverless solution for
easily building event-driven cloud applications
No need for context or relationship to other events to be significant;
ex: file created
Meaning is derived from a group of recorded metrics
Think of a chart with a time-based X axis
“This happens when a system sends event messages to notify other systems of a change in its domain. A key element of event notification is that the source system doesn't really care much about the response. Often it doesn't expect any answer at all, or if there is a response that the source does care about, it's indirect. There would be a marked separation between the logic flow that sends the event and any logic flow that responds to some reaction to that event.”
Can derive the current status of a resource from its event history (ordered sequence of events)
Can recover state because events are immutable
“The core idea of event sourcing is that whenever we make a change to the state of a system, we record that state change as an event, and we can confidently rebuild the system state by reprocessing the events at any time in the future. The event store becomes the principal source of truth, and the system state is purely derived from it. For programmers, the best example of this is a version-control system. The log of all the commits is the event store and the working copy of the source tree is the system state.”
APIs are abundant, data is ubiquitous.
Think about all the notifications
Copernican shift – how to maintain data consistency between all those APIs?
Three different types of service interaction.
Simplicity - Point and click to aim events from your Azure resource to any event handler or endpoint.
Advanced filtering - Filter on event type or event publish path to make sure event handlers only receive relevant events.
Fan-out - Subscribe several endpoints to the same event to send copies of the event to as many places as needed.
Reliability - 24-hour retry with exponential backoff to make sure events are delivered.
Pay-per-event - Pay only for the amount you use Event Grid.
High throughput - Build high-volume workloads on Event Grid with support for millions of events per second.
Built-in Events - Get up and running quickly with resource-defined built-in events.
Custom Events - Use Event Grid route, filter, and reliably deliver custom events in your app.
Based on Service Fabric
99.99% availability
https://docs.microsoft.com/en-us/azure/event-grid/delivery-and-retry
10 seconds
30 seconds
1 minute
5 minutes
10 minutes
30 minutes
1 hour
Event Grid adds a small randomization to all retry intervals.
Tord Glad Nordahl : “With dynamic scale and consistent performance Azure Event grid lets you focus on your app logic rather than the infrastructure around it."
Publishing:
Key authentication is easiest (just pass a key)
SAS (recommended) includes resource, expiry and a signature
RBAC for subscription & Mgmt access
Webhooks:
At the time of event subscription creation/update, Event Grid posts a "SubscriptionValidationEvent" event to the target endpoint.
The event contains a header value "Aeg-Event-Type: SubscriptionValidation".
The event body has the same schema as other Event Grid events.
The event data includes a "validationCode" property with a randomly generated string. For example, "validationCode: acb13…".
Only HTTPS is supported
Contoso Construction Machinery - manufacture tractors, digging equipment, and other heavy machinery.
push real-time information to customers regarding equipment maintenance, systems health, and contract updates
All of this goes to various endpoints including your app, customer endpoints, and other infrastructure customers had setup.
Event Domains allows you to model Contoso Construction Machinery as a single eventing entity.
Each of your customers is represented as a Topic within the Domain, handling authentication and authorization using Azure AD
Each of your customers can subscribe to their Topic and get the events delivered to them, but AAD and the Event Domain block them from accessing another tenant’s Topic.
Provides a single endpoint which you can publish all of your customer events to, and Event Grid will take care of making sure each Topic is only aware of events scoped to its tenant.
Service Bus: High-value enterprise messaging - Order processing and financial transactions
Event Hubs: Big data pipeline - Telemetry and distributed data streaming
Event Grid: Reactive programming - React to status changes