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

Serverless-Architekturen: Event-basierte Microservices mit Azure Functions & Co.

Serverless-Architekturen: Event-basierte Microservices mit Azure Functions & Co.

Wie bitte? Ohne Server? Ähm… Ja, in der Tat. Der Serverless-Ansatz verspricht eine niedrige Hürde, um den Einstieg in Microservices zu finden und auch, um ans Ziel einer Aufgabenstellung zu kommen. In diesem Vortrag zeigt Christian Weyer die Grundlagen von Serverless mit Azure und .NET Core anhand praktischer Anwendungsfälle. Auf Basis erprobter Designpatterns können Sie mit Azure Functions, Azure Event Grid und Co. in kurzer Zeit sowohl einfache als auch komplexe Services-Anwendungen designen und implementieren – lokal und in der Cloud. Einer der Schlüssel ist hierbei das Denken in Events, über die Daten übertragen, verarbeitet und weitergeleitet werden. Wohnen Sie dieser Session bei und bilden Sie sich Ihre Meinung – eventuell lernen Sie die Basis für Ihr neues Business-Software-Backend kennen.

Christian Weyer

September 25, 2018
Tweet

More Decks by Christian Weyer

Other Decks in Programming

Transcript

  1. 2 § Founder & CTO at Thinktecture AG § Personal

    focus on § Mobile & web-based application architectures § Interoperability, cross-device § Pragmatic end-to-end solutions § Cloud-native & serverless architectures § Independent Microsoft Regional Director § Microsoft MVP for ASP.NET (Architecture) ASPInsider, AzureInsider § Google GDE for Web Technologies § [email protected] § ! @christianweyer Christian Weyer Event-basierte Microservices mit Azure Functions und Co. Serverless-Architekturen
  2. 3 § Microservices, Nanoservices § Serverless in Azure § Azure

    Functions § Azure Cosmos DB § Azure SignalR Service Serverless-Architekturen Event-basierte Microservices mit Azure Functions und Co. Topics
  3. 5 § Modern business architectures: we strive for isolating functional

    services § Using any technology, any communication § Microservice: unit of independent deployment for a business domain-specific service § Nanoservice: like Microservice, but more focused & lightweight; can be replaced easier § Functions as the mental model Serverless-Architekturen Event-basierte Microservices mit Azure Functions und Co. Microservices – or rather: Nanoservices !
  4. 7 § We can choose from a continuum § VM

    ➔ § Containers ➔ § Orchestrators ➔ § PaaS ➔ § Serverless Serverless-Architekturen Event-basierte Microservices mit Azure Functions und Co. Evolution to Cloud Compute Continuum PaaS IaaS On-Premises Serverless
  5. 9 § Serverless Compute → Azure Functions § Serverless Database

    → Azure Cosmos DB § Serverless Realtime → Azure SignalR Service § Serverless Events → Azure Event Grid § Serverless Messaging → Azure Service Bus § Serverless Workflows → Azure Logic Apps Azure Durable Functions § Serverless IoT → Azure IoT Hub § Serverless Analytics → Azure Application Insights § Serverless Containers → Azure Container Instances Moderne Anwendungen Serverless in Azure Die WebAssembly & Serverless Revolutionen
  6. 11 § 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 (aka Consumption Plan) § Always-on, via Azure App Service § V2 Runtime built on .NET Core § Available for self-hosting Event-basierte Microservices mit Azure Functions und Co. Azure Functions: Functions-as-a-Service Serverless-Architekturen
  7. 12 § 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 § F# § JavaScript, TypeScript (node.js) § Java (preview) Event-basierte Microservices mit Azure Functions und Co. Developing Functions Serverless-Architekturen
  8. 13 § 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 Event-basierte Microservices mit Azure Functions und Co. Triggers & Bindings Serverless-Architekturen Your code logic Runtime Azure Function HTTP Trigger Storage Input Binding Push Notification Output Binding Database Output Binding Email Output Binding
  9. 17 § Globally distributed, elastically scalable § Fully managed by

    Azure § But not yet fully automatically scaling § Multi-model database § Key-value, document, graph ➔ NoSQL § Multiple APIs § DocumentDB, with SQL & JS APIs § MongoDB API § Cassandra API § Table Storage API § Graph Database with Gremlin API Event-basierte Microservices mit Azure Functions und Co. Cosmos DB: A Database with Many Faces Serverless-Architekturen
  10. 18 § Building event-driven architectures with Cosmos DB § Listening

    to Azure Cosmos DB collection for any changes § Inserts, updates, soft-deletes § Subscribe to collection changes § Can be used as a trigger for Functions Event-basierte Microservices mit Azure Functions und Co. Cosmos DB Change Feed Serverless-Architekturen
  11. 20 § Realtime is a wanted feature nowadays § Dashboards

    and monitoring apps § Collaborative apps § Apps that require notifications § ASP.NET Core SignalR provides programming model for bi-directional ‘method invocation’ – via WebSockets, SSE or Long Polling § Wanted: “SignalR messaging & scale-out”-as-a-Service ➔ Azure SignalR Service Serverless-Architekturen Event-basierte Microservices mit Azure Functions und Co. Azure SignalR Service
  12. 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 § Same underlying model for different use-cases § System-provided events § Custom application-specific events Serverless-Architekturen Event-basierte Microservices mit Azure Functions und Co. Event Grid
  13. 25 § Nanoservices pattern as a more lightweight but more

    granular approach to Microservices § Serverless is just one option in the Cloud Continuum § Always think about the use cases and requirements § Event-driven thinking & modeling of services & interfaces feels like a natural approach to systems design § Serverless Azure tries to offer solutions in the Continuum § Functions § Cosmos DB § SignalR Service § Event Grid … & more § Azure Functions is way more than just a Web API framework Summary Event-basierte Microservices mit Azure Functions und Co. Serverless-Architekturen
  14. 26 § 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/ § Azure Functions: Cold Starts in Numbers § https://mikhail.io/2018/04/azure-functions-cold-starts-in-numbers/ Serverless-Architekturen Event-basierte Microservices mit Azure Functions und Co. Interesting reading
  15. 27 § Azure Functions Dependency Injection (with AutoFac) § https://github.com/introtocomputerscience/azure-function-autofac-

    dependency-injection Serverless-Architekturen Event-basierte Microservices mit Azure Functions und Co. Resources