Web app job and functions - TUGAIT 2017
-
Upload
steef-jan-wiggers -
Category
Technology
-
view
71 -
download
2
Transcript of Web app job and functions - TUGAIT 2017
![Page 1: Web app job and functions - TUGAIT 2017](https://reader036.fdocuments.in/reader036/viewer/2022062317/5a6744df7f8b9a0c518b4bd5/html5/thumbnails/1.jpg)
TUGA IT 2017LISBON, PORTUGAL
WebApp, Jobs and Functions
STEEF-JAN WIGGERS
![Page 2: Web app job and functions - TUGAIT 2017](https://reader036.fdocuments.in/reader036/viewer/2022062317/5a6744df7f8b9a0c518b4bd5/html5/thumbnails/2.jpg)
THANK YOU TO OUR
SPONSORS
![Page 3: Web app job and functions - TUGAIT 2017](https://reader036.fdocuments.in/reader036/viewer/2022062317/5a6744df7f8b9a0c518b4bd5/html5/thumbnails/3.jpg)
PARTICIPATING
COMMUNITIES CLOUD PRO PT
![Page 4: Web app job and functions - TUGAIT 2017](https://reader036.fdocuments.in/reader036/viewer/2022062317/5a6744df7f8b9a0c518b4bd5/html5/thumbnails/4.jpg)
The best!
![Page 5: Web app job and functions - TUGAIT 2017](https://reader036.fdocuments.in/reader036/viewer/2022062317/5a6744df7f8b9a0c518b4bd5/html5/thumbnails/5.jpg)
![Page 6: Web app job and functions - TUGAIT 2017](https://reader036.fdocuments.in/reader036/viewer/2022062317/5a6744df7f8b9a0c518b4bd5/html5/thumbnails/6.jpg)
Agenda
• WebApp, Job and Functions
• Deployment
• Kudu
• Functions
• Real World Scenarios
• Considerations
• Wrap up
![Page 7: Web app job and functions - TUGAIT 2017](https://reader036.fdocuments.in/reader036/viewer/2022062317/5a6744df7f8b9a0c518b4bd5/html5/thumbnails/7.jpg)
Anatomy of WebJob and Functions
WebAppWebJob
1 .. n 1 .. n
Function
FunctionFunction App
1 .. n
![Page 8: Web app job and functions - TUGAIT 2017](https://reader036.fdocuments.in/reader036/viewer/2022062317/5a6744df7f8b9a0c518b4bd5/html5/thumbnails/8.jpg)
• Languages and Framework
• Superior DevOps
• Self served
• Something else
Apps
Web Apps Mobile Apps API Apps Functions
eCommerce Digital Global Presence LOB API / Services / ISVCustom Apps
App Service
• Limitless/Auto
• OS and Framework
• Load balance
• Something else
• Enterprise grade SLA
• Secure and Compliance
• On-Premise Connectivity
• Something else
![Page 9: Web app job and functions - TUGAIT 2017](https://reader036.fdocuments.in/reader036/viewer/2022062317/5a6744df7f8b9a0c518b4bd5/html5/thumbnails/9.jpg)
Built around app service• Runs on existing App Hosting plans
• Run alongside Web, Mobile, and API Apps• Can deploy via existing App Service ARM APIs
• All the features of App Service• Continuous Deployment• Deployment Slots• Remote Debugging
• Run in your own isolated and dedicated environment• App Service Environment helps run dedicated App Services• Run inside of your own VNET, with your own frontend and firewall
![Page 10: Web app job and functions - TUGAIT 2017](https://reader036.fdocuments.in/reader036/viewer/2022062317/5a6744df7f8b9a0c518b4bd5/html5/thumbnails/10.jpg)
WebJob
• Flexible way to run background jobs
• Can be .cmd, .bat, .exe, .ps1, .sh, .php, .py, .js, .jar
• Execution options: continuous, on demand, scheduled
• Can scale with your website
![Page 11: Web app job and functions - TUGAIT 2017](https://reader036.fdocuments.in/reader036/viewer/2022062317/5a6744df7f8b9a0c518b4bd5/html5/thumbnails/11.jpg)
Function
![Page 12: Web app job and functions - TUGAIT 2017](https://reader036.fdocuments.in/reader036/viewer/2022062317/5a6744df7f8b9a0c518b4bd5/html5/thumbnails/12.jpg)
Languages
• 1st class support• Node/JavaScript
• C#
• Experimental support• F#
• Python
• PHP
• Batch
• Bash
• PowerShell
![Page 13: Web app job and functions - TUGAIT 2017](https://reader036.fdocuments.in/reader036/viewer/2022062317/5a6744df7f8b9a0c518b4bd5/html5/thumbnails/13.jpg)
Azure Function Architecture
FunctionsRuntime
Functions Programming
Interface
App Service App Hosting Plans
Triggers
Input Bindings
Output Bindings
![Page 14: Web app job and functions - TUGAIT 2017](https://reader036.fdocuments.in/reader036/viewer/2022062317/5a6744df7f8b9a0c518b4bd5/html5/thumbnails/14.jpg)
Scale!!!
![Page 15: Web app job and functions - TUGAIT 2017](https://reader036.fdocuments.in/reader036/viewer/2022062317/5a6744df7f8b9a0c518b4bd5/html5/thumbnails/15.jpg)
Demo
![Page 16: Web app job and functions - TUGAIT 2017](https://reader036.fdocuments.in/reader036/viewer/2022062317/5a6744df7f8b9a0c518b4bd5/html5/thumbnails/16.jpg)
Deployment
• Azure Portal
• Visual Studio
• Visual Studio Team Services – Build
• FTP
• Dropbox
• Drag-n-drop in Kudu
• Others …
![Page 17: Web app job and functions - TUGAIT 2017](https://reader036.fdocuments.in/reader036/viewer/2022062317/5a6744df7f8b9a0c518b4bd5/html5/thumbnails/17.jpg)
Publish WebJobs or Functions
![Page 18: Web app job and functions - TUGAIT 2017](https://reader036.fdocuments.in/reader036/viewer/2022062317/5a6744df7f8b9a0c518b4bd5/html5/thumbnails/18.jpg)
Connection
![Page 19: Web app job and functions - TUGAIT 2017](https://reader036.fdocuments.in/reader036/viewer/2022062317/5a6744df7f8b9a0c518b4bd5/html5/thumbnails/19.jpg)
Setting
![Page 20: Web app job and functions - TUGAIT 2017](https://reader036.fdocuments.in/reader036/viewer/2022062317/5a6744df7f8b9a0c518b4bd5/html5/thumbnails/20.jpg)
Deploy
![Page 21: Web app job and functions - TUGAIT 2017](https://reader036.fdocuments.in/reader036/viewer/2022062317/5a6744df7f8b9a0c518b4bd5/html5/thumbnails/21.jpg)
Kudu
• Engine behind git deployments and WebJobs
• Can be run outside of Azure
• Provides dashboard functionality for a website
Project Site
https://github.com/projectkudu/kudu
![Page 22: Web app job and functions - TUGAIT 2017](https://reader036.fdocuments.in/reader036/viewer/2022062317/5a6744df7f8b9a0c518b4bd5/html5/thumbnails/22.jpg)
Paths & FilesFile/Path
disable.job Existence of file stops the job. Deleting it starts the job.
settings.job Allows you to indicate: is_singleton to scale with website.{ “is_singleton”: true } or { “is_singleton”: false }
site\wwwroot\App_Data\jobs\continuous Path for continuous web jobs
site\wwwroot\App_Data\jobs\triggered Path for on demand and scheduled web jobs
data\jobs Data directories for jobs
job_log.txt Text file of web job log
status_{hash} Status file
WebJobsSDK.marker Singleton lock file
![Page 23: Web app job and functions - TUGAIT 2017](https://reader036.fdocuments.in/reader036/viewer/2022062317/5a6744df7f8b9a0c518b4bd5/html5/thumbnails/23.jpg)
Demo - Kudu
WebAppWebJob
1 .. n 1 .. n
Function
FunctionFunction App
1 .. n
KUDU
![Page 24: Web app job and functions - TUGAIT 2017](https://reader036.fdocuments.in/reader036/viewer/2022062317/5a6744df7f8b9a0c518b4bd5/html5/thumbnails/24.jpg)
Function triggers
• A method can be “triggered” by some event
• Route parameters and bindings help simplify inputs and outputs
• A few options for logging that surface information in the Azure Portal
![Page 25: Web app job and functions - TUGAIT 2017](https://reader036.fdocuments.in/reader036/viewer/2022062317/5a6744df7f8b9a0c518b4bd5/html5/thumbnails/25.jpg)
Function – Trigger and bindingsType Service Trigger Input Output
Schedule Azure Functions ✔
HTTP (REST or webhook)
Azure Functions ✔ ✔*
Blob Storage Azure Storage ✔ ✔ ✔
Events Azure Event Hubs ✔ ✔
Queues Azure Storage ✔ ✔
Queues and topics Azure Service Bus ✔ ✔
Tables Azure Storage ✔ ✔
Tables Azure Mobile Apps ✔ ✔
No-SQL DB Azure DocumentDB ✔ ✔
Push Notifications Azure Notification Hubs
✔
Twilio SMS Text Twilio ✔
![Page 26: Web app job and functions - TUGAIT 2017](https://reader036.fdocuments.in/reader036/viewer/2022062317/5a6744df7f8b9a0c518b4bd5/html5/thumbnails/26.jpg)
Functions – Proxies (preview)
• Specify endpoint for other resources
WebAppWebJob
1 .. n 1 .. n
Function
FunctionFunction App
1 .. nProxies
![Page 27: Web app job and functions - TUGAIT 2017](https://reader036.fdocuments.in/reader036/viewer/2022062317/5a6744df7f8b9a0c518b4bd5/html5/thumbnails/27.jpg)
Demo
![Page 28: Web app job and functions - TUGAIT 2017](https://reader036.fdocuments.in/reader036/viewer/2022062317/5a6744df7f8b9a0c518b4bd5/html5/thumbnails/28.jpg)
Real world scenario - 1
• Push customer data to Redis Cache
Inbound
Web Job
Azure cache
(REDIS)
Self-Service Portal
API Management
Outbound Inbound
WebAPI WebAPI
VIP
Web Job
Azure cache
(REDIS)
To Redis
Storage (Azure)
Web Job Dashboard
Administrator/Developer Portal
DatastoreNuon
(Windows) Service (Windows) Service
![Page 29: Web app job and functions - TUGAIT 2017](https://reader036.fdocuments.in/reader036/viewer/2022062317/5a6744df7f8b9a0c518b4bd5/html5/thumbnails/29.jpg)
Real world scenario - 2
• MPR Data Parser
.VEE filesEDI format
MPR
WebJob(Parsing)
EDI to JSON
Storage blob
Push
Storage blob
![Page 30: Web app job and functions - TUGAIT 2017](https://reader036.fdocuments.in/reader036/viewer/2022062317/5a6744df7f8b9a0c518b4bd5/html5/thumbnails/30.jpg)
Real world scenario – 3
• Sync All WebJob
WebJobsLMS365 API Logic Apps
Dynamics CRM
Online
![Page 31: Web app job and functions - TUGAIT 2017](https://reader036.fdocuments.in/reader036/viewer/2022062317/5a6744df7f8b9a0c518b4bd5/html5/thumbnails/31.jpg)
WebJob - Demo
.VEE filesEDI format
MPR
WebJob(Parsing)
EDI to JSON
Storage blob
Push
Storage blob
![Page 32: Web app job and functions - TUGAIT 2017](https://reader036.fdocuments.in/reader036/viewer/2022062317/5a6744df7f8b9a0c518b4bd5/html5/thumbnails/32.jpg)
Trigger Extensibility
• TimerTrigger
• FileTrigger
• SendGrid
• ErrorTrigger
• WebHooks
• Project Site:
https://github.com/Azure/azure-webjobs-sdk-extensions
![Page 33: Web app job and functions - TUGAIT 2017](https://reader036.fdocuments.in/reader036/viewer/2022062317/5a6744df7f8b9a0c518b4bd5/html5/thumbnails/33.jpg)
Considerations
• Logic App depending on workload:• Big workloads, processing WebJobs
• Specific processing Functions
• Connectivity, process Logic Apps, Flow
• Schedule
• Standalone
• Security
WebAppWebJob
1 .. n 1 .. n
Function
FunctionFunction App
1 .. n
Visual Studio
Visual Studio / Browser
![Page 34: Web app job and functions - TUGAIT 2017](https://reader036.fdocuments.in/reader036/viewer/2022062317/5a6744df7f8b9a0c518b4bd5/html5/thumbnails/34.jpg)
Azure Logic Apps
• Faster integration using innovative Visual Designer
• Easy workflow creation with triggers and actions
• Mashup applications, data and services
• Built for mission critical Enterprise Integration
• Create, deploy, manage and monitor
![Page 35: Web app job and functions - TUGAIT 2017](https://reader036.fdocuments.in/reader036/viewer/2022062317/5a6744df7f8b9a0c518b4bd5/html5/thumbnails/35.jpg)
Demo
Logic App
Function
Cognitive Service APITekst Analysis
good
moderate
bad
Tweets with hashtag #trump
Post Tweet Body and Tweeted By
Evaluate score
Send tweet text
IF THAT THEN THIS AND MORE….
![Page 36: Web app job and functions - TUGAIT 2017](https://reader036.fdocuments.in/reader036/viewer/2022062317/5a6744df7f8b9a0c518b4bd5/html5/thumbnails/36.jpg)
Competitions
![Page 37: Web app job and functions - TUGAIT 2017](https://reader036.fdocuments.in/reader036/viewer/2022062317/5a6744df7f8b9a0c518b4bd5/html5/thumbnails/37.jpg)
Wrap up
• Flexible means of task automation
• Scalable
• Mature
• Kudu
• Workloads
• Developer experience
• DevOps
![Page 38: Web app job and functions - TUGAIT 2017](https://reader036.fdocuments.in/reader036/viewer/2022062317/5a6744df7f8b9a0c518b4bd5/html5/thumbnails/38.jpg)
Resources• Azure WebJobs resources: http://bit.ly/1KdUkIH
• https://github.com/Azure/azure-webjobs-sdk-samples
• Azure WebJobs: ServiceBusTrigger
• Azure Functions: https://azure.microsoft.com/en-us/services/functions/
• Azure Functions Docs: https://docs.microsoft.com/en-us/azure/azure-functions/functions-overview
• Serverless functions: https://github.com/serverless/serverless-azure-functions
![Page 39: Web app job and functions - TUGAIT 2017](https://reader036.fdocuments.in/reader036/viewer/2022062317/5a6744df7f8b9a0c518b4bd5/html5/thumbnails/39.jpg)
Want to connect?
@SteefJan
Steef-Jan Wiggers
![Page 40: Web app job and functions - TUGAIT 2017](https://reader036.fdocuments.in/reader036/viewer/2022062317/5a6744df7f8b9a0c518b4bd5/html5/thumbnails/40.jpg)
PLEASE FILL IN EVALUATION
FORMSFRIDAY, MAY 19th SATURDAY, MAY 20th
https://survs.com/survey/cprwce7pi8 https://survs.com/survey/l9kksmlzd8
YOUR OPINION IS
IMPORTANT!
![Page 41: Web app job and functions - TUGAIT 2017](https://reader036.fdocuments.in/reader036/viewer/2022062317/5a6744df7f8b9a0c518b4bd5/html5/thumbnails/41.jpg)
THANK YOU TO
LISTENING
Questions anyone?