SlideShare a Scribd company logo
1 of 23
Azure Functions and Container Instances
By John Staveley
02/03/2019
https://uk.linkedin.com/in/johnstaveley/
@johnstaveley
Overview
The Problem
Selenium and Page Object Model
Azure Functions – developer experience
Docker
SideCar pattern
Azure Container Instances
Polly for reliability
Who am I?
John Staveley
Mvc C# Azure Angular developer
Organiser at Leeds Sharp, Leeds Data Science meetups
Second migration into Azure from OnPrem
The Problem
Problem Requirements
No Api
Interact with the website
– Navigate to the website
– Logon
– Navigate to target web page
– Interact with the page
Do this every day at 8pm without fail
Try and avoid additional cost (No more Vms!)
Framework for solving similar problems
Architectural Diagram of MajorDomo
Azure Functions
Used to drive the actions
WebJobs bad, Azure functions good
Service plan vs Consumption charging
Azure SDK in visual studio, uses .Net core 2.2
Precompiled function
Triggers: Blob/Table/MongoDb storage, Queue, Timer
Local Function and Storage Emulators for debug
Deploy as web service
Why Selenium?
Selenium
Used to drive a browser to interact with the website
Supports Chrome, Firefox, IE, Edge etc
Selenium Grid
Page Object Model Example 1
Pattern used to ensure a maintainable representation of the
web pages
Page Object Model Example 2
Page Object Model Example 3
MajorDomo Demo
See selenium interacting with the web pages
Code explanation
– Pages using Page Object Model
– How Page object model was used
Docker and SideCar pattern
Used to contain the browser
Why? So I can test selenium grid will work locally
Docker – like small Vms
SideCar pattern
Demo: MajorDomo running locally using docker
Azure Container Instances
Used to contain the browser in Azure cloud
ACI billing similar to VMs
Docker image: selenium/standalone-chrome
Startup/Shutdown using Azure libraries:
Azure Container Instances
Demo: MajorDomo running container in Azure
Job done - Celebration!
Beer stabilisation
Polly Overview
A reliability/resilience framework
.Net/.Net Core
Resilience Policies:
• Retry - ‘Maybe it’s just a blip’
• Circuit Breaker - ‘That system is down / struggling’
• Timeout - ‘Don’t wait forever!’
• Bulkhead Isolation - ‘One fault shouldn’t sink the whole
ship’
• Cache - ‘You’ve asked for that one before!’
• Fallback - ‘If all else fails … degrade gracefully’
Custom Policies - All policies can be combined, for multiple
protection!
Polly Implementation
Applying a reliability policy to MajorDomo:
Summary
 Page Object Model for a
maintainable model of web pages
 Azure Precompiled Function in the
cloud, same power as a container
without the charging model
 Azure Container Instances SideCar
on demand
 Polly for reliability and resilience
 No VM, Pay as you go for azure
function = No Cost
 Slides on slideshare
Further Resources
Selenium:
https://app.pluralsight.com/library/courses/selenium/table-of-
contents
SideCar: https://www.oreilly.com/library/view/designing-
distributed-systems/9781491983638/ch02.html
Control Azure: https://github.com/Azure/azure-libraries-for-
net
Resilience: http://www.thepollyproject.org/
Docker images: https://hub.docker.com/
Any Questions?
@johnstavele

More Related Content

What's hot

Building a Single-Page App: Backbone, Node.js, and Beyond
Building a Single-Page App: Backbone, Node.js, and BeyondBuilding a Single-Page App: Backbone, Node.js, and Beyond
Building a Single-Page App: Backbone, Node.js, and Beyond
Spike Brehm
 
Choosing the best JavaScript framework/library/toolkit
Choosing the best JavaScript framework/library/toolkitChoosing the best JavaScript framework/library/toolkit
Choosing the best JavaScript framework/library/toolkit
Hristo Chakarov
 
Backbone.js slides
Backbone.js slidesBackbone.js slides
Backbone.js slides
Ambert Ho
 

What's hot (20)

Automated perf optimization - jQuery Conference
Automated perf optimization - jQuery ConferenceAutomated perf optimization - jQuery Conference
Automated perf optimization - jQuery Conference
 
Building a Single-Page App: Backbone, Node.js, and Beyond
Building a Single-Page App: Backbone, Node.js, and BeyondBuilding a Single-Page App: Backbone, Node.js, and Beyond
Building a Single-Page App: Backbone, Node.js, and Beyond
 
Node PDX: Intro to Sails.js
Node PDX: Intro to Sails.jsNode PDX: Intro to Sails.js
Node PDX: Intro to Sails.js
 
React.js for Back-End developers
React.js for Back-End developersReact.js for Back-End developers
React.js for Back-End developers
 
웹을 지탱하는 차세대 기술 @한국웹20주년 컨퍼런스
웹을 지탱하는 차세대 기술 @한국웹20주년 컨퍼런스웹을 지탱하는 차세대 기술 @한국웹20주년 컨퍼런스
웹을 지탱하는 차세대 기술 @한국웹20주년 컨퍼런스
 
Choosing the best JavaScript framework/library/toolkit
Choosing the best JavaScript framework/library/toolkitChoosing the best JavaScript framework/library/toolkit
Choosing the best JavaScript framework/library/toolkit
 
Mvvm knockout vs angular
Mvvm knockout vs angularMvvm knockout vs angular
Mvvm knockout vs angular
 
JS Framework Comparison - An infographic
JS Framework Comparison - An infographicJS Framework Comparison - An infographic
JS Framework Comparison - An infographic
 
A team 43 C
A team 43 CA team 43 C
A team 43 C
 
React brief introduction
React brief introductionReact brief introduction
React brief introduction
 
AngularJS + React
AngularJS + ReactAngularJS + React
AngularJS + React
 
Introduction to The VR Web
Introduction to The VR WebIntroduction to The VR Web
Introduction to The VR Web
 
Backbone.js slides
Backbone.js slidesBackbone.js slides
Backbone.js slides
 
React.js and Flux in details
React.js and Flux in detailsReact.js and Flux in details
React.js and Flux in details
 
Kickstarter Your Node.JS Application
Kickstarter Your Node.JS ApplicationKickstarter Your Node.JS Application
Kickstarter Your Node.JS Application
 
WebAssembly vs JavaScript: What is faster?
WebAssembly vs JavaScript: What is faster?WebAssembly vs JavaScript: What is faster?
WebAssembly vs JavaScript: What is faster?
 
Single Page Applications
Single Page ApplicationsSingle Page Applications
Single Page Applications
 
WebAssembly in Houdini CSS, is it possible?
WebAssembly in Houdini CSS, is it possible?WebAssembly in Houdini CSS, is it possible?
WebAssembly in Houdini CSS, is it possible?
 
Angular 2 vs React
Angular 2 vs ReactAngular 2 vs React
Angular 2 vs React
 
Intro to Sails.js
Intro to Sails.jsIntro to Sails.js
Intro to Sails.js
 

Similar to Azure functions and container instances

Flu3nt highlights
Flu3nt highlightsFlu3nt highlights
Flu3nt highlights
dswork
 
Targeting Mobile Platform with MVC 4.0
Targeting Mobile Platform with MVC 4.0Targeting Mobile Platform with MVC 4.0
Targeting Mobile Platform with MVC 4.0
Mayank Srivastava
 
Front-end optimisation & jQuery Internals
Front-end optimisation & jQuery InternalsFront-end optimisation & jQuery Internals
Front-end optimisation & jQuery Internals
Artur Cistov
 

Similar to Azure functions and container instances (20)

Come Sail Away With Me (you guys): Node.js MVC Web API's Using Sails.js
Come Sail Away With Me (you guys): Node.js MVC Web API's Using Sails.jsCome Sail Away With Me (you guys): Node.js MVC Web API's Using Sails.js
Come Sail Away With Me (you guys): Node.js MVC Web API's Using Sails.js
 
Building reusable components as micro frontends with glimmer js and webcompo...
Building reusable components as micro frontends  with glimmer js and webcompo...Building reusable components as micro frontends  with glimmer js and webcompo...
Building reusable components as micro frontends with glimmer js and webcompo...
 
Flu3nt highlights
Flu3nt highlightsFlu3nt highlights
Flu3nt highlights
 
Dos and don'ts in AWS
Dos and don'ts in AWSDos and don'ts in AWS
Dos and don'ts in AWS
 
Web components api + Vuejs
Web components api + VuejsWeb components api + Vuejs
Web components api + Vuejs
 
Testable client side_mvc_apps_in_javascript
Testable client side_mvc_apps_in_javascriptTestable client side_mvc_apps_in_javascript
Testable client side_mvc_apps_in_javascript
 
Introduction to ASP.NET MVC
Introduction to ASP.NET MVCIntroduction to ASP.NET MVC
Introduction to ASP.NET MVC
 
Javascript Client & Server Architectures
Javascript Client & Server ArchitecturesJavascript Client & Server Architectures
Javascript Client & Server Architectures
 
Best of Microsoft Dev Camp 2015
Best of Microsoft Dev Camp 2015Best of Microsoft Dev Camp 2015
Best of Microsoft Dev Camp 2015
 
Isomorphic React Applications: Performance And Scalability
Isomorphic React Applications: Performance And ScalabilityIsomorphic React Applications: Performance And Scalability
Isomorphic React Applications: Performance And Scalability
 
Targeting Mobile Platform with MVC 4.0
Targeting Mobile Platform with MVC 4.0Targeting Mobile Platform with MVC 4.0
Targeting Mobile Platform with MVC 4.0
 
Wars I’ve Seen From Java EE to Spring and more, Azure has you covered
Wars I’ve SeenFrom Java EE to Spring and more, Azure has you coveredWars I’ve SeenFrom Java EE to Spring and more, Azure has you covered
Wars I’ve Seen From Java EE to Spring and more, Azure has you covered
 
Front-end optimisation & jQuery Internals
Front-end optimisation & jQuery InternalsFront-end optimisation & jQuery Internals
Front-end optimisation & jQuery Internals
 
Windows Azure Essentials
Windows Azure EssentialsWindows Azure Essentials
Windows Azure Essentials
 
Real World Azure - Dev
Real World Azure - DevReal World Azure - Dev
Real World Azure - Dev
 
Developing in the Cloud
Developing in the CloudDeveloping in the Cloud
Developing in the Cloud
 
MongoDB on Windows Azure
MongoDB on Windows AzureMongoDB on Windows Azure
MongoDB on Windows Azure
 
Virtualization Landscape & Cloud Computing
Virtualization Landscape & Cloud ComputingVirtualization Landscape & Cloud Computing
Virtualization Landscape & Cloud Computing
 
Challenges of angular in production (Tasos Bekos) - GreeceJS #17
Challenges of angular in production (Tasos Bekos) - GreeceJS #17Challenges of angular in production (Tasos Bekos) - GreeceJS #17
Challenges of angular in production (Tasos Bekos) - GreeceJS #17
 
Getting started with Aurelia
Getting started with AureliaGetting started with Aurelia
Getting started with Aurelia
 

More from John Staveley

More from John Staveley (16)

Image and Audio Detection using Edge Impulse
Image and Audio Detection using Edge ImpulseImage and Audio Detection using Edge Impulse
Image and Audio Detection using Edge Impulse
 
Product and Customer Development
Product and Customer DevelopmentProduct and Customer Development
Product and Customer Development
 
Getting started with satellite IoT
Getting started with satellite IoTGetting started with satellite IoT
Getting started with satellite IoT
 
IoT on Raspberry PI v1.2
IoT on Raspberry PI v1.2IoT on Raspberry PI v1.2
IoT on Raspberry PI v1.2
 
IoT on Raspberry Pi
IoT on Raspberry PiIoT on Raspberry Pi
IoT on Raspberry Pi
 
Birdwatching using a Raspberry pi, Azure IoT Hub and Cognitive services
Birdwatching using a Raspberry pi, Azure IoT Hub and Cognitive servicesBirdwatching using a Raspberry pi, Azure IoT Hub and Cognitive services
Birdwatching using a Raspberry pi, Azure IoT Hub and Cognitive services
 
DevSecOps - automating security
DevSecOps - automating securityDevSecOps - automating security
DevSecOps - automating security
 
Non nullable reference types in C#8
Non nullable reference types in C#8Non nullable reference types in C#8
Non nullable reference types in C#8
 
Graph databases and SQL Server 2017
Graph databases and SQL Server 2017Graph databases and SQL Server 2017
Graph databases and SQL Server 2017
 
Messaging - RabbitMQ, Azure (Service Bus), Docker and Azure Functions
Messaging - RabbitMQ, Azure (Service Bus), Docker and Azure FunctionsMessaging - RabbitMQ, Azure (Service Bus), Docker and Azure Functions
Messaging - RabbitMQ, Azure (Service Bus), Docker and Azure Functions
 
Why you should use Type script and EcmaScript 6
Why you should use Type script and EcmaScript 6Why you should use Type script and EcmaScript 6
Why you should use Type script and EcmaScript 6
 
Updated Mvc Web security updated presentation
Updated Mvc Web security updated presentationUpdated Mvc Web security updated presentation
Updated Mvc Web security updated presentation
 
Web security leeds sharp dot netnotts
Web security leeds sharp dot netnottsWeb security leeds sharp dot netnotts
Web security leeds sharp dot netnotts
 
Design Patterns - LFM and POM
Design Patterns - LFM and POMDesign Patterns - LFM and POM
Design Patterns - LFM and POM
 
Web security presentation
Web security presentationWeb security presentation
Web security presentation
 
Single Page Application presentation
Single Page Application presentationSingle Page Application presentation
Single Page Application presentation
 

Recently uploaded

Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Victor Rentea
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Victor Rentea
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 

Recently uploaded (20)

Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 

Azure functions and container instances