Go Serverless with Cosmos DB, Azure Functions and Blazor http://azureability.com lberman@microsoft.com
What is “serverless” Event- driven scale Sub-second billing Abstraction of servers
How is it different Complex framework Micro- functionality Outside client app Inside client app Mono-lithic application Loosely coupled components
Benefits of “serverless” Focus on business logic Ship faster Reduced DevOps
Signs that a serverless pattern might be useful for a given scenario
Every 15 minutes Clean tableFind and clean invalid data
File added to Blob Storage Transform CSV to data rows CSV Power BI Chart graphic
Excel file saved to OneDrive Microsoft Graph API analyzes content Creates new sheets with charts
Loaded web page calls WebHook Completed pageCreate ad based on user profile
Photo taken and WebHook called Stores in blob storage Produces scaled images
Millions of devices feed into Stream Analytics Store data in SQL Online Transform to structured data
? ... Cortana Analytics answers questionsMessage sent to Chatbot Chatbot sends response
Integration Store record Post new invoice Fetch Invoice Grab raw file Convert to JSON API layer API Management Logic App Function
Suggestions for getting started
Serverless application platform components
Scenarios ...?
Azure Functions
Azure Functions: event driven serverless compute
Azure Functions: host anywhere … …
Azure Functions: dynamic scale based on events
Azure Functions: dynamic scale based on events
… …
Azure Functions architecture
Microservice tools and approaches
Dual abstraction
Platform and scaling
Functions programming concepts
1) Trigger 7) Develop Locally 3) Develop 4) Execute 6) Monitor and Improve 2) Input Binding 5) Output Binding Web Hooks Azure Services Azure Services App Services Hosting Plans Azure Services
Use bindings in your code
Triggers and Bindings
Seamless DevOps experience with Functions
Azure Logic Apps
Manage all events in one place
Manage all events in one place
Ensure reliability and performance in your apps
Benefit from broad coverage
Build apps faster
azure.com/serverless
Resources — 1/2 • Change feed in Azure Cosmos DB • Serverless event-based architectures w/Azure Cosmos DB & Azure Functions Azure Functions Intro to Azure Functions - What they are and how to create and deploy them • Develop Azure Functions using Visual Studio Building event driven apps with Azure Cosmos DB and Azure Functions Build client web apps with C# Awesome Blazor Blazor Train w/Carl Franklin (Video Series)
Resources — 2/2 https://dev.azure.com/azurehowto/FlyCosmos Real-time ASP.NET with SignalR Bring serverless apps to life with Azure SignalR Service Azure DevOps Demo Generator lberman@microsoft.com
Go Serverless with Cosmos DB, Azure Functions and Blazor

Go Serverless with Cosmos DB, Azure Functions and Blazor

Editor's Notes

  • #4 Abstraction of servers, infrastructure and configuration of operating system Event-driven scale Sub-second billing Stateless Serverless compute is a fully managed service. Some refer to it as Functions as a Service OS and Framework patching is performed for you There is zero administrative tasks and no need to manage any infrastructure You just deploy your code (function) and it runs Your code runs within seconds and for very short period of time Serverless compute scales quickly (almost instantly) and vastly Automatically scales within seconds No scale configuration is required (there is no way to configure scale or limits) Scales to match any given workload. Scales from zero to handle tens of thousands concurrent functions invocations within seconds Pay only for the time your code is running Serverless compute reacts to events React, in near real-time, to events and triggers Triggered by virtually any event from Azure service or 3rd party services
  • #5 Mono-lithic application -> loosely coupled components Events happening async outside client application Build/use micro-functionality to react to a single event
  • #6 “Pinnacle of PaaS compute” Not just hardware “servers”, but software servers are also managed for you Focus on business logic, not solving technical problems not core to business Lower effort to get started makes it easier to experiment (bots, etc.)
  • #15 Chris
  • #17 Lets talk about what really makes up MSFT’s Serverless platform: At the center of the Serverless platform, is our compute offerings: Azure Functions and Azure Logic Apps. Azure Functions is an event based Serverless compute experience that helps you accelerate your development. Logic Apps is a powerful orchestration tool. It enables building a Serverless app in minutes – by orchestrating multiple functions using a visual workflow tool. Say you have your apps up and running using Serverless. Congratulations! You now need to collect intelligence from different apps across platforms to take actions upon. There are a few essential components which we think are core to building Serverless applications are: Data/ Storage –Functions has triggers and bindings with Azure document DB and Azure Blob storage ** Triggers: Triggers are event responses used to trigger your custom code. They allow you to respond to events across the Azure platform or on premise. ** Bindings: Bindings represent the necessary meta data used to connect your code to the desired trigger or associated input or output data. Messaging such as queues and topics using Azure Service Bus and Azure Event Hubs Integration – that includes core LOB apps and SaaS apps integration via Azure Logic Apps. Intelligence on data and sentiment/ predictive analysis using Cognitive services and Machine learning Conversation as a service – how do we equip developers to build apps that offer an end-to-end experience for their end users – Azure Bot Service offers a Serverless interactive bot experience. More, developers are spending more time writing code that allows them to add huge business impact with Serverless. MSFT offers numerous development tools such as IDE Support for Visual Studio in functions and Logic Apps, enables local development (vs web browser coding environment), visual debugging capability, all with your tools of choice. Lastly, I also want to highlight top scenarios and use cases for Serverless: Real-time Stream analytics: Customers can use Functions to feed real-time streams of data from application tracking into structured data and store it in SQL online. SaaS event processing: Customers can use Functions and Logic Apps to analyze data from an excel file in Onedrive and perform validation, filtration, sorting and convert data into consumable business charts Web app architecture: Used a lot in creating targeted marketing collaterals – when a customer clicks on a webpage, it triggers a webhook, that uses a function to create an ad that matches the customer profile and displays a completed webpage. Real-time bot messaging: When customers send a message to a chatbox, Functions calls Cortana analytics to generate appropriate answers and sends a response back. //from before: Customers have different paths to build a Serverless app – start by building the distributed application components using functions by leveraging the numerous templates and declarative bindings Or Start with the workflow and orchestration of Serverless application using Azure Logic Apps. The visual designer enables developers to quickly and easily author, edit and visualize orchestration of multiple functions and workflow.
  • #18 So what kind of apps and scenarios can be built using serverless technologies? The answer is anything where there is need to run some logic in response to an event. Some of you might be surprised to learn that, the above definition covers a big portion of the computing universe. Modern computing is all about events: An IoT device sending data to analyze and store in real-time is an event. There are billions of those. Handling of such data such as enriching, analyzing or filtering is best done using serverless functions which can be spun up on demand. Almost every web based application needs to run some regular maintenance task like cleaning up a database or synchronizing data between two systems. All of these times are events. Such tasks that need to be run only at specific times, don’t call for dedicated infrastructure. They are best left to serverless solutions. A mobile app clicking a picture and submitting to backend is an event. There are billions of such apps. In many cases developers building such apps want to focus on delighting their customers using clients app experience. Serverless technology can easily take away the burden of building mobile backends. Automated response systems receiving a customer request is an event. Building intelligent bots for such scenarios using serverless technology is again a great example where the focus needs to be on logic instead of infrastructure. These are only some of the many examples which fit well with serverless.
  • #30 This is the whole (top level) Dev Ops story where Dev build wounderful apps, using CI they mange their code, builds, and releases. Connecting to a repository, they can deploy to Azure Websites, build in the cloud, deploy to a slot to test and validate, swap into production, deployed across the globe as needed, monitor and get feedback, on which devs can make updates. Rinse and repeat
  • #33 This is the whole (top level) Dev Ops story where Dev build wounderful apps, using CI they mange their code, builds, and releases. Connecting to a repository, they can deploy to Azure Websites, build in the cloud, deploy to a slot to test and validate, swap into production, deployed across the globe as needed, monitor and get feedback, on which devs can make updates. Rinse and repeat
  • #36 Call out that we now support stored procs on-prem
  • #38 Logic Apps can integrate with “anything” (APIs) and solve small or complex problems. Automation in a secure and reliable environment fast and easy. Connect Anything: On-premises, hybrid and cloud Mission critical, complex integration scenarios Business productivity Agile Business: Quickly create workflows Position to the future API centric Transform Business: Extract value from both (on-premises and cloud apps) Build Holistic integration solutions.