7. Pordenone, 22 aprile 2017#GlobalAzure
#Pordenone
How we always explained cloud services
8. Pordenone, 22 aprile 2017#GlobalAzure
#Pordenone
Misundestanding on PaaS
• You control only the application and data
• No control over other tiers
• No on underlying hardware
• CPU and RAM….hardware?
• Always example about our applications, web as an example
• …and we compare IaaS (IIS) with PaaS (App Services)
• …so we configure the CPU, the RAM, but nothing else…
9. Pordenone, 22 aprile 2017#GlobalAzure
#Pordenone
Where you decide the CPU on these?
Cortana
Management Suite
Media ServicesStorage
Traffic
Manager
Visual Studio
Services
OMS
Management SuitMachine LearningCDNDocument DB
Search
SchedulerActive Directory Key Vault App Insights Cognitive Services Embedded Power BI
Hockey AppStream AnalyticsNotification HubIoT Hub Service Bus
Logic App
10. Pordenone, 22 aprile 2017#GlobalAzure
#Pordenone
Real World PaaS…
• Don’t decide on CPU and
RAM…why?
• Control vs Configure
• You cannot plan your workload
capacity
• Only with testing
• Infact Real World PaaS is about….
• IOPS (Azure Storage)
• Streaming Units (Media Services)
• Resource Units (DocumentDb)
• Throughput Units (Event Hubs)
• Streaming Unit (Stream Analytics)
• Data Transaction Units (SQL
Database)
11. Pordenone, 22 aprile 2017#GlobalAzure
#Pordenone
Look what is missing?
Cortana
Management Suite
Media ServicesStorage
Traffic
Manager
Visual Studio
Services
OMS
Management SuitMachine LearningCDNDocument DB
Search
SchedulerActive Directory Key Vault App Insights Cognitive Services Embedded Power BI
Hockey AppStream AnalyticsNotification HubIoT Hub Service Bus
Logic App
12. Pordenone, 22 aprile 2017#GlobalAzure
#Pordenone
Yes it is!
Azure App Service
“PaaS that developers love and businesses can trust”
13. Pordenone, 22 aprile 2017#GlobalAzure
#Pordenone
Ship.
Acct. Mang.
Hist.
Database
Client
Ship.
DB
Client
Hist.
DB
Mang.
DB
Acct.
DB
POST
GET
UPDATE
Monolithic Microservices
Application’s evolution
14. Pordenone, 22 aprile 2017#GlobalAzure
#Pordenone
Ship.
Acct. Mang.
Hist.
Database
Client
Monolithic
Ship.
DB
Client
Hist.
DB
Mang.
DB
Acct.
DB
POST
GET
UPDATE
Microservices
Application’s evolution
15. Pordenone, 22 aprile 2017#GlobalAzure
#Pordenone
Serverless manifesto
• Function are the unit of deployment and scaling.
• No machines, VMs, or containers visible in the programming model.
• Permanent storage lives elsewhere.
• Scales per request; Users cannot over- or under-provision capacity.
• Never pay for idle (no cold servers/containers or their costs).
• Implicitly fault-tolerant because functions can run anywhere.
• BYOC - Bring Your Own Code.
• Metrics and logging are a universal right.
P.S. Home not found!
22. Pordenone, 22 aprile 2017#GlobalAzure
#Pordenone
Code Events + data
Azure Functions
Azure Functions
• Process events with Serverless code.
• Make composing Cloud Apps insanely easy
• Develop Functions in C#, Node.js, 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
23. Pordenone, 22 aprile 2017#GlobalAzure
#Pordenone
Now complete Serverless
Now complete vision
Cortana
Management Suite
Media ServicesStorage
Traffic
Manager
Visual Studio
Services
OMS
Management SuitMachine LearningCDNDocument DB
Search
SchedulerActive Directory Key Vault App Insights Cognitive Services Embedded Power BI
Hockey AppStream AnalyticsNotification HubIoT Hub Service Bus
Functions Logic App
24. Pordenone, 22 aprile 2017#GlobalAzure
#Pordenone
Serverless offering
http://www.geekwire.com/2017/serverless-nirvana-microsoft-
azure-cto-mark-russinovich-future-cloud/
27. Azure
Functions
APIM
Notification Hubs
Web Apps
Mobile Apps
API Apps
Logic
Apps
Custom AppseCommerce Digital Global Presence LOB
Apps
Services
App Service
Developer Experience
• Languages and Frameworks
• Superior DevOps
• Self service supportability
Fully Managed Platform
• Auto scale
• OS and Framework patching
• Load balancing
Enterprise Grade
• Enterprise grade SLA
• Security and Compliance
• On-Premise Connectivity
Platform
API / Services / ISV
28. Pordenone, 22 aprile 2017#GlobalAzure
#Pordenone
Platform and scaling
• App Service offers dedicated and consumption tiers.
• Dedicated is the existing App Service plan tiers
• Basic, Standard, Premium
• Pay based on # of reserved VMs
• You’re responsible for scale
• Consumption (Dynamic)
• Pay on number of executions
• Platform responsible for scale
29. Pordenone, 22 aprile 2017#GlobalAzure
#Pordenone
Dynamic tier pricing
• Pay per execution model - two meters, three units
• Number of executions
• Duration of execution x reserved memory
30. Pordenone, 22 aprile 2017#GlobalAzure
#Pordenone
Dual abstraction
• Serverless compute abstracts
away the compute
• Azure Functions Bindings
abstract away the services you
interact with
31. Pordenone, 22 aprile 2017#GlobalAzure
#Pordenone
Azure Functions architecture
• Azure Functions is built around the WebJobs SDK runtime. The
WebJobs SDK makes it easy to react to events and work with data in a
consistent abstracted fashion.
32. Pordenone, 22 aprile 2017#GlobalAzure
#Pordenone
Azure Function features
• Built on Azure App Services
• Short-lived and stateless
• Invoke manually or with triggers (with binding)
34. Pordenone, 22 aprile 2017#GlobalAzure
#Pordenone
Supported Languages
• 1st class support
• Node/JavaScript
• C#
• F#
• Experimental support
• Python
• PHP
• Batch
• Bash
• PowerShell
35. Pordenone, 22 aprile 2017#GlobalAzure
#Pordenone
From App Services
• Deployment
• Monitoring
• Security (RBAC+Oauth)
36. Pordenone, 22 aprile 2017#GlobalAzure
#Pordenone
Http Proxies
• Http endpoint abstraction
• Dev/test scenarios
• Route templates
• Use for any HTTP endpoint
• Not and full fledged API management solution
38. Pordenone, 22 aprile 2017#GlobalAzure
#Pordenone
Functions Programming Model
• Function as a single unit of work
• Functions are executed per trigger
• Functions have inputs and outputs
Trigger
(data) Input Input
code
Output
Output
Input
40. Pordenone, 22 aprile 2017#GlobalAzure
#Pordenone
Focus on
Business
Logic
Reduced Time
To Market
Reduced
DevOps
Benefits of Serverless?
41. Pordenone, 22 aprile 2017#GlobalAzure
#Pordenone
Functions Programming Model - Best Practices
• Functions should “do one thing”
• Functions should be stateless
• Functions should be idempotent
• Functions should finish as quickly as possible
42. Pordenone, 22 aprile 2017#GlobalAzure
#Pordenone
General practices for serverless
• Thick clients; thin & stateless backends
• SPAs like Angular/React are your friend
• Be sure to enable CORS
• Sync is nice, but Async is nicer
• Async, queue based systems are more resilient
• Read and internalize the reactive manifesto - http://www.reactivemanifesto.org/
• While synchronous work will happen, minimize the work done in a sync function and
kick off to a queue based async process (HTTP status code 202, not 201 )
• Live and die by the cloud
• Like never before, develop on the cloud, test on the cloud, ship on the cloud
• Not just FaaS, but use other serverless tech that best solves the problem (like Logic
Apps)
43. Pordenone, 22 aprile 2017#GlobalAzure
#Pordenone
Azure Functions is open sourced
• The runtime, “portal”, and templates are all on GitHub
• https://github.com/Azure/azure-webjobs-sdk
• https://github.com/Azure/azure-webjobs-sdk-extensions
• https://github.com/Azure/azure-webjobs-sdk-script
• https://github.com/Azure/azure-webjobs-sdk-templates
• https://github.com/ProjectKudu/WebJobsPortal
• Open roadmap
• Use the cutting edge features
• Transparency into priorities and velocity
• Influence the direction of the project
• Runtime is intended to be portable
• MIT License