Tag: Azure Event Grid

AzureCloudUncategorized

How to choose Azure services for working with messages in your application | Azure Friday

In this episode of Azure Friday, Azure MVP Barry “Azure Barry” Luijbregts joins Scott Hanselman to outline how you can choose the right services for working with messages and events in your application.

[0:00:48] – Presentation

Source: Channel 9

Resources

ArchitectureAzureEvents

BRK3341 – Architect your solution with queues, grids, and hubs: When to use which and for what

image

Azure provides a lot of messaging solutions and it can become overwhelming for architects and developers to know when to use which server and for what use case. In this talk, Bahram Banisadr will show real life scenarios, code and discuss architecture patterns for messaging and events using Azure Event Hubs, Service Bus, Event Grid, and Storage Queues.

image

Watch the session for more details.

Enjoy!

References

BRK3341 – Architect your solution with queues, grids, and hubs: When to use which and for what

Microsoft Ignite 2018

Azure Event Grid

Azure Event Hubs

Azure Service Bus

Azure Storage Queues

Azure

Getting started with Azure Event Grid Extension for Visual Studio Code

I love Visual Studio Code and all the extensions that are available. It has become my preferred editor for almost everything (replacing Notepad++), except for when developing in Visual Studio.

Recently there is a new extension that was made available for working with Azure Event Grid. Typically when working with Azure Event Grid I use a tool called Postman to send test messages to my Azure Event Grid resource. But now with this latest extension you can use Visual Studio Code.

In this post I’ll walk through how to get started and use the Azure Event Grid extension for Visual Studio Code. Let’s get started.

Prerequisites

Before we can begin we need to make sure we have the following installed and setup:

  1. An Azure Subscription. If you don’t have an Azure Account, you can sign up for one today for free and receive $200 in credits by selecting "Create a Free Azure Account…" or selecting "View->Command Palette" and searching for "Azure: Create an Account"
  2. Install Visual Studio Code
  3. Visual Studio Code Extensions:
    • Install extension Azure Tools for Visual Studio Code
    • Install extension Azure Event Grid

Connecting to your Azure Subscription

First thing we need to do is connect to your Azure subscription. This will happen automatically when you go to the Azure tab in Visual Studio Code. You can also sign in from the Command palette and searching for “Azure: Login”.

image

image

image

Create an Event Grid Topic

Now that you’re signed in, let’s go ahead and create an Event Grid topic.

1. In the Event Grid Topics pane, click on the + button to create a new topic:

image

2. Then select your Azure Subscription to associate this topic with:

image

3. Now provide a topic name. I will use “VSCodeEventGridTopicDemo” for my demo:

image

4. Next select a resource group for your topic. I will use  “RGVSCodeEventGridDemo” for my demo:

image

5. Select your location for the resources:

sshot-636

6. Done. In a few seconds your Azure Event Grid will be created and displayed in Visual Studio Code:

image

image

You can login to your Azure Subscription and see everything we just created. Keep your Azure Subscription loaded in the browser as we’ll use it for the next section.

image

Create Event Grid Subscription

Now that we have an Event Grid Topic setup we need to create a subscription to receive the events we send it.

1. Here I will create a new Azure Function app:

image

2. Now create a new Event Grid Trigger function and after it’s created click on the Add Event Grid subscription link:

image

3. Fill in the details relating to the Azure Event Grid Topic we created earlier and then press the Create button:

image

Your Event Grid Topic now has an Event Grid Subscription and is ready to test!

Generating Mock Events

Apart from managing your Event Grids resources in Visual Studio Code, you can also generate and send mock events which is great for testing purposes. Instead of using Postman to do this, I find the Event Grid Extension better and mocking and sending events. So let’s get started now mocking some events.

1. To generate a mocked event, right click on your Event Grid Subscription in Visual Studio Code and select Create Mock Event Generator:

image

2. A new file will be created with all the details for generating mocked events for this subscription. The pattern property is defined with regex patterns for generating random data. You will noticed I changed the data section pattern value with regex pattern to generate the mocked data for my event:

image

3. At the top of the event generator file will be two links: Send Events and Preview Events. The actions do exactly as they say and are what you want to use when generating your mocked events.

image

4. If we click on Preview Events, another file is created with a preview of mocked event data to be sent. Notice the different values between the events. This is from the regex logic defined in the event generator. This can be customized to generate data appropriate for your needs.

image

5. Now click on Send Events link at the top of the event generator file and go to your Azure Portal where you previously defined your Azure Function for your Event Grid Topic, and you will see in the logs your mocked events:

sshot-647

As you can see the Azure Event Grid extension for Visual Studio Code is very powerful and is a handy tool to use in your Azure development.

Enjoy!

Reference

Create your free Azure account

Azure Event Grid Overview

Azure Event Grid Documentation

Introduction to Azure serverless with Azure Functions, Logic Apps and Azure Event Grid

AIAzureDevelopmentEventsProductivity

Microsoft Build 2018–Day 2 Highlights

Today’s keynote by Joe Belfiore was focused on Multi-sense + Multi-device for Microsoft 365, which is Windows, Office and EMS

Image showing how Microsoft 365 brings together Office 365, Windows 10, and Enterprise Mobility + Security (EMS), a complete, intelligent, and secure solution to empower employees.

Announcements

  • Fluent Design System updates.
  • UWP XAML Islands, which lets you incorporate UWP into WinForms, WPF and Win32 applications. This also means you can start to bring in the Fluent Design System into these UI frameworks.
  • Windows UI Library, which brings native platform controls as NuGet packages instead of being tied to the OS version. This will work from the Windows Anniversary Update and newer.
  • .NET Core 3.0, which will support side-by-side runtimes, along with support for WinForms, WPF and UWP.
  • MSIX, which is dubbed the best technology for installing applications on Windows. This inherits the Universal Windows Platform (UWP) features, works across Enterprise or Store distributions, and supports all Windows applications.
  • Windows SDK Insider Preview – https://aka.ms/winsdk
  • New developer revenue sharing model. Developers will get 85% when their app is found in the Microsoft store, and 95% when you provide your customers to your app in the Microsoft store.
  • Microsoft Launcher on Android will support Timeline for cross-device application launching. On iOS this will be supported through Microsoft Edge.
  • A new “Your Phone” experience coming soon to Windows 10 that enables you to see your connected phone text messages, photos and notifications and then interact with them without having to use your phone. Really neat experience – now if only they support Windows Mobile 10 Smile
  • Microsoft Sets was officially shown and demonstrated how it can be used for an easier way to organize your work and allow you to get back to work where you left off when ready. This means not having to have 25+ tabs open in Chrome or Edge. Nice!
  • Adaptive Cards is being added to Microsoft 365, which will enable developers to create rich interactive content within conversations. They demonstrated a GitHub Adaptive Card for Outlook (365) where you could comment and close an issue. Another example shown was paying for your invoice from an email.
  • There was a lot of buzz for Microsoft Graph, which is core to the Microsoft 365 platform. Microsoft Graph helps developers connect the dots between people, schedules, conversations, and content within the Microsoft cloud.
  • Cortana and Alexa start speaking to one another. Sometime in the future you will be able to access your Alexa device through Windows 10 and likewise on an Amazon Echo you will ne able to speak to Cortana.

Enjoy!

References

https://developer.microsoft.com/en-us/events/build

Modernizing applications for our multi-sense, multi-device world

Microsoft 365 empowers developers to build intelligent apps for where and how the world works

AIAzureDevelopmentEventsProductivity

Microsoft Build 2018 – Day 1 Highlights

This is my first attendance at the annual Microsoft Build conference taking place in Seattle, WA. I have to tell you that so far I’m not disappointed. Here are some of the highlights from today’s events:

  • Azure is becoming the world’s computer: Azure | Azure Stack | Azure IoT Edge | Azure Sphere.
  • Azure IoT Edge runtime which runs on Windows or Linux is now being open sourced.
  • Microsoft showed off Cortana and Alexa integration which was pretty cool.
  • New Azure AI infrastructure announced: Project Brainwave which is a real-time AI on cloud and edge devices.
  • Announced Project Kinect for Azure, an Azure AI-enabled edge device.
  • Visual Studio Live Share is now generally available. This provides real-time collaborative development, shared debugging, independent views and works across Visual Studio and Visual Studio Code (Windows, Mac and Linux).
  • Azure Event Grid is getting new improvements like dead lettering (DLQ) and custom retry policies. Event Grid is also adding new event publishers for Azure Media Services and Azure Container Registry, and new event handlers for Storage Queue and Relay Hybrid Connections. Finally Azure Event Grid is providing an alternative form of endpoint validation. Event Grid provides reliable event delivery at massive scale (millions of events per second), and it eliminates long polling and hammer polling, and the associated costs of latency.
  • Azure Cosmos had some interesting updates like the new multi-master write support. It also provides API support for MongoDB, SQL, Table Storage, Gremlin Graph, Spark, and Casandra.
  • Azure Search now integrates Azure Cognitive Services to provide built-in enrichment of content using AI models, and it enables immersive search experiences over any data.
  • The Fluent Design System which Microsoft first debuted at Build 2017, is expanding beyond Universal Windows Platform (UWP) apps and will be available for Windows Forms, WPF and native Win32 applications.
  • Windows Timeline is coming to iOS and Android.
  • Azure Functions updates: Durable Functions reaches general availability, and Azure Functions now leverages the App Service Diagnostics.
  • .NET Core 3.0 and .NET Framework 4.8 announced were announced, and .NET Core 3.0 is coming to desktop development (awesome!)
  • Visual Studio 2017 version 15.7 and the next update version 15.8 preview 1 were released.
  • Visual Studio App Center integration with GitHub.
    • Visual Studio IntelliCode announced, which brings you the next generation of developer productivity by providing AI-assisted development.

    This already feels like a lot but really it’s just scratching the surface. I’m looking forward to what is announced today in the keynote followed by more technical workshops and sessions.

    Enjoy!

    References

    https://developer.microsoft.com/en-us/events/build

    AzureEvents

    Global Azure Bootcamp 2018

    This coming weekend will be the 6th Global Azure Bootcamp, which is a worldwide series of one day technical learning events for Azure. This event is created and hosted by the leaders from the global cloud developer community.

    This will be my first year attending the event and I’m honored to be one of the presenters at not one but two events in Mississauga and Kitchener/Waterloo region in Ontario, Canada. I’ll be speaking about Azure Event Grid and how it can be used in a serverless architecture in the cloud.

    “The Global Azure Bootcamp is community at its finest. We are incredibly excited to see community leaders around the world rise up and help developers build the skills they need in today’s cloud-driven business environment. We’re here to help each of these community led events be a success and can’t wait to continue our decades-long commitment to the worldwide developer community,” says Jeff Sandquist, General Manager of the Azure Platform Experiences Group at Microsoft.

    Map

    I hope you’re able to attend one of the events happening this weekend around the world and learn something new about Azure.

    Enjoy!

    Resources

    https://global.azurebootcamp.net/

    https://azure.microsoft.com/en-ca/blog/globalazure-bootcamp-2018/

    Azure

    Introduction to Azure serverless with Azure Functions, Logic Apps and Azure Event Grid

    image

    In this blog post I’ll introduce you to what is serverless and then what services in Azure provide serverless capabilities. First let’s define what is serverless.

    What is the definition of Serverless

    • It’s an abstraction of servers. This doesn’t mean there are no servers, there are still servers behind the scenes but this means you don’t need to worry about optimizing which OS to run, about OS patching, etc. You also don’t need to worry about optimizing utilization and scaling up and down for demand. Think of it as less server more code.
    • It’s an event driven process. You simple tell Azure how or when to run your code. This could be based on a schedule or when a new customer is added to Salesforce, or when items are added to a queue, to a table storage, etc.
    • It’s micro-billing. This means you’re only charged for your usage.

    The benefits of serverless

    • Reduced DevOps – You can dynamically and elastically scale to meet demand.
    • Focus on Business Logic – Allows you as the developer to focus on your business logic and everything else is taken cared of for you. No need to provision resources and wait on ITOPS. In some cases you can design and develop your serverless code offline.
    • Faster Time to Market – By focusing on your business logic and features, you’re able to drastically increase time to market.

    Let’s now look at three Azure services that provide serverless capabilities.

    1. Azure Functions

    image

    Azure Functions is an event driven, compute-on-demand experience. You can easily and quickly build the apps you need using simple serverless functions that scale and meet demand and you only pay for your usage.

    You can use the programming language of your choice like C#, F#, JavaScript, PHP, Python, Java or using scripting tools like Bash or PowerShell. You can develop on Windows, Linux or Mac. You can deploy on Windows or Linux. You can choose from using either the full .NET Framework or the .NET Core runtimes.

    Azure Functions allows you to bind into services. This means you can integrate Azure Functions into Cosmos DB, Logic Apps, queues, table storage, on premise and so much more.

    With Azure Functions you simply provide your code and then let Azure take care of the rest…meaning that when an event happens, Azure will automatically take care of everything to run that code at scale.

         

    2. Logic App Service

    Azure Logic Apps are built around the idea of events, triggers and workflows. When you think about building microservices, there are a lot of moving parts to manage. Azure Logic Apps lets you stitch them all together much more easily and provides you with a central place to build and manage all of your event-driven services.

    Logic Apps are a fully managed iPaaS (integration Platform as a Service) that provide serverless workflows that allow developers to easily integrate data with their apps instead of writing complex glue code between disparate systems. This allows you to orchestrate and connect the serverless functions and APIs of your applications.

    Benefits of Logic Apps

    1. You can quickly tap into the power of the cloud and fire events from other services.

    image

    2. You can orchestrate almost anything:

    • Run mission-critical, complex integration scenarios with ease
    • Connect on-premises, hybrid and cloud applications
    • Position for future with API centric connectivity
    • Easily connect custom on-premises applications to the cloud

    image

    Connectors

    At the time of this post there are over 200 connectors available out of the box. Connectors reduce integration challenges and enable you to quickly and easily connect apps, data and devices anywhere.

    Creating a Logic App

    The following is a sample Logic App. As you can see you simply string together Connectors, Triggers, Conditions and Actions to form the basis of your Logic App. When your Logic App is running you can monitor and inspect each run iteration and see what data came in and the path it took through the Logic App.

    image

    In summary Logic Apps is the workflow engine built for the cloud with cloud scale, massive compute and high availability built in.

    3. Azure Event Grid

    Finally there is Azure Event Grid which is a messaging service built to easily build application with event-based architectures. You simply select the Azure resource you would like to subscribe to, and give the event handler or webhook endpoint to send the event to. Event Grid also has built-in support for events coming from other Azure services, like resource groups, subscriptions, storage blobs, and event hubs.

    functional-model

    Topics and Subscriptions

    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 it uses a concept of events instead of messages since it’s an event-based messaging system, and because Event Grid is based on events, it lends itself nicely to microservice architectures using serverless compute options like Azure Functions and Logic Apps in addition to other implementations.

    There are also more differences between Azure Event Grid and other message queue services. The capabilities of Azure Event Grid are centered around speed, scale, breadth, and low cost. Rather than being a general / generic messaging service, Azure Event Grid is built specifically for Serverless architectures.

    Event Publishers

    Currently Azure Event Grid has built in support for the following event publishers:

    • Event Hubs
    • IoT Hubs
    • Storage
    • Blog Storage
    • Custom Topics
    • Azure Subscriptions (management operations)
    • Resource Groups (management operations)

    Event Handlers

    Currently the following Azure services have built-in handler support for Event Grid:

    • Azure Functions
    • Logic Apps
    • Event Hubs
    • Webhooks
    • Azure Automation
    • Microsoft Flow

    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.

    Azure Event Grid is built specifically for Serverless architectures.

    Event Grid Architectures

    Azure Event Grid is designed to be used in microservices and event based architectures. It can be used in a serverless application to connect data sources and event handlers. In an ops automation scenario you can notify Azure Automation when virtual machines are created, or when a SQL database is spun up. Finally you can use Event grid to connect your application with other services. The possibilities are really limited by your imagination.

    EventGridArchitecture1

    Summary

    As you can see all three services provide a different component to the serverless story and each of them integrate nicely with each other. They each allow you to think less about the server and more about your code and you only pay for your usage. The best way to learn about these Azure serverless offerings is to create a free Azure account and try it out yourself.

    Enjoy!

    References

    Azure Functions

    Docs: An introduction to Azure Functions

    Logic App Service

    Docs: An introduction to Logic App

    Azure Event Grid

    Docs: An introduction to Azure Event Grid

    Webinar: Go serverless. Build apps faster and stop worrying about infrastructure.

    Report: Economics of Serverless Cloud Computing

    Attribution: This post uses one or more graphics from the official Azure Event Grid documentation, such as diagrams.