Microsoft Azure Introduction to Azure Event Grid Callon Campbell - @flying_maverick Systems Architect
Microsoft Azure About me Callon Campbell Systems Architect / Developer with 20 years of experience developing desktop, mobile and web enterprise applications using .NET, SQL Server, Mobile and Azure technologies. Co-creator of ReflectInsight, a .NET logging framework and a real-time Live Log Viewer. 2 Email: CallonCampbell@Outlook.com Twitter: @Flying_Maverick Blog: http://TheFlyingMaverick.com LinkedIn: LinkedIn.com/in/calloncampbell Website: http://ReflectInsight.com Slideshare: https://www.slideshare.net/calloncampbell
Microsoft Azure Azure serverless offerings There are three components to Azure serverless: 5
Microsoft Azure What is Event Grid? •New messaging service for event-based architectures •Fully-managed event routing service utilizing a publisher-subscriber model • Built-in support for events coming from other Azure services • Handles routing and delivery of events from a number of sources and subscribers • Is agnostic to any language or platform 6
Microsoft Azure Why use Event Grid? •Designed for reactive, event-driven apps • perfect for your serverless and microservice apps •Reliable event delivery at massive scale •High availability, consistent performance, and dynamic scale 7
Microsoft Azure Anatomy of Event Grid Events - What happened Event sources/publishers - Where the event took place Topics - The endpoint where publishers send events Event subscriptions - The endpoint or built-in mechanism to route events, sometimes to multiple handlers Event handlers - The app or service reacting to the event Filters – Can be applied to event types or event subject 9
Microsoft Azure Topics and Subscriptions 10
Microsoft Azure Another messaging solution 12
Microsoft Azure Differences from other message queue services •Event Hub – used for ingesting high velocity telemetry data from sensors and other streaming sources •Service Bus – Created to enable hybrid connectivity between on-premises enterprise applications behind the firewall to securely connect with cloud services 13
Microsoft Azure With Azure Event Grid •Its centered around speed, scale, breadth, and low cost •Its a lightweight notification of a condition or state change •Rather than being a general/generic messaging service, Event Grid is built specifically for serverless architectures 14
Microsoft Azure Message Schema • Events are sent to Azure Event Grid in an array, which can contain multiple event objects • The array can have a total size of up to 1 MB. Each event in the array is limited to 64 KB 15
Microsoft Azure Reliable Delivery •Event Grid uses HTTP response codes to acknowledge receipt of events. In the event of failure Event Grid retries delivery •Uses an exponential back off retry policy for event deliver (10s, 30s, 1m, 5m, 10m, 30m, 1 hr) •Retry duration expires after 24 hr 16
Microsoft Azure Security and Authentication Azure Event Grid has three types of authentication: •Event subscriptions •Event publishing •WebHook event delivery 17
Microsoft Azure Webhook Endpoints When registering your own WebHook endpoint - Event Grid sends you a POST request with a simple validation code to prove endpoint ownership. Your app needs to respond by echoing back the validation code 18
Microsoft Azure Common scenarios for Event Grid 19
Microsoft Azure Serverless application architectures Azure Event Grid is designed to be used in microservices and event based architectures 20
Microsoft Azure Ops Automation Event Grid allows you to speed automation and simplify policy enforcement 21
Microsoft Azure Application integration Event Grid is used to connect your app to other services 22
Microsoft Azure Pricing 23
Microsoft Azure Pricing • Azure Event Grid uses a pay-per-event pricing model, so you only pay for what you use • The first 100,000 operations per month are free • Price per million operations are $0.73 • Operations are defined as • event ingress • advanced match • delivery attempt • management calls 24
Microsoft Azure Scenario 1 •You publish 5 million events to Event Grid in a month •All events are published to 1 https endpoint •Total monthly cost is $7.223 25
Microsoft Azure Scenario 2 •You publish 5 million events to Event Grid in a month. •All events are published to 2 https endpoints •1 million of the events require advanced matching •Total monthly cost is $11.60 26
Microsoft Azure Scenario 3 •You publish 5 million events to Event Grid in a month •All events are published to 2 https endpoints •1 million of the events require advanced matching •1 million of the events required 2 delivery attempts •Total monthly cost is $12.33 27
Demo
Microsoft Azure A serverless sample 29
Microsoft Azure Summary 30
Microsoft Azure Summary •Event Grid is much lighter than the other messaging services available in Azure •Event Grid can be used as intra-service communication for microservice and serverless applications •Azure Event Grid manages all routing of events from any source, to any destination, for any application 31
Microsoft Azure Summary (cont) Azure Event Grid is truly a game-changing service and is a key component to Microsoft’s serverless strategy 32
Microsoft Azure Thank you! CallonCampbell@Outlook.com TheFlyingMaverick.com @Flying_Maverick 33
Microsoft Azure References • https://azure.com/eventgrid • Azure Event Grid Documentation • Azure Event Grid event schema • Choose between Azure services that deliver messages • Pricing 34

Introduction to Azure Event Grid

  • 1.
    Microsoft Azure Introduction toAzure Event Grid Callon Campbell - @flying_maverick Systems Architect
  • 2.
    Microsoft Azure About me CallonCampbell Systems Architect / Developer with 20 years of experience developing desktop, mobile and web enterprise applications using .NET, SQL Server, Mobile and Azure technologies. Co-creator of ReflectInsight, a .NET logging framework and a real-time Live Log Viewer. 2 Email: CallonCampbell@Outlook.com Twitter: @Flying_Maverick Blog: http://TheFlyingMaverick.com LinkedIn: LinkedIn.com/in/calloncampbell Website: http://ReflectInsight.com Slideshare: https://www.slideshare.net/calloncampbell
  • 3.
    Microsoft Azure Azure serverlessofferings There are three components to Azure serverless: 5
  • 4.
    Microsoft Azure What isEvent Grid? •New messaging service for event-based architectures •Fully-managed event routing service utilizing a publisher-subscriber model • Built-in support for events coming from other Azure services • Handles routing and delivery of events from a number of sources and subscribers • Is agnostic to any language or platform 6
  • 5.
    Microsoft Azure Why useEvent Grid? •Designed for reactive, event-driven apps • perfect for your serverless and microservice apps •Reliable event delivery at massive scale •High availability, consistent performance, and dynamic scale 7
  • 6.
    Microsoft Azure Anatomy ofEvent Grid Events - What happened Event sources/publishers - Where the event took place Topics - The endpoint where publishers send events Event subscriptions - The endpoint or built-in mechanism to route events, sometimes to multiple handlers Event handlers - The app or service reacting to the event Filters – Can be applied to event types or event subject 9
  • 7.
  • 8.
  • 9.
    Microsoft Azure Differences fromother message queue services •Event Hub – used for ingesting high velocity telemetry data from sensors and other streaming sources •Service Bus – Created to enable hybrid connectivity between on-premises enterprise applications behind the firewall to securely connect with cloud services 13
  • 10.
    Microsoft Azure With AzureEvent Grid •Its centered around speed, scale, breadth, and low cost •Its a lightweight notification of a condition or state change •Rather than being a general/generic messaging service, Event Grid is built specifically for serverless architectures 14
  • 11.
    Microsoft Azure Message Schema •Events are sent to Azure Event Grid in an array, which can contain multiple event objects • The array can have a total size of up to 1 MB. Each event in the array is limited to 64 KB 15
  • 12.
    Microsoft Azure Reliable Delivery •EventGrid uses HTTP response codes to acknowledge receipt of events. In the event of failure Event Grid retries delivery •Uses an exponential back off retry policy for event deliver (10s, 30s, 1m, 5m, 10m, 30m, 1 hr) •Retry duration expires after 24 hr 16
  • 13.
    Microsoft Azure Security andAuthentication Azure Event Grid has three types of authentication: •Event subscriptions •Event publishing •WebHook event delivery 17
  • 14.
    Microsoft Azure Webhook Endpoints Whenregistering your own WebHook endpoint - Event Grid sends you a POST request with a simple validation code to prove endpoint ownership. Your app needs to respond by echoing back the validation code 18
  • 15.
  • 16.
    Microsoft Azure Serverless applicationarchitectures Azure Event Grid is designed to be used in microservices and event based architectures 20
  • 17.
    Microsoft Azure Ops Automation EventGrid allows you to speed automation and simplify policy enforcement 21
  • 18.
    Microsoft Azure Application integration EventGrid is used to connect your app to other services 22
  • 19.
  • 20.
    Microsoft Azure Pricing • AzureEvent Grid uses a pay-per-event pricing model, so you only pay for what you use • The first 100,000 operations per month are free • Price per million operations are $0.73 • Operations are defined as • event ingress • advanced match • delivery attempt • management calls 24
  • 21.
    Microsoft Azure Scenario 1 •Youpublish 5 million events to Event Grid in a month •All events are published to 1 https endpoint •Total monthly cost is $7.223 25
  • 22.
    Microsoft Azure Scenario 2 •Youpublish 5 million events to Event Grid in a month. •All events are published to 2 https endpoints •1 million of the events require advanced matching •Total monthly cost is $11.60 26
  • 23.
    Microsoft Azure Scenario 3 •Youpublish 5 million events to Event Grid in a month •All events are published to 2 https endpoints •1 million of the events require advanced matching •1 million of the events required 2 delivery attempts •Total monthly cost is $12.33 27
  • 24.
  • 25.
  • 26.
  • 27.
    Microsoft Azure Summary •Event Gridis much lighter than the other messaging services available in Azure •Event Grid can be used as intra-service communication for microservice and serverless applications •Azure Event Grid manages all routing of events from any source, to any destination, for any application 31
  • 28.
    Microsoft Azure Summary (cont) AzureEvent Grid is truly a game-changing service and is a key component to Microsoft’s serverless strategy 32
  • 29.
  • 30.
    Microsoft Azure References • https://azure.com/eventgrid •Azure Event Grid Documentation • Azure Event Grid event schema • Choose between Azure services that deliver messages • Pricing 34

Editor's Notes

  • #4 The essence of serverless is less server. The details of the server are abstracted away from you. You don’t need to worry about optimizing which operating system to run on, patching, etc Don’t need to worry about optimizing utilization and scaling up and down for demand Event driven process Tell Azure how or when to run your code (is it based on a schedule, or when a new customer is added to salesforce, or when items are added to a queue, a table or storage, etc) Micro build You’re only charged for the usage.
  • #5 Dynamically and elastically scale to meet demand. Allows you as the developer to focus on your business logic. Everything else is taken cared for you. This drastically increases time to market.
  • #6 It’s now becoming easier than ever to create small, targeted microservice architecture using a variety of services. Azure provides services like Azure Functions, Logic Apps, and Event Grid that can help you achieve a low-friction, high-throughput and low-cost solution.
  • #7 3. Simply select the Azure resource you would like to subscribe to, and give the event handler or webhook endpoint to send the event to. 5. While Event Grid integrates natively with Azure Services, it can just as easily be leveraged by anything that supports the HTTP protocol.
  • #8 Event Grid plugs the gap existing in Microsoft’s Serverless platform and brings together event publishers and event consumers in a loosely coupled form.
  • #10 Subscriptions are also used by handlers to intelligently filter incoming events.
  • #11 Event Grid is similar to Azure Service Bus in that a Topic is an endpoint that receives messages, and a Subscription is used to receive messages through the Topic that will be handled by a message listener. These concepts are basically the same, but there are some differences in how they work. Event Grid uses a concept of events instead of messages since it’s an event-based messaging system. Because its based on events, it lends itself nicely to microservice architectures using serverless compute options like Azure Functions and Logic Apps. NOTE: If using Azure Functions as your handler, use the Event Grid trigger over the generic HTTP trigger as it automatically validates Event Grid Function triggers.
  • #14 For existing users of Azure, Event Grid might remind you of Event Hubs or Service Bus but Event Grid is very different from these two services.
  • #16 1b. If there is only a single event, the array has a length of 1
  • #19 Event Grid won’t deliver events to WebHook endpoints that haven't passed validation
  • #21 It can be used in a serverless application to connect data sources and event handlers. In this example, use Event Grid to trigger a serverless function to run image analysis each time an image is added to blob storage
  • #22 2. In an ops automation scenario you can notify Azure Automation when virtual machines are created, or when a SQL database is spun up.
  • #23 3. Finally you can use Event grid to connect your application with other services. The possibilities are really limited by your imagination.
  • #25 Click to show more pricing scenarios https://azure.microsoft.com/en-ca/pricing/details/event-grid/
  • #29 https://portal.azure.com/ I’ll now show you how to get started creating and running a simple HttpTrigger function from the Azure Portal.
  • #30 This example is curtesy of MSDN Magazine and illustrates how you can use Event Grid to pass events or commands to Azure Functions and Logic Apps. https://msdn.microsoft.com/en-ca/magazine/mt829271/ I’ll simulate an HR application from PostMan and send an event to a specific topic in Event Grid
  • #32 As Microsoft keeps adding additional event sources, Event Grid becomes more useful and powerful. It will evolve as an ultimate messaging channel to receive every notification related to the current state of a workload deployed in Azure.
  • #33 Microsoft is making inroads with its serverless strategy and Event Grid has the potential to become one of the key pillars in their Azure Serverless platform