serverless architecture for internet of things

19
DEVOPS FOR THE INTERNET OF THINGS AN INTRODUCTION TO SERVERLESS ARCHITECTURES ROB CHARLTON, VERTU CORPORATION LTD

Upload: robert-charlton

Post on 15-Jan-2017

504 views

Category:

Software


1 download

TRANSCRIPT

Page 1: Serverless Architecture for Internet of Things

DEVOPS FOR THE INTERNET OF THINGSAN INTRODUCTION TO SERVERLESS ARCHITECTURES

ROB CHARLTON, VERTU CORPORATION LTD

Page 2: Serverless Architecture for Internet of Things

OVERVIEW

• What, why and how of Serverless Architecture

Page 3: Serverless Architecture for Internet of Things

WHAT IS SERVERLESS?

Page 4: Serverless Architecture for Internet of Things

WHAT IS SERVERLESS?

Page 5: Serverless Architecture for Internet of Things

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’

Page 6: Serverless Architecture for Internet of Things

THE BEST DEVOPS IS NOOPS

Import.io blog post

Page 7: Serverless Architecture for Internet of Things

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

Page 8: Serverless Architecture for Internet of Things

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

Page 9: Serverless Architecture for Internet of Things

HOW TO DO SERVERLESS?

IBM

Bluemix

Openwhisk

(Feb ’16)

Google

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

Page 10: Serverless Architecture for Internet of Things

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

Page 11: Serverless Architecture for Internet of Things

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

Page 12: Serverless Architecture for Internet of Things

SBLOG Architecture

Page 13: Serverless Architecture for Internet of Things

STEP BY STEP - DYNAMODB

Page 14: Serverless Architecture for Internet of Things

STEP BY STEP – LAMBDA FUNCTION

Page 15: Serverless Architecture for Internet of Things

STEP BY STEP – API GATEWAY

Page 16: Serverless Architecture for Internet of Things

STEP BY STEP – ANGULARJS APP

Page 17: Serverless Architecture for Internet of Things

STEP BY STEP – S3

Page 18: Serverless Architecture for Internet of Things

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

Page 19: Serverless Architecture for Internet of Things

QUESTIONS?

• Rob Charlton

Cloud DevOps Architect @ Vertu

[email protected]

• @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/