Slide 1

Slide 1 text

#Serverless architectures: Event-based Microservices with Azure Functions, EventGrid & Co. Christian Weyer @christianweyer CTO Boris Wilhelms @boriswilhelms Architect

Slide 2

Slide 2 text

§ 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

Slide 3

Slide 3 text

3 § Microservices, Nanoservices, Picoservices § Serverless § Compute § Database § Eventing § Summary Serverless architectures Topics Event-based Microservices with Azure Functions, EventGrid & Co.

Slide 4

Slide 4 text

4 Building & integrating software Microservices architectures Serverless architectures Event-based Microservices with Azure Functions, EventGrid & Co.

Slide 5

Slide 5 text

5 A different approach Serverless Serverless architectures Event-based Microservices with Azure Functions, EventGrid & Co.

Slide 6

Slide 6 text

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.

Slide 7

Slide 7 text

7 What is Serverless, anyway? Serverless architectures Event-based Microservices with Azure Functions, EventGrid & Co.

Slide 8

Slide 8 text

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.

Slide 9

Slide 9 text

9 Serverless Home Automation Demo Scenario Serverless architectures Event-based Microservices with Azure Functions, EventGrid & Co.

Slide 10

Slide 10 text

§ 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

Slide 11

Slide 11 text

Demo Scenario: Architecture Serverless architectures Event-based Microservices with Azure Functions, EventGrid & Co. Event Hub IoT Hub Cosmos DB App Service

Slide 12

Slide 12 text

12 Azure Functions Serverless Code / Compute Serverless architectures Event-based Microservices with Azure Functions, EventGrid & Co.

Slide 13

Slide 13 text

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.

Slide 14

Slide 14 text

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

Slide 15

Slide 15 text

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.

Slide 16

Slide 16 text

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.

Slide 17

Slide 17 text

17 Serverless architectures Triggers & Bindings in Code Event-based Microservices with Azure Functions, EventGrid & Co.

Slide 18

Slide 18 text

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.

Slide 19

Slide 19 text

19 Azure Cosmos DB Serverless Database Serverless architectures Event-based Microservices with Azure Functions, EventGrid & Co.

Slide 20

Slide 20 text

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.

Slide 21

Slide 21 text

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.

Slide 22

Slide 22 text

22 Azure Event Grid Serverless Eventing Serverless architectures Event-based Microservices with Azure Functions, EventGrid & Co.

Slide 23

Slide 23 text

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.

Slide 24

Slide 24 text

24 Event Grid Reliability & Performance Serverless architectures Event-based Microservices with Azure Functions, EventGrid & Co.

Slide 25

Slide 25 text

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

Slide 26

Slide 26 text

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.

Slide 27

Slide 27 text

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