Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Microservices Without Servers

Dad87927739931f134c5b1242e3d04bc?s=47 James Thomas
September 03, 2016

Microservices Without Servers

Servers are killing your productivity. Rather than building better software for your users, you end up constantly distracted by maintaining computers. Wasn't the "cloud" supposed to fix this? It sounded so promising until we realised it was just renting VMs in someone else's datacenter. We couldn't escape "servers". Until now... In this session, developers will learn how to build microservices without servers, using modern “serverless” cloud platforms. We’ll look at common challenges (and solutions) to building applications using “serverless” stacks. Exploring emerging “serverless” design patterns will give developers the knowledge to build application architectures using these new platforms. This session is aimed at software developers experienced in building traditional backend web applications, who want to learn how to build microservices without servers.

Dad87927739931f134c5b1242e3d04bc?s=128

James Thomas

September 03, 2016
Tweet

Transcript

  1. MICROSERVICES WITHOUT SERVERS JAMES THOMAS, IBM

  2. SERVERS ARE KILLING YOUR PRODUCTIVITY

  3. IDEA PROFIT?

  4. HARD DRIVE FAILS

  5. HARD DRIVE FAILS LINUX OS VULNERABILTY

  6. HARD DRIVE FAILS LINUX OS VULNERABILTY MIDDLEWARE VERSION UPDATE

  7. HARD DRIVE FAILS LINUX OS VULNERABILTY MIDDLEWARE VERSION UPDATE UPGRADE

    NETWORK INFRASTRUCTURE
  8. HARD DRIVE FAILS LINUX OS VULNERABILTY MIDDLEWARE VERSION UPDATE UPGRADE

    NETWORK INFRASTRUCTURE MORE MEMORY AND BIGGER CPU
  9. HARD DRIVE FAILS LINUX OS VULNERABILTY MIDDLEWARE VERSION UPDATE UPGRADE

    NETWORK INFRASTRUCTURE MORE MEMORY AND BIGGER CPU DB TABLE INDEX GETS CORRUPTED
  10. HARD DRIVE FAILS LINUX OS VULNERABILTY MIDDLEWARE VERSION UPDATE UPGRADE

    NETWORK INFRASTRUCTURE MORE MEMORY AND BIGGER CPU DB TABLE INDEX GETS CORRUPTED GET ANOTHER SERVER…
  11. WASN’T THE CLOUD SUPPOSED TO FIX THIS?

  12. “COMPUTING AS A UTILITY” Source: https://flic.kr/p/5aHJFh

  13. POWER SUB-STATION? Source: http://i22.photobucket.com/albums/b344/GlassCurtain/Substation.jpg

  14. NO ESCAPE… Source: http://bit.ly/1ozGfzK

  15. average utilisation 
 20% - 40% of capacity

  16. WHAT CAN WE DO?

  17. AWS LAMBDA

  18. “RUNS CODE IN RESPONSE TO EVENTS, MANAGES COMPUTE RESOURES” …WHY

    IS THIS DIFFERENT?
  19. FUNCTIONS-AS-A-SERVICE

  20. SCALING: 0 to N

  21. PAY-AS-YOU-GO flickr photo by a loves dc https://flickr.com/photos/alovesdc/3466740007 CC (BY)

    license
  22. “ONE HAPPY LAMBDA CUSTOMER SAVING 80% OFF THEIR CLOUD BILLS”

    Source: http://uk.businessinsider.com/amazon-web-services-lambda-explained-2015-11
  23. ISN’T THIS JUST PLATFORM-AS-A-SERVICE?

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

  25. None
  26. None
  27. PROVIDERS

  28. Source: http://cloudacademy.com/blog/serverlessconf-recap-serverless/

  29. SPOILER: THERE’S STILL SERVERS flickr photo by BobMical https://flickr.com/photos/small_realm/11189803153 CC

    (BY-NC) license
  30. ENOUGH TALKING…
 BRING ON THE CODE.

  31. WEATHERBOT Source: http://uk.reuters.com/article/us-life-selfies-idUKKCN0R305L20150903

  32. None
  33. IBM OPENWHISK

  34. OPEN SOURCE

  35. $ git clone https://github.com/ openwhisk/openwhisk.git $ cd openwhisk/tools/vagrant $ vagrant

    up
  36. None
  37. RUNTIMES

  38. endpoint.pathname = path.resolve(endpoint.pathname, url_path) return url.format(endpoint) } namespace (options) {

    if (options && options.hasOwnProperty('namespace')) { return options.namespace } else if (this.options.hasOwnProperty('namespace')) { return this.options.namespace } throw new Error(messages.MISSING_NAMESPACE_ERROR) } qs (options, names) { return names.filter(name => options.hasOwnProperty(name)) .reduce((previous, name) => { previous[name] = options[name] return previous }, {}) my_service.js
  39. function main(params) { // put your code here! 
 


    return {…}; } Entry Point Event Parameters Service Result my_service.js
  40. import com.google.gson.JsonObject; public class Hello { public static JsonObject main(JsonObject

    args) { JsonObject response = new JsonObject(); return response; } } Entry Point Event Parameters Service Result my_service.java
  41. ACTIONS

  42. None
  43. None
  44. TRIGGERS

  45. None
  46. CHALLENGES

  47. COMPUTE LIMITS flickr photo by zund https://flickr.com/photos/zund/12202485675 CC (BY-NC-ND) license

  48. None
  49. MONITORING, DEBUGGING AND TESTING flickr photo by Thomas Hawk https://flickr.com/photos/thomashawk/4544013443

    CC (BY-NC) license
  50. COMPLEXITY flickr photo by Bitterjug https://flickr.com/photos/bitterjug/7670055210 CC (BY) license

  51. FRAMEWORKS

  52. SERVERS ARE KILLING YOUR PRODUCTIVITY

  53. Source: http://gunshowcomic.com/648

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

  55. BURN YOUR SERVERS + = UPGRADE PRODUCTIVITY

  56. https://github.com/openwhisk https://dwopen.slack.com 
 #openwhisk http://stackoverflow.com/questions/ tagged/openwhisk @thomasj or @openwhisk