Microservices without Servers
-
Upload
devevents -
Category
Technology
-
view
45 -
download
1
Transcript of Microservices without Servers
![Page 1: Microservices without Servers](https://reader031.fdocuments.us/reader031/viewer/2022021506/5871ad4e1a28abda6a8b5def/html5/thumbnails/1.jpg)
Microservices without ServersJonathan Kaufman • IBM • QCon San Francisco • @kauffecup
![Page 2: Microservices without Servers](https://reader031.fdocuments.us/reader031/viewer/2022021506/5871ad4e1a28abda6a8b5def/html5/thumbnails/2.jpg)
Servers Are Killing Your Productivity
![Page 3: Microservices without Servers](https://reader031.fdocuments.us/reader031/viewer/2022021506/5871ad4e1a28abda6a8b5def/html5/thumbnails/3.jpg)
Idea Profit
� ���
![Page 4: Microservices without Servers](https://reader031.fdocuments.us/reader031/viewer/2022021506/5871ad4e1a28abda6a8b5def/html5/thumbnails/4.jpg)
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](https://reader031.fdocuments.us/reader031/viewer/2022021506/5871ad4e1a28abda6a8b5def/html5/thumbnails/5.jpg)
Wasn’t the Cloud Supposed to Fix This?
�
![Page 6: Microservices without Servers](https://reader031.fdocuments.us/reader031/viewer/2022021506/5871ad4e1a28abda6a8b5def/html5/thumbnails/6.jpg)
“Computing as a Utility”
source: https://flic.kr/p/5aHJFh
![Page 7: Microservices without Servers](https://reader031.fdocuments.us/reader031/viewer/2022021506/5871ad4e1a28abda6a8b5def/html5/thumbnails/7.jpg)
Power Sub-Station?
source: http://i22.photobucket.com/albums/b344/GlassCurtain/Substation.jpg
![Page 8: Microservices without Servers](https://reader031.fdocuments.us/reader031/viewer/2022021506/5871ad4e1a28abda6a8b5def/html5/thumbnails/8.jpg)
No Escape...
source: http://bit.ly/1ozGfzK
![Page 9: Microservices without Servers](https://reader031.fdocuments.us/reader031/viewer/2022021506/5871ad4e1a28abda6a8b5def/html5/thumbnails/9.jpg)
average utilization
20% - 40%
of capacity
![Page 10: Microservices without Servers](https://reader031.fdocuments.us/reader031/viewer/2022021506/5871ad4e1a28abda6a8b5def/html5/thumbnails/10.jpg)
What Can We Do?
![Page 11: Microservices without Servers](https://reader031.fdocuments.us/reader031/viewer/2022021506/5871ad4e1a28abda6a8b5def/html5/thumbnails/11.jpg)
AWS Lambda
![Page 12: Microservices without Servers](https://reader031.fdocuments.us/reader031/viewer/2022021506/5871ad4e1a28abda6a8b5def/html5/thumbnails/12.jpg)
…why is this different?
“runs code in response to events, managing the computing resources”
![Page 13: Microservices without Servers](https://reader031.fdocuments.us/reader031/viewer/2022021506/5871ad4e1a28abda6a8b5def/html5/thumbnails/13.jpg)
functions as a service
ƒ(x)
![Page 14: Microservices without Servers](https://reader031.fdocuments.us/reader031/viewer/2022021506/5871ad4e1a28abda6a8b5def/html5/thumbnails/14.jpg)
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](https://reader031.fdocuments.us/reader031/viewer/2022021506/5871ad4e1a28abda6a8b5def/html5/thumbnails/15.jpg)
Pay-As-You-Go
a loves dc, https://www.flickr.com/photos/alovesdc/3466740007, CC (BY) license
![Page 16: Microservices without Servers](https://reader031.fdocuments.us/reader031/viewer/2022021506/5871ad4e1a28abda6a8b5def/html5/thumbnails/16.jpg)
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](https://reader031.fdocuments.us/reader031/viewer/2022021506/5871ad4e1a28abda6a8b5def/html5/thumbnails/17.jpg)
Isn’t this just Platform-As-A-Service?
![Page 18: Microservices without Servers](https://reader031.fdocuments.us/reader031/viewer/2022021506/5871ad4e1a28abda6a8b5def/html5/thumbnails/18.jpg)
https://twitter.com/adrianco/status/736553530689998848
![Page 19: Microservices without Servers](https://reader031.fdocuments.us/reader031/viewer/2022021506/5871ad4e1a28abda6a8b5def/html5/thumbnails/19.jpg)
![Page 20: Microservices without Servers](https://reader031.fdocuments.us/reader031/viewer/2022021506/5871ad4e1a28abda6a8b5def/html5/thumbnails/20.jpg)
![Page 21: Microservices without Servers](https://reader031.fdocuments.us/reader031/viewer/2022021506/5871ad4e1a28abda6a8b5def/html5/thumbnails/21.jpg)
![Page 22: Microservices without Servers](https://reader031.fdocuments.us/reader031/viewer/2022021506/5871ad4e1a28abda6a8b5def/html5/thumbnails/22.jpg)
![Page 23: Microservices without Servers](https://reader031.fdocuments.us/reader031/viewer/2022021506/5871ad4e1a28abda6a8b5def/html5/thumbnails/23.jpg)
Spoilers…
…there’s still servers.
![Page 24: Microservices without Servers](https://reader031.fdocuments.us/reader031/viewer/2022021506/5871ad4e1a28abda6a8b5def/html5/thumbnails/24.jpg)
Enough Talking, Bring on the Code.
![Page 25: Microservices without Servers](https://reader031.fdocuments.us/reader031/viewer/2022021506/5871ad4e1a28abda6a8b5def/html5/thumbnails/25.jpg)
Weatherbot
source: uk.reuters.com/article/us-life-selfies-idUKKCN0R305L20150903
![Page 26: Microservices without Servers](https://reader031.fdocuments.us/reader031/viewer/2022021506/5871ad4e1a28abda6a8b5def/html5/thumbnails/26.jpg)
![Page 27: Microservices without Servers](https://reader031.fdocuments.us/reader031/viewer/2022021506/5871ad4e1a28abda6a8b5def/html5/thumbnails/27.jpg)
IBM Openwhisk
![Page 28: Microservices without Servers](https://reader031.fdocuments.us/reader031/viewer/2022021506/5871ad4e1a28abda6a8b5def/html5/thumbnails/28.jpg)
![Page 29: Microservices without Servers](https://reader031.fdocuments.us/reader031/viewer/2022021506/5871ad4e1a28abda6a8b5def/html5/thumbnails/29.jpg)
➜ workspace: git clone https://github.com/openwhisk/openwhisk.git
➜ workspace: cd openwhisk
➜ openwhisk: vagrant up
![Page 30: Microservices without Servers](https://reader031.fdocuments.us/reader031/viewer/2022021506/5871ad4e1a28abda6a8b5def/html5/thumbnails/30.jpg)
![Page 31: Microservices without Servers](https://reader031.fdocuments.us/reader031/viewer/2022021506/5871ad4e1a28abda6a8b5def/html5/thumbnails/31.jpg)
![Page 32: Microservices without Servers](https://reader031.fdocuments.us/reader031/viewer/2022021506/5871ad4e1a28abda6a8b5def/html5/thumbnails/32.jpg)
![Page 33: Microservices without Servers](https://reader031.fdocuments.us/reader031/viewer/2022021506/5871ad4e1a28abda6a8b5def/html5/thumbnails/33.jpg)
![Page 34: Microservices without Servers](https://reader031.fdocuments.us/reader031/viewer/2022021506/5871ad4e1a28abda6a8b5def/html5/thumbnails/34.jpg)
my_service.js
![Page 35: Microservices without Servers](https://reader031.fdocuments.us/reader031/viewer/2022021506/5871ad4e1a28abda6a8b5def/html5/thumbnails/35.jpg)
function main(params) { // code code code
return { ... }; }
my_service.js
Entry Point Event Parameters
Service Result
![Page 36: Microservices without Servers](https://reader031.fdocuments.us/reader031/viewer/2022021506/5871ad4e1a28abda6a8b5def/html5/thumbnails/36.jpg)
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](https://reader031.fdocuments.us/reader031/viewer/2022021506/5871ad4e1a28abda6a8b5def/html5/thumbnails/37.jpg)
Actions
![Page 38: Microservices without Servers](https://reader031.fdocuments.us/reader031/viewer/2022021506/5871ad4e1a28abda6a8b5def/html5/thumbnails/38.jpg)
REST
![Page 39: Microservices without Servers](https://reader031.fdocuments.us/reader031/viewer/2022021506/5871ad4e1a28abda6a8b5def/html5/thumbnails/39.jpg)
RESTAPI
![Page 40: Microservices without Servers](https://reader031.fdocuments.us/reader031/viewer/2022021506/5871ad4e1a28abda6a8b5def/html5/thumbnails/40.jpg)
Triggers
![Page 41: Microservices without Servers](https://reader031.fdocuments.us/reader031/viewer/2022021506/5871ad4e1a28abda6a8b5def/html5/thumbnails/41.jpg)
![Page 42: Microservices without Servers](https://reader031.fdocuments.us/reader031/viewer/2022021506/5871ad4e1a28abda6a8b5def/html5/thumbnails/42.jpg)
Challenges
![Page 43: Microservices without Servers](https://reader031.fdocuments.us/reader031/viewer/2022021506/5871ad4e1a28abda6a8b5def/html5/thumbnails/43.jpg)
Compute Limits
zund, https://www.flickr.com/photos/zund/12202485675, CC (BY-NC-ND) license
![Page 44: Microservices without Servers](https://reader031.fdocuments.us/reader031/viewer/2022021506/5871ad4e1a28abda6a8b5def/html5/thumbnails/44.jpg)
![Page 45: Microservices without Servers](https://reader031.fdocuments.us/reader031/viewer/2022021506/5871ad4e1a28abda6a8b5def/html5/thumbnails/45.jpg)
Monitoring, Debugging, and Testing
Thomas Hawk, https://www.flickr.com/photos/thomashawk/4544013443, CC (BY-NC) license
![Page 46: Microservices without Servers](https://reader031.fdocuments.us/reader031/viewer/2022021506/5871ad4e1a28abda6a8b5def/html5/thumbnails/46.jpg)
Complexity
bitterjug, https://www.flickr.com/photos/bitterjug/7670055210, CC (BY) license
![Page 47: Microservices without Servers](https://reader031.fdocuments.us/reader031/viewer/2022021506/5871ad4e1a28abda6a8b5def/html5/thumbnails/47.jpg)
Frameworks
![Page 48: Microservices without Servers](https://reader031.fdocuments.us/reader031/viewer/2022021506/5871ad4e1a28abda6a8b5def/html5/thumbnails/48.jpg)
Servers Are Killing Your Productivity
![Page 49: Microservices without Servers](https://reader031.fdocuments.us/reader031/viewer/2022021506/5871ad4e1a28abda6a8b5def/html5/thumbnails/49.jpg)
source: http://gunshowcomic.com/648
![Page 50: Microservices without Servers](https://reader031.fdocuments.us/reader031/viewer/2022021506/5871ad4e1a28abda6a8b5def/html5/thumbnails/50.jpg)
https://twitter.com/patrickdebois/status/734459440603275264
![Page 51: Microservices without Servers](https://reader031.fdocuments.us/reader031/viewer/2022021506/5871ad4e1a28abda6a8b5def/html5/thumbnails/51.jpg)
Ditch Your Servers.
Upgrade Your Productivity.
![Page 52: Microservices without Servers](https://reader031.fdocuments.us/reader031/viewer/2022021506/5871ad4e1a28abda6a8b5def/html5/thumbnails/52.jpg)
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