Serverless in Action: Event-gesteuerte Microservices - am Beispiel Azure

Serverless in Action: Event-gesteuerte Microservices - am Beispiel Azure

Wie bitte? Ohne Server? Ähm... Ja, in der Tat. Der Serverless-Ansatz für Microservices verspricht eine niedrige Hürde, um den Einstieg zu finden und auch um ans Ziel zu kommen. Dabei ist Serverless jedoch nicht für jeden und alles geeignet. In diesem Vortrag zeigt Christian Weyer die Grundlagen von Serverless mit Azure und .NET Core anhand eines realistischen Anwendungsbeispiels. Auf Basis erprobter Design Patterns können Sie mit Azure Functions, Azure Event Grid, Azure Cosmos DB, Azure Storage & Co. in kurzer Zeit einfache & komplexe 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 Ihrer neuen Business-Software hier kennen.

7e0087a19318ded4ba2203187694740f?s=128

Christian Weyer

January 22, 2019
Tweet

Transcript

  1. Serverless in Action: Event-gesteuerte Microservices - am Beispiel Azure Christian

    Weyer @christianweyer CTO
  2. 2 § Co-Founder & CTO at Thinktecture AG § Personal

    focus on § Mobile & web-based application architectures § Pragmatic end-to-end solutions § Cloud-native & serverless architectures § Independent Microsoft Regional Director § Microsoft MVP for Visual Studio Tools & Development ASPInsider, AzureInsider § Google GDE for Web Technologies § christian.weyer@thinktecture.com § @christianweyer Christian Weyer Serverless in Action Event-gesteuerte Microservices - am Beispiel Azure
  3. 3 § Microservices, Nanoservices § Serverless in Azure § Azure

    Functions § Azure Service Bus Event-gesteuerte Microservices - am Beispiel Azure Serverless in Action Topics
  4. How large is small? Microservices Serverless in Action Event-gesteuerte Microservices

    - am Beispiel Azure 4
  5. Single Responsibility § Focused around business domain § ‘Small’ Isolation

    § Choice of technology § Well-defined technology-agnostic API § Mobility Autonomy § Exclusive state (data storage) Decoupling § Asynchronous communication § Really, always? Event-gesteuerte Microservices - am Beispiel Azure Serverless in Action (Some) Principles of Microservices 5
  6. 6 End-to-End Sample – Architecture Overview Serverless in Action Event-gesteuerte

    Microservices - am Beispiel Azure
  7. 7 Event-gesteuerte Microservices - am Beispiel Azure Serverless in Action

    End-to-End Sample – Architecture Overview
  8. 8 § 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 § Make things easier, get productive earlier Event-gesteuerte Microservices - am Beispiel Azure Serverless in Action Microservices – or rather: Nanoservices
  9. 9 Event-gesteuerte Microservices - am Beispiel Azure Serverless in Action

    https://twitter.com/serialseb/status/1085235076986781696
  10. A different approach Serverless Serverless in Action Event-gesteuerte Microservices -

    am Beispiel Azure 10
  11. 11 § We can choose from a continuum § VM

    ➔ § Containers ➔ § Orchestrators ➔ § PaaS ➔ § Serverless Event-gesteuerte Microservices - am Beispiel Azure Serverless in Action Evolution to Cloud Compute Continuum PaaS IaaS On-Premises Serverless
  12. 12 Serverless Sweet Spot Programming Model § Event-driven § Stateless

    § Service-full Operational Model § Fully managed § Automatically scaling § Usage priced Serverless in Action Event-gesteuerte Microservices - am Beispiel Azure
  13. 13 § Serverless Compute → Azure Functions § Serverless Database

    → Azure Cosmos DB § Serverless Storage → Azure Storage § 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 Event-gesteuerte Microservices - am Beispiel Azure Serverless in Action Serverless in Azure
  14. Azure Functions Serverless Compute Serverless in Action Event-gesteuerte Microservices -

    am Beispiel Azure 14
  15. 15 § Azure Functions is code being triggered by an

    event § Basic principles enable powerful use cases § Events ➔ Triggers § Bindings § Two ways of operation § Cost-optimized, automatic scale (aka Consumption Plan) § Always-on § V2 Runtime built on .NET Core § Available for e.g. self-hosting § Local tooling & runtime § Multiple language bindings supported Event-gesteuerte Microservices - am Beispiel Azure Serverless in Action Azure Functions: Functions-as-a-Service
  16. 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 Event-gesteuerte Microservices - am Beispiel Azure Serverless in Action Functions Triggers & Bindings Your code logic Runtime Azure Function HTTP Trigge r Storage Input Binding Push Notification Output Binding Database Output Binding Email Output Binding Example
  17. 17 Functions Triggers & Bindings in Code Serverless in Action

    Event-gesteuerte Microservices - am Beispiel Azure
  18. Azure Service Bus Serverless Messaging Serverless in Action Event-gesteuerte Microservices

    - am Beispiel Azure 18
  19. 19 § Asynchronous communication for decoupling Microservices § Different messaging

    services in Azure § Events, data points, messages § Event Grid § Reactive programming § Event Hubs § Big data streams § Service Bus § Enterprise-grade messaging Event-gesteuerte Microservices - am Beispiel Azure Serverless in Action Communication is Key to Cloud Architectures
  20. 20 § Queues & Topics § Reliable asynchronous communication §

    Rich features for temporal control § Routing and filtering § Transactions § Convoys & Sessions (related messages with state) § Bindings for Azure Functions available Event-gesteuerte Microservices - am Beispiel Azure Serverless in Action Service Bus: Messaging-as-a-Service
  21. 21 Sender § Sender sends message to queue § Queue

    ACKs receipt § Receiver connects to queue & retrieves message § Receiver ACKs complete (or other action) Event-gesteuerte Microservices - am Beispiel Azure Serverless in Action Service Bus Queues Receiver
  22. 22 § Sender only knows about Topic § Receivers only

    know about Subscriptions § Filters and Actions exist on Subscriptions Event-gesteuerte Microservices - am Beispiel Azure Serverless in Action Service Bus Topics & Subscriptions Type == ‘order‘ Sender type=quote type=order Topic Type == ‘quote‘ Filter Filter Subscrip- tion 1 Subscrip- tion 2
  23. Summary Serverless in Action Event-gesteuerte Microservices - am Beispiel Azure

    23
  24. Event-gesteuerte Microservices - am Beispiel Azure Serverless in Action 24

    https://twitter.com/swardley/status/1024764547436085249
  25. Single Responsibility § Focused around business domain § ‘Small’ Isolation

    § Choice of technology § Well-defined technology-agnostic API § Mobility Autonomy § Exclusive state (data storage) Decoupling § Asynchronous communication § Really, always? Event-gesteuerte Microservices - am Beispiel Azure Serverless in Action Principles of Microservices 25
  26. 26 § Serverless is just one option in the Cloud

    Continuum § Always think about the use cases and requirements § Serverless will be pre-dominant on the ‘server’ in a couple of years for many use cases § Serverless Azure tries to offer solutions in the Serverless space § Storage § Functions § Service Bus § SignalR Service & more § Azure Functions is way more than just a Web API framework Event-gesteuerte Microservices - am Beispiel Azure Serverless in Action Summary – Serverless-all-the-things?
  27. 27 Remember: there are NO servers! https://twitter.com/jeffhollan/status/1030244102082682880 Serverless in Action

    Event-gesteuerte Microservices - am Beispiel Azure
  28. Chris&an Weyer, Thinktecture AG @chris&anweyer chris&an.weyer@thinktecture.com h:ps://github.com/thinktecture/serverless-microservices