52
Microservices without Servers Jonathan Kaufman • IBM • QCon San Francisco • @kauffecup

Microservices without Servers

Embed Size (px)

Citation preview

Page 1: Microservices without Servers

Microservices without ServersJonathan Kaufman • IBM • QCon San Francisco • @kauffecup

Page 2: Microservices without Servers

Servers Are Killing Your Productivity

Page 3: Microservices without Servers

Idea Profit

� ���

Page 4: Microservices without Servers

Hard Drive Fails

Linux OS Vulnerability

Middleware Version Update

Upgrade Network Infrastructure

More Memory and Bigger CPU

DB Table Index Gets Corrupted

Get Another Server…

Page 5: Microservices without Servers

Wasn’t the Cloud Supposed to Fix This?

Page 6: Microservices without Servers

“Computing as a Utility”

source: https://flic.kr/p/5aHJFh

Page 7: Microservices without Servers

Power Sub-Station?

source: http://i22.photobucket.com/albums/b344/GlassCurtain/Substation.jpg

Page 8: Microservices without Servers

No Escape...

source: http://bit.ly/1ozGfzK

Page 9: Microservices without Servers

average utilization

20% - 40%

of capacity

Page 10: Microservices without Servers

What Can We Do?

Page 11: Microservices without Servers

AWS Lambda

Page 12: Microservices without Servers

…why is this different?

“runs code in response to events, managing the computing resources”

Page 13: Microservices without Servers

functions as a service

ƒ(x)

Page 14: Microservices without Servers

Scaling: 0 to N

ƒ(x) ƒ(x) ƒ(x) ƒ(x) ƒ(x) ƒ(x) ƒ(x)

ƒ(x) ƒ(x) ƒ(x) ƒ(x)

ƒ(x)

ƒ(x)

ƒ(x)

ƒ(x)

ƒ(x)

ƒ(x) ƒ(x)

ƒ(x)

ƒ(x)

ƒ(x)

Page 15: Microservices without Servers

Pay-As-You-Go

a loves dc, https://www.flickr.com/photos/alovesdc/3466740007, CC (BY) license

Page 16: Microservices without Servers

http://uk.businessinsider.com/amazon-web-services-lambda-explained-2015-11

"One happy lambda customer saving 80% off their cloud bills"

Page 17: Microservices without Servers

Isn’t this just Platform-As-A-Service?

Page 18: Microservices without Servers

https://twitter.com/adrianco/status/736553530689998848

Page 19: Microservices without Servers
Page 20: Microservices without Servers
Page 21: Microservices without Servers
Page 22: Microservices without Servers
Page 23: Microservices without Servers

Spoilers…

…there’s still servers.

Page 24: Microservices without Servers

Enough Talking, Bring on the Code.

Page 25: Microservices without Servers

Weatherbot

source: uk.reuters.com/article/us-life-selfies-idUKKCN0R305L20150903

Page 26: Microservices without Servers
Page 27: Microservices without Servers

IBM Openwhisk

Page 28: Microservices without Servers
Page 29: Microservices without Servers

➜ workspace: git clone https://github.com/openwhisk/openwhisk.git

➜ workspace: cd openwhisk

➜ openwhisk: vagrant up

Page 30: Microservices without Servers
Page 31: Microservices without Servers
Page 32: Microservices without Servers
Page 33: Microservices without Servers
Page 34: Microservices without Servers

my_service.js

Page 35: Microservices without Servers

function main(params) { // code code code

return { ... }; }

my_service.js

Entry Point Event Parameters

Service Result

Page 36: Microservices without Servers

import com.google.gson.JsonObject; public class Hello { public static JsonObject main(JsonObject args) { // code code code JsonObject response = new JsonObject(); // some more code return response; } }

my_service.java

Entry Point Event Parameters

Service Result

Page 37: Microservices without Servers

Actions

Page 38: Microservices without Servers

REST

Page 39: Microservices without Servers

RESTAPI

Page 40: Microservices without Servers

Triggers

Page 41: Microservices without Servers
Page 42: Microservices without Servers

Challenges

Page 43: Microservices without Servers

Compute Limits

zund, https://www.flickr.com/photos/zund/12202485675, CC (BY-NC-ND) license

Page 44: Microservices without Servers
Page 45: Microservices without Servers

Monitoring, Debugging, and Testing

Thomas Hawk, https://www.flickr.com/photos/thomashawk/4544013443, CC (BY-NC) license

Page 46: Microservices without Servers

Complexity

bitterjug, https://www.flickr.com/photos/bitterjug/7670055210, CC (BY) license

Page 47: Microservices without Servers

Frameworks

Page 48: Microservices without Servers

Servers Are Killing Your Productivity

Page 49: Microservices without Servers

source: http://gunshowcomic.com/648

Page 50: Microservices without Servers

https://twitter.com/patrickdebois/status/734459440603275264

Page 51: Microservices without Servers

Ditch Your Servers.

Upgrade Your Productivity.

Page 52: Microservices without Servers

https://github.com/openwhisk

https://dwopen.slack.com#openwhisk

https://stackoverflow.com/questions/tagged/openwhisk

@openwhisk or @kauffecup

http://jkaufman.io/microserves-without-servers-talk