Event-Driven Architectures with Event Grid

Develop for Azure Storage

Shahzad Mian

Content Developer, DataCamp

Introduction to Event driven architecture

 

Screenshot 2025-10-26 at 10.35.27 pm.png

  • Modern systems generate events all the time.
  • Azure Event Grid connects these events to the right services instantly.
  • It's the backbone of event-driven architecture in Azure.
Develop for Azure Storage

Event driven architecture

  • Explain what Azure Event Grid is and how it works.
    • Identify event sources and handlers.
    • Describe how Event Grid supports real-time, event-driven workflows.
    • Apply these concepts to Cipher Coffee's operations.

 

 

Event grid

1 https://azure.microsoft.com/en-us/blog/introducing-azure-event-grid-an-event-service-for-modern-applications/
Develop for Azure Storage

The challenge: Too many triggers

Screenshot 2025-10-27 at 6.41.44 pm.png

  • Cipher Coffee's systems constantly produce events:

    • A new blob is uploaded.
    • An order is placed.
    • Inventory data changes.
  • Polling occurs when applications constantly check for updates.

Develop for Azure Storage

Event Grid

Event grid image

 

 

 

  • Event Grid solves this by delivering notifications in real time.
Develop for Azure Storage

What is Event Grid?

Event grid diagram

  • Azure Event Grid is a fully managed event routing service.
  • It delivers events from publishers to subscribers automatically.

  • Uses a publish-subscribe model:

    • Publishers emit events (for example, Blob created).
    • Subscribers react to those events in real time.
  • Common subscribers include Azure Functions and Logic Apps.

Develop for Azure Storage

The event workflow

  • A publisher generates an event - for example, a new blob is created.
  • Event Grid picks up that event and routes it to subscribers.
  • The subscriber, like an Azure Function or Logic App, runs automatically.
  • Each connection is called an Event Subscription.

Event workflow

Develop for Azure Storage

Cipher Coffee example

  • Cipher Coffee's marketing team uploads a new product photo to Blob Storage.
  • That upload triggers Event Grid.
  • Event Grid forwards a notification to an Azure Function.
  • The Function automatically resizes the image and updates the website gallery.
  • No manual action, no waiting - instant automation.

Cipher Coffee example

Develop for Azure Storage

Event sources and handlers

Screenshot 2025-10-27 at 7.16.33 pm.png

  • Event Sources: where events originate.
    • Storage accounts, Resource Groups, Event Hubs, IoT Hubs.
  • Event Handlers: where events are delivered.
    • Azure Functions, Logic Apps, Webhooks, Service Bus Topics.
  • Event Grid connects them dynamically - no polling required.
Develop for Azure Storage

Event schema

  • Standard JSON

Screenshot 2025-12-03 at 3.22.25 pm.png

Develop for Azure Storage

System Events Vs Custom Events

Screenshot 2025-10-27 at 7.38.52 pm.png

  • System Events: automatically generated by Azure services.
    • Examples: blob created, VM deleted, resource updated.
  • Custom Events: events published by your own applications.
    • Example: Cipher Coffee's order service publishing "NewOrderCreated."
  • Both types follow the same event routing pattern.
Develop for Azure Storage

Benefits of Event Grid

  • Serverless and scalable - fully managed, no infrastructure to manage.

Cloud computing

  • Reliable delivery - includes retries and dead-lettering for failed events.

Hands shaking

  • Real-time reactions - delivers events in seconds.

Clock

  • Broad integration - works with Functions, Logic Apps, and third-party APIs.

Integration

Develop for Azure Storage

Event filtering and routing

  • Event Grid can filter events before delivery.
  • You can include filters by:
    • Event type (e.g., only Blob Created).
    • Subject pattern (e.g., files in "images/").
  • This ensures subscribers only receive relevant events.

Screenshot 2025-10-27 at 7.49.11 pm.png

Develop for Azure Storage

Let's practice!

Develop for Azure Storage

Preparing Video For Download...