Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Developing Serverless Applications with Apache OpenWhisk

254 views

Published on

Niklas Heidloff
https://twitter.com/nheidloff
http://heidloff.net/

Sample Application
https://github.com/nheidloff/openwhisk-polyglot

OpenWhisk
https://openwhisk.apache.org
https://github.com/nheidloff/openwhisk-debug-nodejs

IBM Cloud Functions
http://ibm.biz/nheidloff
https://github.com/ibm-functions/composer

Published in: Software
  • Be the first to comment

Developing Serverless Applications with Apache OpenWhisk

  1. 1. Developing Serverless Applications with Apache OpenWhiskNiklas Heidloff Developer Advocate, IBM @nheidloff heidloff.net April 2018
  2. 2. Agenda Disclaimers 1)  Introduction to Serverless 2)  Development of Serverless Functions 3)  Development of Serverless Applications @nheidloff heidloff.net Most information in this session is about Apache OpenWhisk, some features are only available in IBM Cloud Functions – indicated on slides via icons Focus is on development related topics, not on operations
  3. 3. Serverless “Serverless computing is a cloud computing execution model in which the cloud provider dynamically manages the allocation of machine resources. Pricing is based on the actual amount of resources consumed by an application.” (via Wikipedia) Sample scenario: Serverless Web Application @nheidloff heidloff.net
  4. 4. Use Cases @nheidloff heidloff.net Volatile and/or event-driven workload that can be split in smaller short-running pieces APIs Data processing Event processing
  5. 5. Apache OpenWhisk “Apache OpenWhisk is a serverless, open source cloud platform that executes functions in response to events without developer concern for managing the lifecycle or operations of the containers that execute the code.” (via Apache) Supported runtimes: Node.js, Python, PHP, Swift and Docker Deployment: On-premises or in the cloud @nheidloff heidloff.net
  6. 6. Apache OpenWhisk Supported runtimes: Node.js, Python, PHP, Swift and Docker Development Local development via standard tooling and IDEs Web tooling provided by cloud providers @nheidloff heidloff.net
  7. 7. JavaScript Function @nheidloff heidloff.net
  8. 8. Asynchronous JavaScript Function @nheidloff heidloff.net
  9. 9. JavaScript Function with Dependencies @nheidloff heidloff.net
  10. 10. JavaScript Function in Docker @nheidloff heidloff.net
  11. 11. Debugging JavaScript Functions in Docker @nheidloff heidloff.net
  12. 12. Function Invocation via CLI @nheidloff heidloff.net
  13. 13. Function Invocation via HTTP @nheidloff heidloff.net
  14. 14. Function Invocation via HTTP @nheidloff heidloff.net
  15. 15. API Management @nheidloff heidloff.net
  16. 16. API Management @nheidloff heidloff.net
  17. 17. API Management @nheidloff heidloff.net
  18. 18. API Management @nheidloff heidloff.net
  19. 19. Serverless Applications @nheidloff heidloff.net Development of single functions is easy, but how do you build cloud-native applications with lots of functions? Functions are stateless, applications have state “There is no such thing as a stateless architecture, it’s just someone else’s problem” (via Jonas Bonér)
  20. 20. OpenWhisk Conductor Functions @nheidloff heidloff.net Conductor functions allow invoking a series of functions
  21. 21. Composer Composer is a new programming model for composing functions, built on Apache OpenWhisk Declarative and programmatic approach to define sophisticated flows between functions in cloud-native apps State management between ‘stateless’ functions based on OpenWhisk Conductor Actions@nheidloff heidloff.net
  22. 22. Sample Application: Send Notification 1)  Application is triggered with a person id and a subject 2)  First function returns the profile for the specific user with an email address and optionally a phone number 3)  If the profile has a phone number, a text message is sent, otherwise an email @nheidloff heidloff.net
  23. 23. Sample Application @nheidloff heidloff.net Visualized in IBM Cloud Functions Shell
  24. 24. Sample Application Polyglot JavaScript TypeScript Java Kotlin @nheidloff heidloff.net
  25. 25. Sample Invocation via CLI @nheidloff heidloff.net
  26. 26. Invocation Results @nheidloff heidloff.net Visualized in IBM Cloud Functions Shell
  27. 27. Session Flow @nheidloff heidloff.net Visualized in IBM Cloud Functions Shell
  28. 28. JavaScript Function in Visual Studio Code @nheidloff heidloff.net
  29. 29. TypeScript Function in Visual Studio Code @nheidloff heidloff.net
  30. 30. Java Function in Eclipse @nheidloff heidloff.net
  31. 31. Kotlin Function in IntelliJ IDEA @nheidloff heidloff.net
  32. 32. Composer Application @nheidloff heidloff.net
  33. 33. Composer Programming Constructs @nheidloff heidloff.net
  34. 34. Activity @nheidloff heidloff.net
  35. 35. Summary @nheidloff heidloff.net Apache OpenWhisk is an open source serverless platform OpenWhisk functions can be developed via Docker OpenWhisk can used in the cloud and on-premises IBM Cloud Functions is based on OpenWhisk and adds ... API management Composer to build cloud-native applications Try out OpenWhisk and Cloud Functions: http://ibm.biz/nheidloff
  36. 36. Resources Sample Application https://github.com/nheidloff/openwhisk-polyglot OpenWhisk https://openwhisk.apache.org https://github.com/nheidloff/openwhisk-debug-nodejs IBM Cloud Functions http://ibm.biz/nheidloff https://github.com/ibm-functions/composer @nheidloff heidloff.net

×