DEVOPS FOR THE INTERNET OF THINGSAN INTRODUCTION TO SERVERLESS ARCHITECTURES
ROB CHARLTON, VERTU CORPORATION LTD
OVERVIEW
• What, why and how of Serverless Architecture
WHAT IS SERVERLESS?
WHAT IS SERVERLESS?
“
”
WHY PAY TO RUN A SET OF SERVERS THAT ARE ALWAYS ON… ALWAYS WAITING… WHEN [YOU] COULD JUST EXECUTE SOME CODE WHEN [YOUR] USERS ACTUALLY WANTED TO DO SOMETHING?
Sam Kroonenburg, ‘A Cloud Guru’
“
”
THE BEST DEVOPS IS NOOPS
Import.io blog post
WHY SERVERLESS?
• It’s a logical next step towards worrying only about the business logic for your
own application and absolutely nothing else
• Disruptively low cost – nothing happening = nothing to pay
WHY *NOT* SERVERLESS?
• An immature approach
• Only one cloud provider(s) has the necessary building blocks at the moment
• What is the cost of running a given app, exactly?
• Some of the tools and techniques are a little rough and ready
• Amazon’s API gateway is certainly quirky
HOW TO DO SERVERLESS?
IBM
Bluemix
Openwhisk
(Feb ’16)
Cloud
Functions
(Feb ’16)
Azure
Functions
(Mar ’16)
SaaS, e.g.:
Auth0,
Stormpath,
Layer.io,
Twilio etc.
Static web
hosting, e.g.
S3
Managed
DB, e.g.
DynamoDB
SPA web
application,
e.g.
AngularJS
Amazon
Lambda &
API
Gateway
THE LINK WITH IOT?
• Particularly interesting for IoT
• very unpredictable workloads – how many servers will you need to handle 1 million
sensors?
• Inherently event based, so an event based computing model suits
• My best guess is that Google, Microsoft and IBM all joined the serverless
party specifically for IoT
STEP BY STEP – MAKING A SERVERLESS EXAMPLE
• How did I make the serverless blog example?
• Parts needed:
• DynamoDB table
• Lambda Function
• API Gateway endpoint
• Javascript and HTML in S3
• Links to the code at the end of talk
SBLOG Architecture
STEP BY STEP - DYNAMODB
STEP BY STEP – LAMBDA FUNCTION
STEP BY STEP – API GATEWAY
STEP BY STEP – ANGULARJS APP
STEP BY STEP – S3
CONCLUSION
• Serverless is hot at the moment
• Doesn’t mean it’s the right thing to do, but…
• There’s a conference! http://serverlessconf.io/ May 26/27 in NYC
• There’s a book https://leanpub.com/serverless (55% complete!)
• It could be a killer approach for IoT
QUESTIONS?
• Rob Charlton
Cloud DevOps Architect @ Vertu
• @charltones
• https://github.com/charltones/serverless_blog
• https://github.com/anaibol/awesome-serverless
• https://developer.ibm.com/openwhisk/
• https://cloud.google.com/functions/docs
• https://functions.azure.com
• https://d0.awsstatic.com/whitepapers/AWS_Serve
rless_Multi-Tier_Architectures.pdf
• https://medium.com/@PaulDJohnston/what-is-
serverless-architecture-
43b9ea4babca#.hoq2vvbzk
• https://www.import.io/post/using-amazon-
lambda-and-api-gateway/
• https://read.acloud.guru/why-serverless-with-aws-
is-a-game-changer-3cb37e25f638#.76q9uy1ha
• https://serverlesscode.com/