Ce diaporama a bien été signalé.
Le téléchargement de votre SlideShare est en cours. ×

Azure Functions

Publicité
Publicité
Publicité
Publicité
Publicité
Publicité
Publicité
Publicité
Publicité
Publicité
Publicité
Publicité
Chargement dans…3
×

Consultez-les par la suite

1 sur 44 Publicité

Plus De Contenu Connexe

Diaporamas pour vous (20)

Similaire à Azure Functions (20)

Publicité

Plus par Marco Parenzan (20)

Plus récents (20)

Publicité

Azure Functions

  1. 1. Azure Functions Marco Parenzan, @marco_parenzan
  2. 2. Sponsors
  3. 3. Global Sponsors
  4. 4. Hi! I’m • Microsoft MVP 2016 for Azure • Azure Trainer in Cloud Academy, Inc. • Community Lead per 1nn0va Marco Parenzan
  5. 5. Agenda • Serverless introduction • Azure Function concepts • Demo
  6. 6. Serverless Introduction
  7. 7. Pordenone, 22 aprile 2017#GlobalAzure #Pordenone How we always explained cloud services
  8. 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. 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. 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. 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. 12. Pordenone, 22 aprile 2017#GlobalAzure #Pordenone Yes it is! Azure App Service “PaaS that developers love and businesses can trust”
  13. 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. 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. 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!
  16. 16. Pordenone, 22 aprile 2017#GlobalAzure #Pordenone Serverless principles
  17. 17. Pordenone, 22 aprile 2017#GlobalAzure #Pordenone Serverless origins • https://martinfowler.com/articles/serverless.html#origin • Why The Future Of Software And Apps Is Serverless • 2012 KEN FROMM • http://readwrite.com/2012/10/15/why-the-future-of-software-and-apps-is- serverless/ • https://medium.com/@ken_fromm/thinking-serverless-how-new- approaches-address-modern-data-processing-needs-part-1- af6a158a3af1#.iqlx5xky9 • Lambda • AWS, 2014 • [Google Cloud Function, 2016]
  18. 18. Pordenone, 22 aprile 2017#GlobalAzure #Pordenone Ship. DB Client Hist. DB Mang. DB Acct. DB POST GET UPDATE Microservices Application’s evolution
  19. 19. Pordenone, 22 aprile 2017#GlobalAzure #Pordenone Client Mang. DB Microservices POST Users Users/Id Users/Id Users/Id CreatUser GetUser UpdateUser DeleteUser GET UPDATE DELETE Serverless Application’s evolution
  20. 20. Pordenone, 22 aprile 2017#GlobalAzure #Pordenone Serverless Principles
  21. 21. Pordenone, 22 aprile 2017#GlobalAzure #Pordenone Serverless Humor
  22. 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. 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. 24. Pordenone, 22 aprile 2017#GlobalAzure #Pordenone Serverless offering http://www.geekwire.com/2017/serverless-nirvana-microsoft- azure-cto-mark-russinovich-future-cloud/
  25. 25. Pordenone, 22 aprile 2017#GlobalAzure #Pordenone Choose your abstraction
  26. 26. Pordenone, 22 aprile 2017#GlobalAzure #Pordenone Azure Functions
  27. 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. 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. 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. 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. 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. 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)
  33. 33. Pordenone, 22 aprile 2017#GlobalAzure #Pordenone Supported bindings Type Service Trigger Input Output Schedule Azure Functions ✔ HTTP (REST or WebHook) Azure Functions ✔ ✔ Blob Storage Azure Storage ✔ ✔ ✔ Queues Azure Storage ✔ ✔ Tables Azure Storage ✔ ✔ Tables Azure Mobile Apps Easy Tables ✔ ✔ No-SQL DB Azure DocumentDB ✔ ✔ Streams Azure Event Hubs ✔ ✔ Push Notifications Azure Notification Hubs ✔
  34. 34. Pordenone, 22 aprile 2017#GlobalAzure #Pordenone Supported Languages • 1st class support • Node/JavaScript • C# • F# • Experimental support • Python • PHP • Batch • Bash • PowerShell
  35. 35. Pordenone, 22 aprile 2017#GlobalAzure #Pordenone From App Services • Deployment • Monitoring • Security (RBAC+Oauth)
  36. 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
  37. 37. Demo
  38. 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
  39. 39. Conclusions
  40. 40. Pordenone, 22 aprile 2017#GlobalAzure #Pordenone Focus on Business Logic Reduced Time To Market Reduced DevOps Benefits of Serverless?
  41. 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. 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. 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
  44. 44. Thanks! Grazie! Q&A • You can find me at: marco [dot] parenzan [at] 1nn0va [dot] it

×