SlideShare ist ein Scribd-Unternehmen logo
1 von 38
Downloaden Sie, um offline zu lesen
No hamsters are involved in the
process of running your functions
#SPSOslo - @eliostruyf
What is Serverless?
• AKA: FaaS (Function as a Service)
• Abstraction of servers
• Event-driven / instant scale
• Pay-per-use
• Micro-services  a way to decouple your monolithic applications
• No permanent storage, or it has to live somewhere else
Azure Functions
• Running pieces of code / scripts in the cloud
• Use the language of your preference
• C#, Node.js (JavaScript), F#, Python, PHP, PowerShell, Java
• Runs on Azure App Services
Use cases
• Timer function
• Call from SPFx web part
• Call from site design / flow
• …
Azure Functions – Pricing plans
Consumption plan
• € 0,17 per one million requests
• Scales up automatically
• Useful for smaller workloads
• Max. timeout of 10 minutes
App Service Plan
• Depends on the chosen plan
• You’re in control of scaling
• Faster / higher workload
• No timeout
Turn on: always on!
Azure Functions vs Web Jobs
Similarities
• Both can be scheduled or use a trigger (queue/blob/etc.)
• Both support C#, JavaScript, PS
Differences
• Pricing
• Development flexibility
• Easier to call Azure Functions (HTTP Trigger)
• It has its own UI in Azure
• Restrictions: 10 minutes timeout
Security options
Simple function authentication
• A code passed to the function
• On function level or app/admin level
https://<app-name>.azurewebsites.net/api/<function>?code=<code>
Azure AD Authentication
• Use OAuth token to call the function
• Great use in combination with SPFx solutions: AadHttpClient
#SPSOslo - @eliostruyf
Demo:
Checking out the portal
Local development
Local development options
Any stack / editor / platform
• azure-functions-cli
• Node.js
Visual Studio
• True C# functions
• VS2017 plugin
Useful CLI commands
• func init  initialize a new project
• func new  create a new function
• func host start  start up the functions runtime
• func azure login
• func azure functionapp fetch-app-settings <function-name>
• func azure storage fetch-connection-string <storage-name>
Debugging your functions
• Run: func host start
• Press F5 in Visual Studio Code and execute your function
#SPSOslo - @eliostruyf
Demo:
Writing your first Azure Function
#SPSOslo - @eliostruyf
Dependencies
#SPSOslo - @eliostruyf
Importing dependencies
• Node.js  npm install
• Make sure you create a package.json file (npm init)
• Best to be placed on the root level
• C#
• Use NuGet like you are used using it
#SPSOslo - @eliostruyf
Working with environment
variables
#SPSOslo - @eliostruyf
Working with environment variables
• Node.js
• process.env.<setting-name>
• C#
• GetEnvironmentVariable("<setting-name>")
#SPSOslo - @eliostruyf
Bindings
#SPSOslo - @eliostruyf
Working with bindings
Blob storage
Cosmos DB
Storage queue
Service bus
HTTP
…
Input
Blob storage
Cosmos DB
Storage queue
SendGrid
Twilio
…
Output
Queues are great for…
Anything that should be picked up by a longer running task
• SharePoint site provisioning
• SharePoint web hooks
• File processing (e.g. image size optimization)
QueueTrigger function
• Auto-runs your code when a message gets added
• If fails, it tried by default 5 times
Queues are great for…
Item 1
Item 2
Item 3
Item 4
Item 5
Item 6
Queue triggeredHTTP Triggered
Working with bindings
Add you bindings to the function.json file
{
"disabled": false,
"bindings": [{
"authLevel": "function",
"type": "httpTrigger",
"direction": "in",
"name": "req"
},
{
"type": "queue",
"name": "spfxversions",
"direction": "out",
"queueName": "versions",
"connection": "AzureWebJobsStorage"
}]
}
#SPSOslo - @eliostruyf
Demo:
Creating settings and bindings
#SPSOslo - @eliostruyf
Deployment
Deployment options
• Publish from Visual Studio
• CLI: func azure functionapp publish <function-name>
• Use local GIT repository
• Continuous deployment via VSTS
Do not forget to configure
your settings
#SPSOslo - @eliostruyf
Cold start
Optimizing the cold start
• Precompile C# created functions
• Not use the *.csx files
• Use Visual Studio + Azure development workload
• Use Azure Functions Pack for Node.js
• https://github.com/Azure/azure-functions-pack
• Uses Webpack
• Add your dependencies at root level of the host!
#SPSOslo - @eliostruyf
Demo:
Deployment via local GIT repo
#SPSOslo - @eliostruyf
What’s next?
#SPSOslo - @eliostruyf
Durable functions
• Extension on top of Azure Functions and WebJobs
• Write stateful functions
• Waiting for human interaction
Azure Functions – on-premises
https://elst.es/2GXcdyU
Questions?
Office Servers & Services MVP
Azure / Office 365 / SharePoint
@eliostruyf
www.eliostruyf.com
info@estruyf.be
Elio Struyf
Developer & Architect
#SPSOslo - @eliostruyf

Weitere ähnliche Inhalte

Was ist angesagt?

Was ist angesagt? (20)

[Pinto] Is my SharePoint Development team properly enlighted?
[Pinto] Is my SharePoint Development team properly enlighted?[Pinto] Is my SharePoint Development team properly enlighted?
[Pinto] Is my SharePoint Development team properly enlighted?
 
[White/Himmelstein] Bridge the Cloud Divide with Hybrid Business Intelligence
[White/Himmelstein] Bridge the Cloud Divide with Hybrid Business Intelligence[White/Himmelstein] Bridge the Cloud Divide with Hybrid Business Intelligence
[White/Himmelstein] Bridge the Cloud Divide with Hybrid Business Intelligence
 
Microsoft Flow best practices European Collaboration Summit 2018
Microsoft Flow best practices European Collaboration Summit 2018Microsoft Flow best practices European Collaboration Summit 2018
Microsoft Flow best practices European Collaboration Summit 2018
 
[Carius] Skype Online, Teams, and PSTN
[Carius] Skype Online, Teams, and PSTN[Carius] Skype Online, Teams, and PSTN
[Carius] Skype Online, Teams, and PSTN
 
[Roine] Serverless: Don't Take It Literally
[Roine] Serverless: Don't Take It Literally[Roine] Serverless: Don't Take It Literally
[Roine] Serverless: Don't Take It Literally
 
O365Con18 - Site Templates, Site Life Cycle Management and Modern SharePoint ...
O365Con18 - Site Templates, Site Life Cycle Management and Modern SharePoint ...O365Con18 - Site Templates, Site Life Cycle Management and Modern SharePoint ...
O365Con18 - Site Templates, Site Life Cycle Management and Modern SharePoint ...
 
ECS19 - Mike Ammerlaan - Integrate with OneDrive and SharePoint Files
ECS19 - Mike Ammerlaan - Integrate with OneDrive and SharePoint FilesECS19 - Mike Ammerlaan - Integrate with OneDrive and SharePoint Files
ECS19 - Mike Ammerlaan - Integrate with OneDrive and SharePoint Files
 
DEVELOPING SHAREPOINT FRAMEWORK SOLUTIONS FOR THE ENTERPRISE
DEVELOPING SHAREPOINT FRAMEWORK SOLUTIONS FOR THE ENTERPRISEDEVELOPING SHAREPOINT FRAMEWORK SOLUTIONS FOR THE ENTERPRISE
DEVELOPING SHAREPOINT FRAMEWORK SOLUTIONS FOR THE ENTERPRISE
 
[Vochten/Harbar] SharePoint Server On Premises & Hybrid PowerClass
[Vochten/Harbar] SharePoint Server On Premises & Hybrid PowerClass[Vochten/Harbar] SharePoint Server On Premises & Hybrid PowerClass
[Vochten/Harbar] SharePoint Server On Premises & Hybrid PowerClass
 
Ecs19 - Hans Brender - Is OneDrive Really Enterprise Ready
Ecs19 - Hans Brender -  Is OneDrive Really Enterprise ReadyEcs19 - Hans Brender -  Is OneDrive Really Enterprise Ready
Ecs19 - Hans Brender - Is OneDrive Really Enterprise Ready
 
[Patel] SPFx: An ISV Insight into latest Microsoft's customization model
[Patel] SPFx: An ISV Insight into latest Microsoft's customization model[Patel] SPFx: An ISV Insight into latest Microsoft's customization model
[Patel] SPFx: An ISV Insight into latest Microsoft's customization model
 
Chris O'Brien - Comparing SharePoint add-ins (apps) with Office 365 apps
Chris O'Brien - Comparing SharePoint add-ins (apps) with Office 365 appsChris O'Brien - Comparing SharePoint add-ins (apps) with Office 365 apps
Chris O'Brien - Comparing SharePoint add-ins (apps) with Office 365 apps
 
Chris O'Brien - Modern SharePoint development: techniques for moving code off...
Chris O'Brien - Modern SharePoint development: techniques for moving code off...Chris O'Brien - Modern SharePoint development: techniques for moving code off...
Chris O'Brien - Modern SharePoint development: techniques for moving code off...
 
ECS19 - Serge Luca - MICROSOFT FLOW IN REAL WORLD PROJECTS: 3 YEARS LATER AN...
ECS19 - Serge Luca -  MICROSOFT FLOW IN REAL WORLD PROJECTS: 3 YEARS LATER AN...ECS19 - Serge Luca -  MICROSOFT FLOW IN REAL WORLD PROJECTS: 3 YEARS LATER AN...
ECS19 - Serge Luca - MICROSOFT FLOW IN REAL WORLD PROJECTS: 3 YEARS LATER AN...
 
O365Con18 - Automate your Tasks through Azure Functions - Elio Struyf
O365Con18 - Automate your Tasks through Azure Functions - Elio StruyfO365Con18 - Automate your Tasks through Azure Functions - Elio Struyf
O365Con18 - Automate your Tasks through Azure Functions - Elio Struyf
 
[McDermott] Configuring SharePoint Hybrid Search and Taxonomy
[McDermott] Configuring SharePoint Hybrid Search and Taxonomy[McDermott] Configuring SharePoint Hybrid Search and Taxonomy
[McDermott] Configuring SharePoint Hybrid Search and Taxonomy
 
SPUnite17 Timer Jobs Event Handlers
SPUnite17 Timer Jobs Event HandlersSPUnite17 Timer Jobs Event Handlers
SPUnite17 Timer Jobs Event Handlers
 
A Deep-Dive into Real-World SharePoint App Development
A Deep-Dive into Real-World SharePoint App DevelopmentA Deep-Dive into Real-World SharePoint App Development
A Deep-Dive into Real-World SharePoint App Development
 
ECS19 - Nik Charlebois - Automate the Deployment & Monitoring of SharePoint w...
ECS19 - Nik Charlebois - Automate the Deployment & Monitoring of SharePoint w...ECS19 - Nik Charlebois - Automate the Deployment & Monitoring of SharePoint w...
ECS19 - Nik Charlebois - Automate the Deployment & Monitoring of SharePoint w...
 
ECS19 - John White - Unlock SharePoint’s Reporting Secrets
ECS19 - John White - Unlock SharePoint’s Reporting SecretsECS19 - John White - Unlock SharePoint’s Reporting Secrets
ECS19 - John White - Unlock SharePoint’s Reporting Secrets
 

Ähnlich wie [Struyf] Automate Your Tasks With Azure Functions

Ähnlich wie [Struyf] Automate Your Tasks With Azure Functions (20)

O365Con19 - Developing Timerjob and Eventhandler Equivalents - Adis Jugo
O365Con19 - Developing Timerjob and Eventhandler Equivalents - Adis JugoO365Con19 - Developing Timerjob and Eventhandler Equivalents - Adis Jugo
O365Con19 - Developing Timerjob and Eventhandler Equivalents - Adis Jugo
 
introduction to node.js
introduction to node.jsintroduction to node.js
introduction to node.js
 
Azure Functions in Action #OrlandoCC
Azure Functions in Action #OrlandoCCAzure Functions in Action #OrlandoCC
Azure Functions in Action #OrlandoCC
 
Utilizing the OpenNTF Domino API
Utilizing the OpenNTF Domino APIUtilizing the OpenNTF Domino API
Utilizing the OpenNTF Domino API
 
How to create a Function App on Cosmos DB
How to create a Function App on Cosmos DBHow to create a Function App on Cosmos DB
How to create a Function App on Cosmos DB
 
Alfresco Development Framework Basic
Alfresco Development Framework BasicAlfresco Development Framework Basic
Alfresco Development Framework Basic
 
IVS CTO Night And Day 2018 Winter - [re:Cap] Serverless & Mobile
IVS CTO Night And Day 2018 Winter - [re:Cap] Serverless & MobileIVS CTO Night And Day 2018 Winter - [re:Cap] Serverless & Mobile
IVS CTO Night And Day 2018 Winter - [re:Cap] Serverless & Mobile
 
用Serverless技術快速開發line聊天機器人
用Serverless技術快速開發line聊天機器人用Serverless技術快速開發line聊天機器人
用Serverless技術快速開發line聊天機器人
 
Ansible benelux meetup - Amsterdam 27-5-2015
Ansible benelux meetup - Amsterdam 27-5-2015Ansible benelux meetup - Amsterdam 27-5-2015
Ansible benelux meetup - Amsterdam 27-5-2015
 
Cloud Platforms for Java
Cloud Platforms for JavaCloud Platforms for Java
Cloud Platforms for Java
 
Azure functions
Azure functionsAzure functions
Azure functions
 
Intro to CakePHP
Intro to CakePHPIntro to CakePHP
Intro to CakePHP
 
What's New in .Net 4.5
What's New in .Net 4.5What's New in .Net 4.5
What's New in .Net 4.5
 
Azure serverless architectures
Azure serverless architecturesAzure serverless architectures
Azure serverless architectures
 
DevOps, Continuous Integration and Deployment on AWS: Putting Money Back into...
DevOps, Continuous Integration and Deployment on AWS: Putting Money Back into...DevOps, Continuous Integration and Deployment on AWS: Putting Money Back into...
DevOps, Continuous Integration and Deployment on AWS: Putting Money Back into...
 
Devops continuousintegration and deployment onaws puttingmoneybackintoyourmis...
Devops continuousintegration and deployment onaws puttingmoneybackintoyourmis...Devops continuousintegration and deployment onaws puttingmoneybackintoyourmis...
Devops continuousintegration and deployment onaws puttingmoneybackintoyourmis...
 
Back to the 90s' - Revenge of the static website
Back to the 90s' - Revenge of the static websiteBack to the 90s' - Revenge of the static website
Back to the 90s' - Revenge of the static website
 
Play with azure functions
Play with azure functionsPlay with azure functions
Play with azure functions
 
Getting Started with Serverless Architectures
Getting Started with Serverless ArchitecturesGetting Started with Serverless Architectures
Getting Started with Serverless Architectures
 
Azure Functions - Introduction
Azure Functions - IntroductionAzure Functions - Introduction
Azure Functions - Introduction
 

Mehr von European Collaboration Summit

Mehr von European Collaboration Summit (20)

ECS19 - Bram De Jager - Design a secure collaboration solution with Azure In...
ECS19 -  Bram De Jager - Design a secure collaboration solution with Azure In...ECS19 -  Bram De Jager - Design a secure collaboration solution with Azure In...
ECS19 - Bram De Jager - Design a secure collaboration solution with Azure In...
 
ECS19 - Eric Harlan - Increasing throughput of Office 365
ECS19 - Eric Harlan - Increasing throughput of Office 365ECS19 - Eric Harlan - Increasing throughput of Office 365
ECS19 - Eric Harlan - Increasing throughput of Office 365
 
ECS19 - Ahmad Najjar - Logic Apps vs Microsoft Flow - When, how and where?
ECS19 - Ahmad Najjar - Logic Apps vs Microsoft Flow - When, how and where?ECS19 - Ahmad Najjar - Logic Apps vs Microsoft Flow - When, how and where?
ECS19 - Ahmad Najjar - Logic Apps vs Microsoft Flow - When, how and where?
 
ECS19 - Michael Van Horenbeeck - Divide Et Imperat Office 365 Mergers, Acquis...
ECS19 - Michael Van Horenbeeck - Divide Et Imperat Office 365 Mergers, Acquis...ECS19 - Michael Van Horenbeeck - Divide Et Imperat Office 365 Mergers, Acquis...
ECS19 - Michael Van Horenbeeck - Divide Et Imperat Office 365 Mergers, Acquis...
 
ECS19 - Christina Wheeler - Become Data Modeling Superhero
ECS19 - Christina Wheeler - Become Data Modeling SuperheroECS19 - Christina Wheeler - Become Data Modeling Superhero
ECS19 - Christina Wheeler - Become Data Modeling Superhero
 
ECS19 - Ahmad Najjar and Serge Luca - Power Platform Tutorial
ECS19 - Ahmad Najjar and Serge Luca - Power Platform TutorialECS19 - Ahmad Najjar and Serge Luca - Power Platform Tutorial
ECS19 - Ahmad Najjar and Serge Luca - Power Platform Tutorial
 
ECS19 - Vesa Juvonen - SharePoint and Office 365 Development PowerClass
ECS19 - Vesa Juvonen - SharePoint and Office 365 Development PowerClassECS19 - Vesa Juvonen - SharePoint and Office 365 Development PowerClass
ECS19 - Vesa Juvonen - SharePoint and Office 365 Development PowerClass
 
ECS19 - Paolo Pialorsi - Building Portals with modern SharePoint experiences
ECS19 - Paolo Pialorsi - Building Portals with modern SharePoint experiencesECS19 - Paolo Pialorsi - Building Portals with modern SharePoint experiences
ECS19 - Paolo Pialorsi - Building Portals with modern SharePoint experiences
 
ECS19 - Nicki Borell - Microsoft Cybersecurity Reference Architecture
ECS19 - Nicki Borell - Microsoft Cybersecurity Reference ArchitectureECS19 - Nicki Borell - Microsoft Cybersecurity Reference Architecture
ECS19 - Nicki Borell - Microsoft Cybersecurity Reference Architecture
 
ECS19 - Mike Ammerlaan - Microsoft Graph Data Connect
ECS19 - Mike Ammerlaan - Microsoft Graph Data ConnectECS19 - Mike Ammerlaan - Microsoft Graph Data Connect
ECS19 - Mike Ammerlaan - Microsoft Graph Data Connect
 
ECS19 - Vesa Juvonen, Paolo Pialorsi - Building “modern” portals with SharePo...
ECS19 - Vesa Juvonen, Paolo Pialorsi - Building “modern” portals with SharePo...ECS19 - Vesa Juvonen, Paolo Pialorsi - Building “modern” portals with SharePo...
ECS19 - Vesa Juvonen, Paolo Pialorsi - Building “modern” portals with SharePo...
 
ECS19 - Vesa Juvonen - Getting Started With SharePoint Framework - Roadmap
ECS19 - Vesa Juvonen - Getting Started With SharePoint Framework - RoadmapECS19 - Vesa Juvonen - Getting Started With SharePoint Framework - Roadmap
ECS19 - Vesa Juvonen - Getting Started With SharePoint Framework - Roadmap
 
ECS19 - Bill Ayers - UNLOCK YOUR BUSINESS KNOWLEDGE WITH THE MICROSOFT GRAPH,...
ECS19 - Bill Ayers - UNLOCK YOUR BUSINESS KNOWLEDGE WITH THE MICROSOFT GRAPH,...ECS19 - Bill Ayers - UNLOCK YOUR BUSINESS KNOWLEDGE WITH THE MICROSOFT GRAPH,...
ECS19 - Bill Ayers - UNLOCK YOUR BUSINESS KNOWLEDGE WITH THE MICROSOFT GRAPH,...
 
ECS19 - Toni Pohl - Develop intelligent apps for the Modern Workplace
ECS19 - Toni Pohl - Develop intelligent apps for the Modern WorkplaceECS19 - Toni Pohl - Develop intelligent apps for the Modern Workplace
ECS19 - Toni Pohl - Develop intelligent apps for the Modern Workplace
 
ECS19 - Tomislav Lulic - What is changed in product/service licensing with Cl...
ECS19 - Tomislav Lulic - What is changed in product/service licensing with Cl...ECS19 - Tomislav Lulic - What is changed in product/service licensing with Cl...
ECS19 - Tomislav Lulic - What is changed in product/service licensing with Cl...
 
ECS19 - Thomas Vochten - ESSENTIAL DATABASE ADMINISTRATION SKILLS FOR SHAREPO...
ECS19 - Thomas Vochten - ESSENTIAL DATABASE ADMINISTRATION SKILLS FOR SHAREPO...ECS19 - Thomas Vochten - ESSENTIAL DATABASE ADMINISTRATION SKILLS FOR SHAREPO...
ECS19 - Thomas Vochten - ESSENTIAL DATABASE ADMINISTRATION SKILLS FOR SHAREPO...
 
ECS19 - Thomas Goelles, Stephan Bisser - Unite your workplace with Microsoft'...
ECS19 - Thomas Goelles, Stephan Bisser - Unite your workplace with Microsoft'...ECS19 - Thomas Goelles, Stephan Bisser - Unite your workplace with Microsoft'...
ECS19 - Thomas Goelles, Stephan Bisser - Unite your workplace with Microsoft'...
 
ECS19 - Steven Collier - Live Events in Teams, Yammer and Stream using Extern...
ECS19 - Steven Collier - Live Events in Teams, Yammer and Stream using Extern...ECS19 - Steven Collier - Live Events in Teams, Yammer and Stream using Extern...
ECS19 - Steven Collier - Live Events in Teams, Yammer and Stream using Extern...
 
ECS19 - Samuel Zuercher - Do I still need an Intranet or is MS Teams just eno...
ECS19 - Samuel Zuercher - Do I still need an Intranet or is MS Teams just eno...ECS19 - Samuel Zuercher - Do I still need an Intranet or is MS Teams just eno...
ECS19 - Samuel Zuercher - Do I still need an Intranet or is MS Teams just eno...
 
ECS19 - Rodrigo Pinto - Modernize Your Classic SharePoint Sites
ECS19 - Rodrigo Pinto - Modernize Your Classic SharePoint SitesECS19 - Rodrigo Pinto - Modernize Your Classic SharePoint Sites
ECS19 - Rodrigo Pinto - Modernize Your Classic SharePoint Sites
 

Kürzlich hochgeladen

%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
masabamasaba
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
mohitmore19
 
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
masabamasaba
 

Kürzlich hochgeladen (20)

Exploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdfExploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdf
 
Architecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the pastArchitecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the past
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation Template
 
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
 
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
 
VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learn
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
%in Durban+277-882-255-28 abortion pills for sale in Durban
%in Durban+277-882-255-28 abortion pills for sale in Durban%in Durban+277-882-255-28 abortion pills for sale in Durban
%in Durban+277-882-255-28 abortion pills for sale in Durban
 
The Top App Development Trends Shaping the Industry in 2024-25 .pdf
The Top App Development Trends Shaping the Industry in 2024-25 .pdfThe Top App Development Trends Shaping the Industry in 2024-25 .pdf
The Top App Development Trends Shaping the Industry in 2024-25 .pdf
 
SHRMPro HRMS Software Solutions Presentation
SHRMPro HRMS Software Solutions PresentationSHRMPro HRMS Software Solutions Presentation
SHRMPro HRMS Software Solutions Presentation
 
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
%in Harare+277-882-255-28 abortion pills for sale in Harare
%in Harare+277-882-255-28 abortion pills for sale in Harare%in Harare+277-882-255-28 abortion pills for sale in Harare
%in Harare+277-882-255-28 abortion pills for sale in Harare
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
 
Generic or specific? Making sensible software design decisions
Generic or specific? Making sensible software design decisionsGeneric or specific? Making sensible software design decisions
Generic or specific? Making sensible software design decisions
 
%+27788225528 love spells in Vancouver Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Vancouver Psychic Readings, Attraction spells,Br...%+27788225528 love spells in Vancouver Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Vancouver Psychic Readings, Attraction spells,Br...
 

[Struyf] Automate Your Tasks With Azure Functions

  • 1.
  • 2.
  • 3.
  • 4. No hamsters are involved in the process of running your functions
  • 5. #SPSOslo - @eliostruyf What is Serverless? • AKA: FaaS (Function as a Service) • Abstraction of servers • Event-driven / instant scale • Pay-per-use • Micro-services  a way to decouple your monolithic applications • No permanent storage, or it has to live somewhere else
  • 6.
  • 7. Azure Functions • Running pieces of code / scripts in the cloud • Use the language of your preference • C#, Node.js (JavaScript), F#, Python, PHP, PowerShell, Java • Runs on Azure App Services Use cases • Timer function • Call from SPFx web part • Call from site design / flow • …
  • 8. Azure Functions – Pricing plans Consumption plan • € 0,17 per one million requests • Scales up automatically • Useful for smaller workloads • Max. timeout of 10 minutes App Service Plan • Depends on the chosen plan • You’re in control of scaling • Faster / higher workload • No timeout Turn on: always on!
  • 9. Azure Functions vs Web Jobs Similarities • Both can be scheduled or use a trigger (queue/blob/etc.) • Both support C#, JavaScript, PS Differences • Pricing • Development flexibility • Easier to call Azure Functions (HTTP Trigger) • It has its own UI in Azure • Restrictions: 10 minutes timeout
  • 10. Security options Simple function authentication • A code passed to the function • On function level or app/admin level https://<app-name>.azurewebsites.net/api/<function>?code=<code> Azure AD Authentication • Use OAuth token to call the function • Great use in combination with SPFx solutions: AadHttpClient
  • 13. Local development options Any stack / editor / platform • azure-functions-cli • Node.js Visual Studio • True C# functions • VS2017 plugin
  • 14. Useful CLI commands • func init  initialize a new project • func new  create a new function • func host start  start up the functions runtime • func azure login • func azure functionapp fetch-app-settings <function-name> • func azure storage fetch-connection-string <storage-name>
  • 15. Debugging your functions • Run: func host start • Press F5 in Visual Studio Code and execute your function
  • 16. #SPSOslo - @eliostruyf Demo: Writing your first Azure Function
  • 18. #SPSOslo - @eliostruyf Importing dependencies • Node.js  npm install • Make sure you create a package.json file (npm init) • Best to be placed on the root level • C# • Use NuGet like you are used using it
  • 19. #SPSOslo - @eliostruyf Working with environment variables
  • 20. #SPSOslo - @eliostruyf Working with environment variables • Node.js • process.env.<setting-name> • C# • GetEnvironmentVariable("<setting-name>")
  • 22. #SPSOslo - @eliostruyf Working with bindings Blob storage Cosmos DB Storage queue Service bus HTTP … Input Blob storage Cosmos DB Storage queue SendGrid Twilio … Output
  • 23. Queues are great for… Anything that should be picked up by a longer running task • SharePoint site provisioning • SharePoint web hooks • File processing (e.g. image size optimization) QueueTrigger function • Auto-runs your code when a message gets added • If fails, it tried by default 5 times
  • 24. Queues are great for… Item 1 Item 2 Item 3 Item 4 Item 5 Item 6 Queue triggeredHTTP Triggered
  • 25. Working with bindings Add you bindings to the function.json file { "disabled": false, "bindings": [{ "authLevel": "function", "type": "httpTrigger", "direction": "in", "name": "req" }, { "type": "queue", "name": "spfxversions", "direction": "out", "queueName": "versions", "connection": "AzureWebJobsStorage" }] }
  • 26. #SPSOslo - @eliostruyf Demo: Creating settings and bindings
  • 28. Deployment options • Publish from Visual Studio • CLI: func azure functionapp publish <function-name> • Use local GIT repository • Continuous deployment via VSTS
  • 29. Do not forget to configure your settings
  • 31. Optimizing the cold start • Precompile C# created functions • Not use the *.csx files • Use Visual Studio + Azure development workload • Use Azure Functions Pack for Node.js • https://github.com/Azure/azure-functions-pack • Uses Webpack • Add your dependencies at root level of the host!
  • 34. #SPSOslo - @eliostruyf Durable functions • Extension on top of Azure Functions and WebJobs • Write stateful functions • Waiting for human interaction
  • 35. Azure Functions – on-premises https://elst.es/2GXcdyU
  • 37. Office Servers & Services MVP Azure / Office 365 / SharePoint @eliostruyf www.eliostruyf.com info@estruyf.be Elio Struyf Developer & Architect