Download presentation
Presentation is loading. Please wait.
Published byAchim Hausler Modified over 6 years ago
1
Microsoft Ignite NZ 25-28 October 2016 SKYCITY, Auckland
2
Achieving the Serverless dream with Azure Functions
Vishesh Oberoi Technical Evangelist @ovishesh
3
Agenda What is Serverless Compute? Introduction to Azure Functions
Applications WebJobs vs Functions Q/A
4
1 million/hour 12 years 60% computing
Microsoft Envision 2016 11/9/2018 9:39 AM GOING DIGITAL 1 million/hour new devices coming online by 2020 12 years average age of S&P 500 corporations by 2020 60% computing in the public cloud by 2025 © 2016 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
5
Why the Cloud? 11/9/2018 9:39 AM On Premises Infrastructure Platform
(as a Service) Platform (as a Service) Software (as a Service) Applications Applications You manage Applications Applications resilient & manage You scale, make You scale, make resilient and manage Data Data Data Data Runtime Runtime Runtime Runtime Scale, resilience and management by vendor Middleware Middleware Middleware Middleware Scale, resilience and management by vendor O/S O/S O/S O/S Virtualization Virtualization Managed by vendor Virtualization Virtualization Servers Servers Servers Servers Storage Storage Storage Storage Networking Networking Networking Networking © 2014 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
6
Serverless
7
What is Serverless?
8
Before cloud
9
A wild IaaS appears…
10
Enter PaaS
11
Enter PaaS
12
Serverless
13
Scaling happens at the lowest unit a service understands
14
Abstraction of servers
What is “serverless” Abstraction of servers Sub-second billing Event-driven scale
15
What is “serverless”
16
How is it different Mono-lithic application Inside client app
Complex framework Outside client app Micro- functionality Loosely coupled components
17
Benefits of “serverless”
Focus on Business Logic Quick start Managed for you
18
Azure Functions Process events with Serverless code. Azure Functions
Microsoft Ignite 2016 11/9/2018 9:39 AM Azure Functions Azure Functions Process events with Serverless code. Make composing Cloud Apps insanely easy Develop Functions in C#, Node.js, F#, Python, PHP, Batch and more Easily schedule event-driven tasks across services Expose Functions as HTTP API endpoints Scale Functions based on customer demand Easily integrate with Logic Apps © 2016 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
19
What is Azure Functions?
Code Events + data
20
Respond to any event Develop your way Integrated DevOps
Pay for what you use Fully open source Azure Functions
21
Demo Hello World Microsoft Ignite 2016 11/9/2018 9:39 AM
© 2016 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
22
New CreateInvoice(); request
Fetch new request from Queue Create Invoice Store in Blob and add to queue
23
New CreateInvoice(); request
Fetch new request from Queue Create Invoice Store in Blob and add to queue
24
Light-weight CPU Intensive Tasks
run.cmd, run.bat run.exe run.ps1 run.sh run.php run.py run.js
25
Support Languages 1st Party Support Experimental Support C# Node F#
Python PHP Batch Bash Powershell
27
What does a Function and my bathroom have in common?
28
A scale I (mostly) ignore
29
Azure Functions architecture
Built on top of App Service and WebJobs SDK App Service Dynamic Runtime Hosting, CI, Deployment Slots, Remote Debugging, etc. WebJobs Core Programming model, common abstractions WebJobs Extensions Triggers, input and output bindings WebJobs Script Runtime Azure Functions Host – Dynamic Compilation, Language abstractions, etc. Code Config Language Runtime C#, Node.js, F#, PHP, etc.
30
What is the ‘Functions’ way of coding logic?
31
“Functions” programming model
Function as the unit of work Functions are executed; they start and finish Functions have inputs and outputs
32
Best practices for the “Functions” programming model
Functions should “do one thing” Functions should be idempotent Functions should finish as quickly as possible 1
33
How to use the “Functions” programming model
What is you need to do? (business logic wise) Am I solving more than one business problem? Split up, go back to 1. What will trigger the function? Is there additional data I need? Is there output I should produce? “When ___, get ___, do ___, and output ___”
34
Functions programming concepts
Trigger Input Output Code
35
Platform and scaling App Service offers dedicated and dynamic tiers.
Dedicated is the existing App Service plan tiers Basic, Standard, Premium Pay based on # of reserved VMs You’re responsible for scale Dynamic Pay on number of executions Platform responsible for scale
36
Dynamic tier pricing Pay per execution model - two meters, three units
Number of executions Duration of execution x reserved memory
37
Servers when you want them …
… Serverless when you don’t want them
38
Demo Speaker name Microsoft Ignite 2016 11/9/2018 9:39 AM
© 2016 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
39
func cli
40
Application Scenarios
41
Applications Example: Timer based processing
Microsoft Ignite 2016 11/9/2018 9:39 AM Applications Example: Timer based processing Find and clean invalid data Clean table Eve r y 15 minutes © 2016 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
42
Applications Example: Azure service event processing File added to
Microsoft Ignite 2016 11/9/2018 9:39 AM Applications Example: Azure service event processing File added to Blob Storage T ransfo r m CSV to data ows CSV P ower BI Cha r t graphic © 2016 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
43
Applications Example: SaaS event processing Excel file saved
Microsoft Ignite 2016 11/9/2018 9:39 AM Applications Example: SaaS event processing Excel file saved to OneDrive Mic r os o f t Graph API analyzes content C r eates new sheets with cha ts © 2016 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
44
Applications Example: Serverless Web Applications architectures
Microsoft Ignite 2016 11/9/2018 9:39 AM Applications Example: Serverless Web Applications architectures Loaded web page calls W ebHook C r eate ad based on user p o file Completed page © 2016 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
45
Async background processing
Microsoft Ignite 2016 11/9/2018 9:39 AM Async background processing Example: Serverless Mobile back ends Photo taken and W ebHook called Sto r es in blob storage P r oduces scaled images © 2016 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
46
Applications Example: Real-time stream processing T ransfo r
Microsoft Ignite 2016 11/9/2018 9:39 AM Applications Example: Real-time stream processing T ransfo r m to structu ed data Sto r e data in SQL Online Millions o f devices feed into St r eam Analytics © 2016 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
47
Applications ... ? Example: Real-time bot messaging Message sent
Microsoft Ignite 2016 11/9/2018 9:39 AM Applications Example: Real-time bot messaging ... ? Message sent to Chatbot Co r tana Analytics answe s questions Chatbot sends r esponse © 2016 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
48
How many of you are using WebJobs?
49
WebJobs vs Azure Functions
50
WebJobs SDK vs Azure Functions
Over generalizing: WebJobs SDK == more freedom -> more work Azure Functions == less responsibilities -> less work Commonalities Programming model differences Hosting model differences
51
Commonalities Both use the ”Function” oriented programming model
Both support ”bindings” for trigger/input/output Both support WebJobs SDK extensions model Both support external libraries being used Both can run locally and be debugged Both have runtime telemetry via the WebJobs Dashboard
52
Programming model differences
WebJobs SDK C# only Attributes for configuring bindings Traditional .NET developer experience (Visual Studio, NuGet, MSBuild) Many functions per class Can access and manipulate many core SDK features Can’t listen for HTTP requests* Azure Functions C# & Node.js + more experimental/coming soon Config files for configuring bindings More diverse development experience (Web portal, VSCode, dynamically builds itself) Limited access to manipulate core SDK features, but (C# only) still some access Supports HTTP!
53
Hosting model differences
WebJobs SDK You configure host Build a console app which is run Azure Functions Limited control over the host Just give it your code/config WebJobs & Dedicated App Service plans Runs the service in the background of Web/Mobile/API app Runs any console app (not just SDK based ones) You manage scale Function App + Dynamic App Service Plans Function app owns the whole host, including web frontend. Only runs Azure Functions stuff – no other things Scale is managed for you
54
Resources Keep learning Fresh Stuff
Azure Functions - Check out the code – Ask questions & raise issues Most technical questions - Stack Overflow, MSDN Forums, GitHub issues Fresh Stuff Azure Functions CLI tooling F# support in Azure Functions – PR on GitHub
55
Get started and reach out!
Try Functions – Try App Service –
56
Questions?
57
11/9/2018 9:39 AM © 2014 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.