$30 off During Our Annual Pro Sale. View Details »

Serverless Azure: Event-based Microservices - beyond just Functions

Serverless Azure: Event-based Microservices - beyond just Functions

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 will show you end-to-end Serverless with Azure & .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
PRO

May 26, 2018
Tweet

More Decks by Christian Weyer

Other Decks in Programming

Transcript

  1. Christian Weyer
    @christianweyer
    CTO
    Serverless Azure
    Event-based Microservices - beyond just Functions
    Azure Saturday 2018

    View Slide

  2. 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-based Microservices - beyond just Functions
    Serverless Azure

    View Slide

  3. 3
    Let’s start with a demo !
    Event-based Microservices - beyond just Functions
    Serverless Azure

    View Slide

  4. 4
    § Serverless ?
    § Serverless Compute
    § Serverless Database
    § Serverless Eventing
    Serverless Azure
    Event-based Microservices - beyond just Functions
    The Journey

    View Slide

  5. 5
    Building & integrating software
    Microservices architectures
    (virtual introduction !)
    Event-based Microservices - beyond just Functions
    Serverless Azure

    View Slide

  6. 6
    A different approach
    Serverless
    Event-based Microservices - beyond just Functions
    Serverless Azure

    View Slide

  7. 7
    § We can choose from a continuum
    § VM ➔
    § Containers ➔
    § Orchestrators ➔
    § PaaS ➔
    § Serverless
    Event-based Microservices - beyond just Functions
    Evolution to Cloud Compute Continuum
    PaaS
    IaaS
    On-Premises Serverless
    Serverless Azure

    View Slide

  8. 8
    What is Serverless, anyway?
    Event-based Microservices - beyond just Functions
    Serverless Azure

    View Slide

  9. 9
    § Serverless Compute → Azure Functions
    § Serverless Database → Azure Cosmos DB
    § Serverless Events → Azure Event Grid
    § Serverless Realtime → Azure SignalR Service
    § 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/
    Event-based Microservices - beyond just Functions
    Serverless in Azure (Serverless != FaaS-only)
    Serverless Azure

    View Slide

  10. 10
    Serverless Home Automation
    Demo Scenario
    Event-based Microservices - beyond just Functions
    Serverless Azure

    View Slide

  11. Demo Scenario:
    Serverless Home Automation
    Event-based Microservices - beyond just Functions
    Serverless Azure
    Event Hub
    IoT Hub
    Cosmos DB
    App Service

    View Slide

  12. 12
    Azure Functions
    Serverless Code / Compute
    Event-based Microservices - beyond just Functions
    Serverless Azure

    View Slide

  13. 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
    Event-based Microservices - beyond just Functions
    Azure Functions: Functions-as-a-Service
    Serverless Azure

    View Slide

  14. 14
    § 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)
    § Java (preview)
    § Bash, Batch, PowerShell
    § … more planned
    Event-based Microservices - beyond just Functions
    Developing Functions
    Serverless Azure

    View Slide

  15. 15
    § 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-based Microservices - beyond just Functions
    Triggers & Bindings
    Serverless Azure
    Your code logic
    Runtime
    Azure Function
    HTTP
    Trigger
    Storage
    Input
    Binding
    Push
    Notification
    Output Binding
    Database
    Output Binding
    Email
    Output Binding

    View Slide

  16. 16
    Event-based Microservices - beyond just Functions
    Triggers & Bindings in Code
    Serverless Azure

    View Slide

  17. 17
    Event-based Microservices - beyond just Functions
    Serverless Azure
    https://docs.microsoft.com/en-us/azure/azure-functions/functions-triggers-bindings
    Triggers &
    Bindings

    View Slide

  18. 18
    Azure Cosmos DB
    Serverless Database
    Event-based Microservices - beyond just Functions
    Serverless Azure

    View Slide

  19. 19
    § 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
    Event-based Microservices - beyond just Functions
    Cosmos DB: A Database with Many Faces
    Serverless Azure

    View Slide

  20. 20
    § 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
    Event-based Microservices - beyond just Functions
    Cosmos DB Change Feed
    Serverless Azure

    View Slide

  21. 21
    Azure Event Grid
    Serverless Eventing
    Event-based Microservices - beyond just Functions
    Serverless Azure

    View Slide

  22. 22
    § 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
    Event-based Microservices - beyond just Functions
    Event Grid
    Serverless Azure

    View Slide

  23. 23
    Event Grid Reliability & Performance
    Event-based Microservices - beyond just Functions
    Serverless Azure

    View Slide

  24. 24
    Summary
    Event-based Microservices - beyond just Functions
    Serverless Azure

    View Slide

  25. 25
    § Serverless is just one option in the Cloud Continuum
    § Always think about the use cases and requirements
    § Think in events & triggers!
    § Serverless Azure tries to offer solutions in the Continuum –
    mixture of PaaS & FaaS
    § Functions
    § Cosmos DB
    § Event Grid
    § SignalR Service
    § … & more
    § It is not about Windows & .NET - it is about any OS, any platform,
    any language – any solution J
    Summary
    Event-based Microservices - beyond just Functions
    Serverless Azure

    View Slide

  26. 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/
    Serverless Azure
    Event-based Microservices - beyond just Functions
    Interesting reading

    View Slide

  27. Serverless Azure
    Event-based Microservices - beyond just Functions
    Christian Weyer
    @christianweyer
    [email protected]
    Thank you!
    https://github.com/thinktecture/azuresaturday-2018-serverless

    View Slide