Upload
devevents
View
45
Download
1
Embed Size (px)
Citation preview
Microservices without ServersJonathan Kaufman • IBM • QCon San Francisco • @kauffecup
Servers Are Killing Your Productivity
Idea Profit
� ���
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…
Wasn’t the Cloud Supposed to Fix This?
�
“Computing as a Utility”
source: https://flic.kr/p/5aHJFh
Power Sub-Station?
source: http://i22.photobucket.com/albums/b344/GlassCurtain/Substation.jpg
No Escape...
source: http://bit.ly/1ozGfzK
average utilization
20% - 40%
of capacity
What Can We Do?
AWS Lambda
…why is this different?
“runs code in response to events, managing the computing resources”
functions as a service
ƒ(x)
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)
Pay-As-You-Go
a loves dc, https://www.flickr.com/photos/alovesdc/3466740007, CC (BY) license
http://uk.businessinsider.com/amazon-web-services-lambda-explained-2015-11
"One happy lambda customer saving 80% off their cloud bills"
Isn’t this just Platform-As-A-Service?
https://twitter.com/adrianco/status/736553530689998848
Spoilers…
…there’s still servers.
Enough Talking, Bring on the Code.
Weatherbot
source: uk.reuters.com/article/us-life-selfies-idUKKCN0R305L20150903
IBM Openwhisk
➜ workspace: git clone https://github.com/openwhisk/openwhisk.git
➜ workspace: cd openwhisk
➜ openwhisk: vagrant up
my_service.js
function main(params) { // code code code
return { ... }; }
my_service.js
Entry Point Event Parameters
Service Result
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
Actions
REST
RESTAPI
Triggers
Challenges
Compute Limits
zund, https://www.flickr.com/photos/zund/12202485675, CC (BY-NC-ND) license
Monitoring, Debugging, and Testing
Thomas Hawk, https://www.flickr.com/photos/thomashawk/4544013443, CC (BY-NC) license
Complexity
bitterjug, https://www.flickr.com/photos/bitterjug/7670055210, CC (BY) license
Frameworks
Servers Are Killing Your Productivity
source: http://gunshowcomic.com/648
https://twitter.com/patrickdebois/status/734459440603275264
Ditch Your Servers.
Upgrade Your Productivity.
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