Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Serverless architectures: Event-based Microservices with Azure Functions, EventGrid & Co.

Serverless architectures: Event-based Microservices with Azure Functions, EventGrid & Co.

Whaaat? No servers? Well, yes. The Serverless approach for building microservices promises to offer a low entry barrier - for both getting starting and for fulfilling a target. In this session Christian & Boris will show you end-to-end Serverless with Azure & ..NET/NET Core by means of a realistic application scenario from customer projects. Based on proven design patterns you can build simple & complex applications scenarios with Azure Functions, Azure Event Grid, Azure Cosmos DB, Azure Storage & friends. Locally and in the cloud. One of the central key concepts here is thinking in events in order to trigger actions like sending messages, retrieving data or pushing information to destinations. Come and join this session, maybe you will face some new ideas for your future business software.

Christian Weyer

April 21, 2018
Tweet

More Decks by Christian Weyer

Other Decks in Programming

Transcript

  1. #Serverless architectures: Event-based Microservices with Azure Functions, EventGrid & Co.

    Christian Weyer @christianweyer CTO Boris Wilhelms @boriswilhelms Architect
  2. § Co-founder, co-owner and CTO at Thinktecture AG § Focus

    on § Mobile & web-based application architectures § Pragmatic end-to-end solutions § Cloud-native architectures § Microsoft MVP for ASP.NET (Architecture) ASPInsider, AzureInsider § Google GDE for Web Technologies § [email protected] § ! @christianweyer § Consultant and Architect at Thinktecture AG § Focus on § Cloud-native & serverless architectures " § Mobile & web-based application architectures § .NET Core § [email protected] § ! @boriswilhelms Event-based Microservices with Azure Functions, EventGrid & Co. Serverless architectures Christian Weyer Boris Wilhelms 2
  3. 3 § Microservices, Nanoservices, Picoservices § Serverless § Compute §

    Database § Eventing § Summary Serverless architectures Topics Event-based Microservices with Azure Functions, EventGrid & Co.
  4. 6 § We can choose from a continuum § VM

    ➔ § Containers ➔ § Orchestrators ➔ § PaaS ➔ § Serverless Serverless architectures Evolution to Cloud Compute Continuum PaaS IaaS On-Premises Serverless Event-based Microservices with Azure Functions, EventGrid & Co.
  5. 8 § Serverless Compute → Azure Functions § Serverless Database

    → Azure Cosmos DB § Serverless Events → Azure Event Grid § Serverless Workflows → Azure Durable Functions & Azure Logic Apps § Serverless IoT → Azure IoT Hub § Serverless Analytics → Application Insights ... and more ... https://azure.microsoft.com/en-us/overview/serverless-computing/ Serverless architectures Serverless in Azure (Serverless != FaaS-only) Event-based Microservices with Azure Functions, EventGrid & Co.
  6. § PaaS / AaaS § IdentityServer § Functions § HTTP-triggered

    § Database-triggered § Triggered through IoT data § Database § Subscribing to collection changes § IoT § Secure device connectivity & communication § Events § Subscribing to system events § Publishing custom application- specific events Serverless architectures Demo Scenario: Home Automation with Serverless Event-based Microservices with Azure Functions, EventGrid & Co. 10
  7. 12 Azure Functions Serverless Code / Compute Serverless architectures Event-based

    Microservices with Azure Functions, EventGrid & Co.
  8. 13 § Azure Functions is code being triggered by an

    event § Focused code + events § Basic principles enable powerful use cases § Events -> Triggers § Bindings § Two ways of operation § Cost-optimized, automatic scale § Always-on, via Azure App Service § V2 runtime built on .NET Core § Available for self-hosting Serverless architectures Azure Functions: Functions-as-a-Service Event-based Microservices with Azure Functions, EventGrid & Co.
  9. 14 § Incoming event triggers function § Input bindings enable

    easy access to data from various data sources § Output bindings offer easy access to outbound data sinks § Custom triggers and bindings can be implemented Serverless architectures Triggers & Bindings Event-based Microservices with Azure Functions, EventGrid & Co. https://docs.microsoft.com/en-us/azure/azure-functions/functions-triggers-bindings
  10. 15 § In portal, via CLI, or in IDE §

    Visual Studio wizards for pre-compiled Functions § Local tooling & runtime available § Debugging locally or remote § Multiple language bindings supported § C# & C# Script (CSX) § F# § JavaScript, TypeScript (node.js) § Python § Php § Java (preview) § Bash, Batch, PowerShell Serverless architectures Developing Functions Event-based Microservices with Azure Functions, EventGrid & Co.
  11. 16 Serverless architectures Functions Illustrated - Exemplary Your code logic

    Runtime Azure Function HTTP Trigger Storage Input Binding Push Notification Output Binding Database Output Binding Email Output Binding Event-based Microservices with Azure Functions, EventGrid & Co.
  12. 18 § Azure Portal § Azure CLI / PowerShell §

    Visual Studio wizards § Container (v2) § Continuous integration § Git § GitHub § Bitbucket § VSTS § DropBox, OneDrive Serverless architectures Deployment Options Event-based Microservices with Azure Functions, EventGrid & Co.
  13. 20 § Globally distributed, elastically scalable § Fully managed by

    Azure § Multi-model database § Key-value, document, graph § Multiple APIs § DocumentDB, with SQL & JS APIs § MongoDB API § Cassandra API § Table Storage API § Graph Database with Gremlin API § No database schema management Serverless architectures Cosmos DB: A Database with Many Faces Event-based Microservices with Azure Functions, EventGrid & Co.
  14. 21 § Building event-driven architectures with Cosmos DB § Use

    as input binding in Functions § Subscribe to collection changes § Can be used as a trigger for Functions Serverless architectures Cosmos DB Change Feed Event-based Microservices with Azure Functions, EventGrid & Co.
  15. 23 § Fully-managed centralized event routing service § Simplifies development

    of event-based applications § Simplifies creation of serverless workflows § Manages all routing of events § From any source, to any destination, for any application § Eventing, not enterprise messaging § Supports direct event filtering using event type, prefix or suffix § Your application will only need to receive the events you care about § Same underlying model for different use-cases § System-provided events § Custom application-specific events Serverless architectures Event Grid Event-based Microservices with Azure Functions, EventGrid & Co.
  16. 26 § Serverless is just one option in the Cloud

    Continuum § Always think about the use cases and requirements § Serverless Azure tries to offer solutions in the Continuum – mixture of PaaS & FaaS § Functions § Cosmos DB § Event Grid § … & more § It is not about Windows & .NET - it is about any OS, any platform, any language – any solution J Summary Serverless architectures Event-based Microservices with Azure Functions, EventGrid & Co.
  17. Serverless architectures: Event-based Microservices with Azure Functions, EventGrid & Co.

    Christian Weyer [email protected] @christianweyer Boris Wilhelms [email protected] @boriswilhelms Thank you! https://github.com/thinktecture/globalazurebootcamp-2018-serverless