SlideShare uma empresa Scribd logo
1 de 38
Baixar para ler offline
Creating real-life serverless
solutions with Azure Functions
@Jan_de_V
Jan de Vries
Cloud Solution Architect
@Jan_de_V
What is this serverless again?
@Jan_de_V
Servers are still here
Looks a lot like PaaS
“If your PaaS can efficiently start instances in
20ms that run for half a second, then call it
serverless.”
Adrian Cockcroft - VP Cloud Architecture Strategy AWS
@Jan_de_V
Hey, I know…containers!
@Jan_de_V
My real-life scenario!
bit.ly but cheaper!
@Jan_de_V
GET minified URL and redirect
CREATE minified URL
@Jan_de_V
Sounds like…
CQRS
@Jan_de_V
@Jan_de_V
Cosmos DB
@Jan_de_V
@Jan_de_V
Your legacy solution design
@Jan_de_V
A modern and super scalable design!
@Jan_de_V
@Jan_de_V
@Jan_de_V
Bindings & Triggers
@Jan_de_V
function.json
"bindings": [
{
"type": "httpTrigger",
"route": "{slug}",
"methods": [
"get"
],
"authLevel": "anonymous",
"name": "req"
}
],
@Jan_de_V
"bindings": [
{
"name": "minifiedUrl",
"type": "documentDB",
"databaseName": "MinifyRepository",
"collectionName": "MinifiedUrls",
"createIfNotExists": true,
"connection": "CosmosDbConnection",
"direction": "out"
}
],
@Jan_de_V
Don’t write JSON
@Jan_de_V
Best Practices
@Jan_de_V
1. One func, one thing
@Jan_de_V
2. Avoid funcs calling funcs
@Jan_de_V
3. Zero libs if possible
@Jan_de_V
4. Avoid RDBMS
@Jan_de_V
5. One func per route
@Jan_de_V
6. Async (queues)
@Jan_de_V
7. Data flows not data lakes
@Jan_de_V
8. Know how it will scale
@Jan_de_V
Paul Johnston
• https://twitter.com/PaulDJohnston
• https://medium.com/@PaulDJohnston/serverless-best-practices-
b3c97d551535
• ServerlessDays CoFounder (Jeff)
• ex AWS Serverless Senior Developer Advocate
@Jan_de_V
Now, start coding some Functions
Well…let’s wait a moment
@Jan_de_V
Where to put the code?
@Jan_de_V
Dependency injection?
private readonly ICosmosClient cosmosClient;
public CreateUrlHandler()
{
this.cosmosClient = new CosmosClient();
}
public CreateUrlHandler(ICosmosClient cosmosClient)
{
this.cosmosClient = cosmosClient;
}
@Jan_de_V
Keeping it small!
@Jan_de_V
@Jan_de_V
BONUS
Proxies!
@Jan_de_V
https://m.jdv.li/api/minifiedurl
or
https://m.jdv.li/minifiedurl
@Jan_de_V
proxies.json
{
"$schema": "http://json.schemastore.org/proxies",
"proxies": {
"getminifiedredirect": {
"matchCondition": {
"methods": [ "GET" ],
"route": "/{slug}"
},
"backendUri": "https://%WEBSITE_HOSTNAME%/api/{slug}"
}
}
}
@Jan_de_V
Questions, contact
https://github.com/Jandev/minifier
@Jan_de_V
jandv@4dotnet.nl
https://jan-v.nl
@Jan_de_V
Thank you!
Please evaluate my session in
the TechDays app!

Mais conteúdo relacionado

Mais procurados

Mais procurados (20)

Amazon Web Services Introduction
Amazon Web Services IntroductionAmazon Web Services Introduction
Amazon Web Services Introduction
 
GO and GCP: Introduction
GO and GCP: IntroductionGO and GCP: Introduction
GO and GCP: Introduction
 
Cloudera streaming with flink oct 29, 2020 meetup london
Cloudera streaming with flink oct 29, 2020 meetup londonCloudera streaming with flink oct 29, 2020 meetup london
Cloudera streaming with flink oct 29, 2020 meetup london
 
Exploiting IAM in GCP
Exploiting IAM in GCPExploiting IAM in GCP
Exploiting IAM in GCP
 
Azure IPaaS: Integration Evolved! (Glenn Colpaert @TechdaysNL 2017)
Azure IPaaS: Integration Evolved! (Glenn Colpaert @TechdaysNL 2017)Azure IPaaS: Integration Evolved! (Glenn Colpaert @TechdaysNL 2017)
Azure IPaaS: Integration Evolved! (Glenn Colpaert @TechdaysNL 2017)
 
10 difference between aws and google cloud by Zareef Ahmed
10 difference between aws and google cloud by Zareef Ahmed10 difference between aws and google cloud by Zareef Ahmed
10 difference between aws and google cloud by Zareef Ahmed
 
Trafikensverige.se
Trafikensverige.seTrafikensverige.se
Trafikensverige.se
 
What is Google Cloud Platform - GDG DevFest 18 Depok
What is Google Cloud Platform - GDG DevFest 18 DepokWhat is Google Cloud Platform - GDG DevFest 18 Depok
What is Google Cloud Platform - GDG DevFest 18 Depok
 
Go Serverless with Azure
Go Serverless with AzureGo Serverless with Azure
Go Serverless with Azure
 
Knative, Serverless on Kubernetes, and Openshift
Knative, Serverless on Kubernetes, and OpenshiftKnative, Serverless on Kubernetes, and Openshift
Knative, Serverless on Kubernetes, and Openshift
 
Serverless with Knative - Mete Atamel (Google)
Serverless with Knative - Mete Atamel (Google)Serverless with Knative - Mete Atamel (Google)
Serverless with Knative - Mete Atamel (Google)
 
Intro to the Google Cloud for Developers
Intro to the Google Cloud for DevelopersIntro to the Google Cloud for Developers
Intro to the Google Cloud for Developers
 
Using Google App Engine Python
Using Google App Engine PythonUsing Google App Engine Python
Using Google App Engine Python
 
Large Scale Cloud Infrastructure Using Shared Components
Large Scale Cloud Infrastructure Using Shared ComponentsLarge Scale Cloud Infrastructure Using Shared Components
Large Scale Cloud Infrastructure Using Shared Components
 
GDG Jakarta Meetup - Streaming Analytics With Apache Beam
GDG Jakarta Meetup - Streaming Analytics With Apache BeamGDG Jakarta Meetup - Streaming Analytics With Apache Beam
GDG Jakarta Meetup - Streaming Analytics With Apache Beam
 
Cloud Native Java in Kubernetes
Cloud Native Java in KubernetesCloud Native Java in Kubernetes
Cloud Native Java in Kubernetes
 
Top 10 Cloud Trends for 2018 and Actions You Can Take Now
Top 10 Cloud Trends for 2018 and Actions You Can Take NowTop 10 Cloud Trends for 2018 and Actions You Can Take Now
Top 10 Cloud Trends for 2018 and Actions You Can Take Now
 
DevTest Labs en Azure (por Iván Cañizares)
DevTest Labs en Azure (por Iván Cañizares)DevTest Labs en Azure (por Iván Cañizares)
DevTest Labs en Azure (por Iván Cañizares)
 
2009.05.21.Abiquo.Entrepeneurs.Day
2009.05.21.Abiquo.Entrepeneurs.Day2009.05.21.Abiquo.Entrepeneurs.Day
2009.05.21.Abiquo.Entrepeneurs.Day
 
Quantifying Your World with AI & Docker on the Edge | OSCONF 2020 Jaipur
Quantifying Your World with AI & Docker  on the Edge | OSCONF 2020 JaipurQuantifying Your World with AI & Docker  on the Edge | OSCONF 2020 Jaipur
Quantifying Your World with AI & Docker on the Edge | OSCONF 2020 Jaipur
 

Semelhante a TechDays Sweden - Creating real-life serverless solutions with Azure Functions

Dnc2015 azure-microservizi-vforusso
Dnc2015 azure-microservizi-vforussoDnc2015 azure-microservizi-vforusso
Dnc2015 azure-microservizi-vforusso
DotNetCampus
 

Semelhante a TechDays Sweden - Creating real-life serverless solutions with Azure Functions (20)

Serverless... Hoe, wat en vooral waarom
Serverless... Hoe, wat en vooral waaromServerless... Hoe, wat en vooral waarom
Serverless... Hoe, wat en vooral waarom
 
Move Up - Design je Azure Functions als een pro
Move Up - Design je Azure Functions als een proMove Up - Design je Azure Functions als een pro
Move Up - Design je Azure Functions als een pro
 
Serverless Development To Production Pipeline
Serverless Development To Production PipelineServerless Development To Production Pipeline
Serverless Development To Production Pipeline
 
Making Serverless a Game Changer for you
Making Serverless a Game Changer for youMaking Serverless a Game Changer for you
Making Serverless a Game Changer for you
 
SVILUPPARE E GESTIRE ARCHITETTURE A MICROSERVIZI SU AZURE
SVILUPPARE E GESTIRE ARCHITETTURE A MICROSERVIZI SU AZURESVILUPPARE E GESTIRE ARCHITETTURE A MICROSERVIZI SU AZURE
SVILUPPARE E GESTIRE ARCHITETTURE A MICROSERVIZI SU AZURE
 
Dnc2015 azure-microservizi-vforusso
Dnc2015 azure-microservizi-vforussoDnc2015 azure-microservizi-vforusso
Dnc2015 azure-microservizi-vforusso
 
Harnessing the power of aws using dot net core
Harnessing the power of aws using dot net coreHarnessing the power of aws using dot net core
Harnessing the power of aws using dot net core
 
Journey to the cloud, the why and how of serverless
Journey to the cloud, the why and how of serverlessJourney to the cloud, the why and how of serverless
Journey to the cloud, the why and how of serverless
 
How I fell in love with Serverless, Yevhen Duma, DevOps Engineer at Provectus
How I fell in love with Serverless, Yevhen Duma, DevOps Engineer at ProvectusHow I fell in love with Serverless, Yevhen Duma, DevOps Engineer at Provectus
How I fell in love with Serverless, Yevhen Duma, DevOps Engineer at Provectus
 
The Evolution of Cloud Architectures: Focusing More on the Business Logic
The Evolution of Cloud Architectures: Focusing More on the Business LogicThe Evolution of Cloud Architectures: Focusing More on the Business Logic
The Evolution of Cloud Architectures: Focusing More on the Business Logic
 
Cloud computing and the Windows Azure Services Platform (KU Leuven)
Cloud computing and the Windows Azure Services Platform (KU Leuven)Cloud computing and the Windows Azure Services Platform (KU Leuven)
Cloud computing and the Windows Azure Services Platform (KU Leuven)
 
agile microservices @scaibo
agile microservices @scaiboagile microservices @scaibo
agile microservices @scaibo
 
Microservizi e container Docker in produzione: strumenti e consigli
Microservizi e container Docker in produzione: strumenti e consigliMicroservizi e container Docker in produzione: strumenti e consigli
Microservizi e container Docker in produzione: strumenti e consigli
 
An introduction to Serverless
An introduction to ServerlessAn introduction to Serverless
An introduction to Serverless
 
20180111 we bde-bs - serverless url shortener
20180111   we bde-bs - serverless url shortener20180111   we bde-bs - serverless url shortener
20180111 we bde-bs - serverless url shortener
 
Serverless Architectural Patterns & Best Practices
Serverless Architectural Patterns & Best PracticesServerless Architectural Patterns & Best Practices
Serverless Architectural Patterns & Best Practices
 
AWS Chicago user group: AWS Platform for .NET Developers
AWS Chicago user group: AWS Platform for .NET DevelopersAWS Chicago user group: AWS Platform for .NET Developers
AWS Chicago user group: AWS Platform for .NET Developers
 
Microservices and serverless for MegaStartups - DLD TLV 2017
Microservices and serverless for MegaStartups - DLD TLV 2017Microservices and serverless for MegaStartups - DLD TLV 2017
Microservices and serverless for MegaStartups - DLD TLV 2017
 
Architecting Web Applications for the Cloud - Design Principles and Practical...
Architecting Web Applications for the Cloud - Design Principles and Practical...Architecting Web Applications for the Cloud - Design Principles and Practical...
Architecting Web Applications for the Cloud - Design Principles and Practical...
 
Cloud computing03
Cloud computing03Cloud computing03
Cloud computing03
 

Mais de Jan de Vries

Mais de Jan de Vries (15)

Webdev Zwolle - PaaSwordless in Azure
Webdev Zwolle - PaaSwordless in AzureWebdev Zwolle - PaaSwordless in Azure
Webdev Zwolle - PaaSwordless in Azure
 
Global Azure - Use Azure Active Directory Managed Identities for your services!
Global Azure - Use Azure Active Directory Managed Identities for your services!Global Azure - Use Azure Active Directory Managed Identities for your services!
Global Azure - Use Azure Active Directory Managed Identities for your services!
 
Next.Net event - Use Azure Active Directory Managed Identities for your servi...
Next.Net event - Use Azure Active Directory Managed Identities for your servi...Next.Net event - Use Azure Active Directory Managed Identities for your servi...
Next.Net event - Use Azure Active Directory Managed Identities for your servi...
 
TechDays Sweden - No Nouns!
TechDays Sweden - No Nouns!TechDays Sweden - No Nouns!
TechDays Sweden - No Nouns!
 
Why care about serverless
Why care about serverlessWhy care about serverless
Why care about serverless
 
No nouns, hoe ga je een microservices architectuur opzetten
No nouns, hoe ga je een microservices architectuur opzettenNo nouns, hoe ga je een microservices architectuur opzetten
No nouns, hoe ga je een microservices architectuur opzetten
 
No nouns
No nounsNo nouns
No nouns
 
Creating real life serverless solutions with Azure Functions
Creating real life serverless solutions with Azure FunctionsCreating real life serverless solutions with Azure Functions
Creating real life serverless solutions with Azure Functions
 
Creating real life serverless solutions with Azure Functions - dotNet Amsterd...
Creating real life serverless solutions with Azure Functions - dotNet Amsterd...Creating real life serverless solutions with Azure Functions - dotNet Amsterd...
Creating real life serverless solutions with Azure Functions - dotNet Amsterd...
 
Using the Azure Container Service in your company
Using the Azure Container Service in your companyUsing the Azure Container Service in your company
Using the Azure Container Service in your company
 
TechDays 2017 - Creating real life serverless solutions with azure functions
TechDays 2017 - Creating real life serverless solutions with azure functionsTechDays 2017 - Creating real life serverless solutions with azure functions
TechDays 2017 - Creating real life serverless solutions with azure functions
 
Visual Studio 2017
Visual Studio 2017Visual Studio 2017
Visual Studio 2017
 
Applied patterns in the project
Applied patterns in the projectApplied patterns in the project
Applied patterns in the project
 
Dependency injection en testen
Dependency injection en testenDependency injection en testen
Dependency injection en testen
 
Clean Code summary
Clean Code summaryClean Code summary
Clean Code summary
 

Último

Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 
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
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 

Último (20)

Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
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 the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu SubbuApidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
 
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
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
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
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 

TechDays Sweden - Creating real-life serverless solutions with Azure Functions