A lap around serverless
from an app developer's perspective
DevDay – 26 November 2019
Bart Lannoeye
• Solution Architect
@ Sirus
• Twitter: @bartlannoeye
• Mobile Developer
@ Bank J.Van Breda & C°
• Twitter: @depechie
Glenn Versweyveld
Agenda
• What do we want to achieve?
• Explaining the architecture
• Using docker
• Using Azure Functions
• Take it to the next level
What do we want to achieve?
Demo: Mobile app
How can we do this?
• Mobile app in Xamarin.Forms
• Backend services on Azure
• Storage on Azure
• … and then some more
7
Why serverless on Azure as app developer?
• Why cloud?
• Connectivity, Scalability, Security, Availability, …
• Necessary services out of the box: e.g. push notifications
• Why “serverless”?
• No server management/maintenance
• Only charged for use, very scalable
• Quick deployments
• Minimal IT intervention 
• Downsides?
• Not best fit for all architectures
• Vendor lock-in possible
• Harder to debug (but we all write unit tests right )
Why use Docker?
• Lift and shift existing applications
• And then gradually move to micro-services
• Use less resources than virtual machines
• Standardization
• Repeatable dev / build / test / production cycle
• No more “works on my machine”
• Multi-cloud platform (Azure, AWS, Google Cloud, …)
• Scale easily
• If application is built for it
• Get started with new technology very fast
• Docker Hub has an image for ‘everything’
When not to use Docker?
• Run as fast as bare-metal
• Every containerization/virtualization method comes with overhead
• Provide cross-platform compatibility
• Can still be tied to Windows / Linux container
• Run applications with rich graphical user interfaces
• Solve all your security problems
• Added security through isolation
• Brings its own security challenges
• When you need state in your container
• When another technology is better for the task
Run docker images on Azure
Azure App Service
Azure Kubernetes Service (AKS)
Azure Container Instances
Service Fabric
Service Fabric Mesh
Where to get docker images from?
• Quickstart (Nginx or Python)
• Docker Hub
• Azure Container Registry
• Private Registry
Demo: Docker
What about storage?
Database (SQL, MySQL, MariaDB, PostgreSQL, …)
Storage account (Blob, Table, Queue, File)
CosmosDB (SQL, Table, NoSQL, Graph with # APIs)
Redis Cache
…
Storage in the picture: Blob storage
• Part of Azure Storage Accounts
• In most cases you will use General Purpose v2 SA
• Blob, File, Queue, Table, Disk, and Data Lake Gen2
• For storage / backup of unstructured data in any file type
• Cost-efficient tiers: Hot, Cold, Archive
• Multiple replication options: Local, Zone, Geo, Geo-zone
• Encrypted by default
• Secured through AAD, Shared Key or Shared Access Signature
Storage in the picture: CosmosDB
• Globally distributed, multi-model database service
• Guaranteed
• High availability (99.999% -> 5min15s per year)
• Low latency (<10ms)
• High througput (reserved RUs)
• Data is horizontally partitioned, prevent ‘hot spots’ (R and W)
• Automatically indexed
• Pick the API you want
Demo: Data storage
Our solution is running, but what does it cost?
• Before your start: Azure Pricing Calculator
• Select all used services
• Estimate amount of data, transactions, …
• Rough first idea, but not very accurate in most cases
Our solution is running, but what does it cost?
• While running: Azure Cost Management
• Actual cost until today per resource type or resource group
• Forecast of the cost based on historical data
Cost: learn from the numbers
• Sometimes a certain service is a must
• But quite often the solution is flexible
• Choose cheaper options when available
• Looking at our Docker containers:
• Run all the time? Maybe switch to Container Instances
• Other options?
Azure functions
• Event driven
• Serverless
• Compute on demand
• Very flexible scaling
• # languages: C#, F#, JS, PowerShell, Python, …
• # hosting: Consumption, Premium, Dedicated (App Service)
Azure functions: bread & butter of Azure
Demo: Azure Functions
More serverless on Azure
• Microsoft Flow
• Logic Apps
• Azure Web Jobs
• Azure Stream Analytics
Taking it to the next level
• Securing your app
• Use the full power of Azure
• Automate deployment
26
Use the full power of Azure
• Event Hubs
• Message Bus
• Cognitive Services
• Azure Search
• …
Automate deployment
• Azure DevOps
• App Center
• But also automate resource creation
• ARM templates
• Azure CLI
• Azure PowerShell
Conclusion
Pick the right tool for the right job!
• App Service
• Virtual Machine
• Docker Containers
• Azure Functions
• …
• And combine them to achieve your solution 
• And keep an eye on the cost 
Thank you!
• Bart Lannoeye
• Solution Architect
@ Sirus
• Twitter: @bartlannoeye
• Glenn Versweyveld
• Mobile Developer
@ Bank J.Van Breda & C°
• Twitter: @depechie
Dev day   serverless from a devs perspective

Dev day serverless from a devs perspective

  • 1.
    A lap aroundserverless from an app developer's perspective DevDay – 26 November 2019
  • 2.
    Bart Lannoeye • SolutionArchitect @ Sirus • Twitter: @bartlannoeye • Mobile Developer @ Bank J.Van Breda & C° • Twitter: @depechie Glenn Versweyveld
  • 3.
    Agenda • What dowe want to achieve? • Explaining the architecture • Using docker • Using Azure Functions • Take it to the next level
  • 4.
    What do wewant to achieve?
  • 5.
  • 6.
    How can wedo this? • Mobile app in Xamarin.Forms • Backend services on Azure • Storage on Azure • … and then some more
  • 7.
  • 8.
    Why serverless onAzure as app developer? • Why cloud? • Connectivity, Scalability, Security, Availability, … • Necessary services out of the box: e.g. push notifications • Why “serverless”? • No server management/maintenance • Only charged for use, very scalable • Quick deployments • Minimal IT intervention  • Downsides? • Not best fit for all architectures • Vendor lock-in possible • Harder to debug (but we all write unit tests right )
  • 9.
    Why use Docker? •Lift and shift existing applications • And then gradually move to micro-services • Use less resources than virtual machines • Standardization • Repeatable dev / build / test / production cycle • No more “works on my machine” • Multi-cloud platform (Azure, AWS, Google Cloud, …) • Scale easily • If application is built for it • Get started with new technology very fast • Docker Hub has an image for ‘everything’
  • 10.
    When not touse Docker? • Run as fast as bare-metal • Every containerization/virtualization method comes with overhead • Provide cross-platform compatibility • Can still be tied to Windows / Linux container • Run applications with rich graphical user interfaces • Solve all your security problems • Added security through isolation • Brings its own security challenges • When you need state in your container • When another technology is better for the task
  • 11.
    Run docker imageson Azure Azure App Service Azure Kubernetes Service (AKS) Azure Container Instances Service Fabric Service Fabric Mesh
  • 12.
    Where to getdocker images from? • Quickstart (Nginx or Python) • Docker Hub • Azure Container Registry • Private Registry
  • 13.
  • 14.
    What about storage? Database(SQL, MySQL, MariaDB, PostgreSQL, …) Storage account (Blob, Table, Queue, File) CosmosDB (SQL, Table, NoSQL, Graph with # APIs) Redis Cache …
  • 15.
    Storage in thepicture: Blob storage • Part of Azure Storage Accounts • In most cases you will use General Purpose v2 SA • Blob, File, Queue, Table, Disk, and Data Lake Gen2 • For storage / backup of unstructured data in any file type • Cost-efficient tiers: Hot, Cold, Archive • Multiple replication options: Local, Zone, Geo, Geo-zone • Encrypted by default • Secured through AAD, Shared Key or Shared Access Signature
  • 16.
    Storage in thepicture: CosmosDB • Globally distributed, multi-model database service • Guaranteed • High availability (99.999% -> 5min15s per year) • Low latency (<10ms) • High througput (reserved RUs) • Data is horizontally partitioned, prevent ‘hot spots’ (R and W) • Automatically indexed • Pick the API you want
  • 17.
  • 18.
    Our solution isrunning, but what does it cost? • Before your start: Azure Pricing Calculator • Select all used services • Estimate amount of data, transactions, … • Rough first idea, but not very accurate in most cases
  • 19.
    Our solution isrunning, but what does it cost? • While running: Azure Cost Management • Actual cost until today per resource type or resource group • Forecast of the cost based on historical data
  • 20.
    Cost: learn fromthe numbers • Sometimes a certain service is a must • But quite often the solution is flexible • Choose cheaper options when available • Looking at our Docker containers: • Run all the time? Maybe switch to Container Instances • Other options?
  • 21.
    Azure functions • Eventdriven • Serverless • Compute on demand • Very flexible scaling • # languages: C#, F#, JS, PowerShell, Python, … • # hosting: Consumption, Premium, Dedicated (App Service)
  • 22.
    Azure functions: bread& butter of Azure
  • 23.
  • 24.
    More serverless onAzure • Microsoft Flow • Logic Apps • Azure Web Jobs • Azure Stream Analytics
  • 25.
    Taking it tothe next level • Securing your app • Use the full power of Azure • Automate deployment
  • 26.
  • 27.
    Use the fullpower of Azure • Event Hubs • Message Bus • Cognitive Services • Azure Search • …
  • 28.
    Automate deployment • AzureDevOps • App Center • But also automate resource creation • ARM templates • Azure CLI • Azure PowerShell
  • 29.
  • 30.
    Pick the righttool for the right job! • App Service • Virtual Machine • Docker Containers • Azure Functions • … • And combine them to achieve your solution  • And keep an eye on the cost 
  • 31.
    Thank you! • BartLannoeye • Solution Architect @ Sirus • Twitter: @bartlannoeye • Glenn Versweyveld • Mobile Developer @ Bank J.Van Breda & C° • Twitter: @depechie

Editor's Notes

  • #6 Demo 1: Mobile app overview
  • #14 WebAPI in docker Publish to container registry Create App Service + deploy docker
  • #25 Logic apps: serverless workflows for data integration