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

Serverless-Szenarien mit Azure Functions & Co.:...

Serverless-Szenarien mit Azure Functions & Co.: Integration-as-a-Service

Wie bitte? Microsofts Azure-Cloud auf der W-JAX? Ja, in der Tat. Denn nicht immer muss oder soll es AWS oder GCP sein. Azure bietet mittlerweile eine holistische Plattform für so gut wie jede Cloud-Anforderung an. Auch und vor allem in den Bereichen Cloud-native und Serverless Functions investiert Microsoft sehr viel. In dieser Session zeigt Christian Weyer neben den Grundlagen vor allem typische Anwendungsszenarien für Azure Functions. Der Fokus soll dabei auf eventgetriebenen Integrationslösungen und Workflowszenarien liegen – hier bedarf es nicht immer Unmengen von Code, um ans Ziel zu kommen. Lehnen Sie sich also zurück und sehen Sie "die andere Cloud" in Action. Keine Angst vor Azure!

Christian Weyer

April 25, 2018
Tweet

More Decks by Christian Weyer

Other Decks in Programming

Transcript

  1. 2 § Co-founder, co-owner and CTO at Thinktecture AG §

    Focus on § Mobile & web-based application architectures § Interoperability, cross-device § Pragmatic end-to-end solutions § Cloud-native architectures § Microsoft MVP for ASP.NET (Architecture) ASPInsider, AzureInsider § Google GDE for Web Technologies § [email protected] § ! @christianweyer Christian Weyer Integration-as-a-Service Serverless-Szenarien mit Azure Functions & Co.
  2. 3 § Event-driven Integration § Azure Cloud § Serverless in

    Azure § Azure Functions § Azure Cosmos DB § Azure Event Grid § Summary Serverless-Szenarien mit Azure Functions & Co. Integration-as-a-Service Topics
  3. 5 § Need of integrating systems, applications, services, data §

    EAI: Enterprise Application Integration § B2B: Business-to-Business communication § B2C: Business-to-Consumer communication § Possible approaches & patterns § Microservices, Nanoservices, Picoservices – WTF? § Event-driven integration § Free choice of technical platform & framework § Can the Cloud offer value here? § Without having to always worry about too many (unnecessary) details… Serverless-Szenarien mit Azure Functions & Co. Integration-as-a-Service Integration-as-a-Service ?
  4. 7 § Why Azure? § Look beyond one’s own nose

    § Microsoft has always been strong in the enterprise § It is no longer “Windows Azure” J § Ca. 40% of VMs running on Linux (increasing) § Strong developer tooling § Very broad availability worldwide § German Azure as sovereign Cloud Serverless-Szenarien mit Azure Functions & Co. Integration-as-a-Service Azure Cloud https://www.cnbc.com/2017/10/28/microsoft-azure-is-growing-faster-than-aws-backed-by-big-brands.html
  5. 10 § We can choose from a continuum § VM

    ➔ § Containers ➔ § Orchestrators ➔ § PaaS ➔ § Serverless Serverless-Szenarien mit Azure Functions & Co. Integration-as-a-Service Evolution to Cloud Compute Continuum PaaS IaaS On-Premises Serverless
  6. 12 § Serverless Compute → Azure Functions § Serverless Database

    → Azure Cosmos DB § Serverless Events → Azure Event Grid § Serverless Workflows → Azure Logic Apps § Serverless IoT → Azure IoT Hub § Serverless Analytics → Azure Application Insights § ... and more ... https://azure.microsoft.com/en-us/overview/serverless-computing/ Integration-as-a-Service Serverless in Azure (Serverless != FaaS-only) Serverless-Szenarien mit Azure Functions & Co.
  7. 14 § 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 Integration-as-a-Service Azure Functions: Functions-as-a-Service Serverless-Szenarien mit Azure Functions & Co.
  8. 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 Integration-as-a-Service Developing Functions Serverless-Szenarien mit Azure Functions & Co.
  9. 16 § 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 Integration-as-a-Service Triggers & Bindings Serverless-Szenarien mit Azure Functions & Co. https://docs.microsoft.com/en-us/azure/azure-functions/functions-triggers-bindings
  10. 18 Integration-as-a-Service Functions Illustrated - Exemplary Your code logic Runtime

    Azure Function HTTP Trigger Custom Event Input Binding Storage Input Binding Push Notification Output Binding Database Output Binding Email Output Binding Serverless-Szenarien mit Azure Functions & Co.
  11. 19 § Azure Portal § Azure CLI / PowerShell §

    Visual Studio wizards § Container (v2) § Continuous integration § Git § GitHub § Bitbucket § VSTS § DropBox, OneDrive Integration-as-a-Service Deployment Options Serverless-Szenarien mit Azure Functions & Co.
  12. 21 § 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 Integration-as-a-Service Cosmos DB: A Database with Many Faces Serverless-Szenarien mit Azure Functions & Co.
  13. 22 § 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 Integration-as-a-Service Cosmos DB Change Feed Serverless-Szenarien mit Azure Functions & Co.
  14. 24 § 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 Integration-as-a-Service Event Grid Serverless-Szenarien mit Azure Functions & Co.
  15. 27 § 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 § Azure Germany: a sovereign Cloud, not operated by Microsoft, on German soil Summary Integration-as-a-Service Serverless-Szenarien mit Azure Functions & Co.
  16. 28 § OK – you asked for it J §

    https://docs.microsoft.com/en-us/azure/architecture/aws- professional/services § Microsofts „Azure & AWS Cloud Service Map“ § https://aka.ms/awsazureguide AWS & Azure Integration-as-a-Service Serverless-Szenarien mit Azure Functions & Co.
  17. 29 § Processing 100,000 Events Per Second on Azure Functions

    § https://blogs.msdn.microsoft.com/appserviceteam/2017/09/19/processing- 100000-events-per-second-on-azure-functions/ § Azure Functions – Significant Improvements in HTTP Trigger Scaling § https://www.azurefromthetrenches.com/azure-functions-significant- improvements-in-http-trigger-scaling/ Serverless-Szenarien mit Azure Functions & Co. Integration-as-a-Service Interesting reading
  18. § PaaS / AaaS § Identity Server § Functions §

    HTTP-triggered § Database-triggered § Triggered through IoT data § Event-triggered (system event) § Database § Subscribing to collection changes § IoT § Secure device connectivity & communication § Events § Publishing custom application- specific events § Workflow § Programmatically create stateful workflows Integration-as-a-Service Demo Scenario: Home Automation with Serverless Serverless-Szenarien mit Azure Functions & Co.
  19. 36 § Durable Functions (DF) let developers abstract away management

    of state for complex, stateful orchestrations § In code, not markup § Can be started via orchestration client § Via HTTP addressable state machine § Mental model: “Serverless orchestrations” § Based on Durable Task Framework § Write long running persistent workflows in C# using async/await § https://github.com/Azure/durabletask § Some say “WF done better” ;-) Azure Durable Functions Integration-as-a-Service Serverless-Szenarien mit Azure Functions & Co.
  20. 37 § Extension of Azure Functions § Manages state, checkpoints,

    and restarts for you § You have to play by the rules § Define stateful workflows in a new type of function called orchestrator function § Advantages of orchestrator functions: § Define workflows in code § Call other functions synchronously and asynchronously § Output from called functions can be saved to local variables § Automatically checkpoint progress whenever the function awaits § Local state is never lost if the process recycles or the underlying VM reboots § Orchestrators can call activity functions, other sub-orchestrations, and wait for an external event Azure Durable Functions Integration-as-a-Service Serverless-Szenarien mit Azure Functions & Co.
  21. 38 Serverless-Szenarien mit Azure Functions & Co. Integration-as-a-Service Azure Durable

    Functions - Patterns § Function chaining § Fan-out / fan-in § Async HTTP APIs § Stateful singletons § Human interaction
  22. 40 IoT & the Cloud Integration-as-a-Service Serverless-Szenarien mit Azure Functions

    & Co. https://4.bp.blogspot.com/-SQHr_XnFfUM/VBjq1wFkmUI/AAAAAAAAAyE/coSUQ71f1k8/s1600/20140912_231941.jpg
  23. 41 § Bi-directional communication with IoT devices § IoT device

    management § Supports MQTT § Lightweight § Publish/Subscribe § Secure § Lots of SDKs available § C § Java § .NET § Node.js § Python Serverless-Szenarien mit Azure Functions & Co. Integration-as-a-Service Azure IoT Hub