Please Note...Please Note: 2 • IBM’s statements regarding its plans, directions, and intent are...

44

Transcript of Please Note...Please Note: 2 • IBM’s statements regarding its plans, directions, and intent are...

Page 1: Please Note...Please Note: 2 • IBM’s statements regarding its plans, directions, and intent are subject to change or withdrawal without notice at IBM’s sole discretion. • Information
Page 2: Please Note...Please Note: 2 • IBM’s statements regarding its plans, directions, and intent are subject to change or withdrawal without notice at IBM’s sole discretion. • Information

Please Note:

2

•  IBM’s statements regarding its plans, directions, and intent are subject to change or withdrawal without notice at IBM’s sole discretion.

•  Information regarding potential future products is intended to outline our general product direction and it should not be relied on in

making a purchasing decision. •  The information mentioned regarding potential future products is not a commitment, promise, or legal obligation to deliver any

material, code or functionality. Information about potential future products may not be incorporated into any contract. •  The development, release, and timing of any future features or functionality described for our products remains at our sole discretion. •  Performance is based on measurements and projections using standard IBM benchmarks in a controlled environment. The actual

throughput or performance that any user will experience will vary depending upon many factors, including considerations such as the amount of multiprogramming in the user’s job stream, the I/O configuration, the storage configuration, and the workload processed. Therefore, no assurance can be given that an individual user will achieve results similar to those stated here.

Page 3: Please Note...Please Note: 2 • IBM’s statements regarding its plans, directions, and intent are subject to change or withdrawal without notice at IBM’s sole discretion. • Information

Agenda

•  Serverless computing in a nutshell… –  comparison to traditional models

• OpenWhisk … – how it works – how it has been build – typical usage scenarios – programming model – integrations – live demo

•  Summary & Questions 3

Page 4: Please Note...Please Note: 2 • IBM’s statements regarding its plans, directions, and intent are subject to change or withdrawal without notice at IBM’s sole discretion. • Information

Serverless in a nutshell

„Event-action platforms to execute code in response to events“

Page 5: Please Note...Please Note: 2 • IBM’s statements regarding its plans, directions, and intent are subject to change or withdrawal without notice at IBM’s sole discretion. • Information

Serverless: Comparison to traditional models

Swift

Application

Container! VM CF!

2

Polling

1b

Request

1a

•  Traditional model – Continous polling due to missing event programming

model – Charges even when idling due to poor utilization – Worry about scaling

•  When to scale? (mem-, cpu-, response time-driven) •  How fast to scale?

– Worry about resiliency •  At least 2 processes for HA (driving cost) •  Deployment in multiple regions (driving cost) •  Keep them running & healthy

Process & idle

Page 6: Please Note...Please Note: 2 • IBM’s statements regarding its plans, directions, and intent are subject to change or withdrawal without notice at IBM’s sole discretion. • Information

Serverless: Comparison to traditional models

•  Serverless –  Introduces event programming model – Charges only for what is used due to optimal

utilization – Scales inherently

•  One process per request – No cost overhead for resiliency

•  No long running process for HA

Trigger

1

Running action/fct

Running action/fct

Running action/fct

3

Deploy action within millisecs, run it, free up resources

Serverless Engine

2 Pool of actions/functions

Variety of supported languages!

Page 7: Please Note...Please Note: 2 • IBM’s statements regarding its plans, directions, and intent are subject to change or withdrawal without notice at IBM’s sole discretion. • Information

OpenWhisk* in a nutshell

„Event-action platform to execute code in response to events“ Delivered as open source & managed service on IBM Bluemix

* whisk (v): to move nimbly and quickly (source: merriam-webster.com)

Page 8: Please Note...Please Note: 2 • IBM’s statements regarding its plans, directions, and intent are subject to change or withdrawal without notice at IBM’s sole discretion. • Information

OpenWhisk* in a nutshell

„Event-action platform to execute code in response to events“ Available as beta and for free

* whisk (v): to move nimbly and quickly (source: merriam-webster.com)

Page 9: Please Note...Please Note: 2 • IBM’s statements regarding its plans, directions, and intent are subject to change or withdrawal without notice at IBM’s sole discretion. • Information

OpenWhisk in a nutshell

Serverless deployment & operations model

Optimal utilization & granular pricing

Scales on a per-request basis

Page 10: Please Note...Please Note: 2 • IBM’s statements regarding its plans, directions, and intent are subject to change or withdrawal without notice at IBM’s sole discretion. • Information

OpenWhisk in a nutshell

Flexible programming model Support for different invocation models Blocking, non-blocking, periodic Polyglot support Support for multiple runtimes: JS/NodeJS, Swift, Python, Java*, Docker Community efforts: Go, Haskell, Scala, … Supports higher-level programming constructs Chaining/sequencing Parameter binding Realtime debugging*

* work in progress

Page 11: Please Note...Please Note: 2 • IBM’s statements regarding its plans, directions, and intent are subject to change or withdrawal without notice at IBM’s sole discretion. • Information

OpenWhisk in a nutshell

Open engine & open event emitter/consumer ecosystem Open interface for event emitters Implemented in Scala & implemented based upon open technologies Docker, Kafka, Consul, … Community efforts to integrate with open tools Serverless Framwork*, VS Code, NodeRED, Jupyter Notebooks , …

Apache Incubator proposal is out! Submitted jointly with partners!

* work in progress

Page 12: Please Note...Please Note: 2 • IBM’s statements regarding its plans, directions, and intent are subject to change or withdrawal without notice at IBM’s sole discretion. • Information

OpenWhisk: How does it work?

* work in progress

} 1

Event Providers

Cloudant

Push Notifcations

Kafka*

Data event occurs, e.g. - Commit on a Git Repository - CRUD operation on Cloudant - ….

OpenWhisk

Trigger execution of associated OpenWhisk action

2

Swift! Docker JS! Python! Java*!

Page 13: Please Note...Please Note: 2 • IBM’s statements regarding its plans, directions, and intent are subject to change or withdrawal without notice at IBM’s sole discretion. • Information

OpenWhisk: How does it work?

Incoming HTTP request, e.g. HTTP GET openwhisk.ng.bluemix.net/api/v1/<namespace>/actions/getCustomers

1 Browser

Mobile App

Web App

OpenWhisk

2 Invoke associated OpenWhisk action

„getCustomers“

Swift! Docker JS! Python! Java*!

Variety of languages

* work in progress

Page 14: Please Note...Please Note: 2 • IBM’s statements regarding its plans, directions, and intent are subject to change or withdrawal without notice at IBM’s sole discretion. • Information

OpenWhisk: How does it work? Coming soon...

•  API Gateway is build based on contributions from Adobe & IBM leveraging technologies like Nginx & IBM’s microgateway

•  Allows to create, run, manage and secure APIs and microservices •  Combined with OpenWhisk it provides an easy way to build

backends without the need to manage servers by mapping APIs to actions

•  Both technologies together allow to quickly develop & deploy serverless web & mobile applications

Incoming HTTP request, e.g. HTTP GET api-gw.mybluemix.net/…/getCustomers

1 Browser

Mobile App

Web App

AP

I Gat

eway

2

OpenWhisk

3 Invoke associated OpenWhisk action

„getCustomers“

Swift! Docker JS! Python! Java*!

* work in progress

Page 15: Please Note...Please Note: 2 • IBM’s statements regarding its plans, directions, and intent are subject to change or withdrawal without notice at IBM’s sole discretion. • Information

OpenWhisk: How does it work? Coming soon...

-  API Gateway takes care of… -  security (authenticate, authorize, threat protect, validate)

-  control (rate limiting, response caching)

-  mediation

-  parameter mapping

-  schema validation

-  … and supports e.g. different verbs (Get, Post, Put, Delete, …)

Incoming HTTP request, e.g. HTTP GET api-gw.mybluemix.net/…/getCustomers

1 Browser

Mobile App

Web App

AP

I Gat

eway

2

OpenWhisk

3 Invoke associated OpenWhisk action

„getCustomers“

Swift! Docker JS! Python! Java*!

* work in progress

Page 16: Please Note...Please Note: 2 • IBM’s statements regarding its plans, directions, and intent are subject to change or withdrawal without notice at IBM’s sole discretion. • Information

OpenWhisk: How does it work? Coming soon...

•  OpenWhisk CLI is extended to to allow user to define routes for actions

$ wsk action create hello hello.js $ wsk api create –b api/test/v1 /hello hello Route URL: https://api-gw.mybluemix.net/api/ /nsuuid/api/testv1/hello $ curl –XGET https://api-gw.mybluemix.net/api/ /nsuuid/api/testv1/hello { message: ”Hello World” }

1 Browser

Mobile App

Web App

AP

I Gat

eway

2

OpenWhisk

3 Invoke associated OpenWhisk action

„getCustomers“

Swift! Docker JS! Python! Java*!

* work in progress

Incoming HTTP request, e.g. HTTP GET api-gw.mybluemix.net/…/getCustomers

Page 17: Please Note...Please Note: 2 • IBM’s statements regarding its plans, directions, and intent are subject to change or withdrawal without notice at IBM’s sole discretion. • Information

Live demo – Part 1

Page 18: Please Note...Please Note: 2 • IBM’s statements regarding its plans, directions, and intent are subject to change or withdrawal without notice at IBM’s sole discretion. • Information

OpenWhisk architecture

Trigger

Package

Feed

Package

Feed

Package

Feed

Package

Feed

REST

CLI iOS SDK

CRUD triggers, actions, and rules Invoke actions

UI

Action

NodeJS

Action

Swift

Action

Docker

Rule

Rule

Rule

Action

NodeJS

Action

Docker

Service ecosytem

Bluemix services 3rd party services

Self-enabled services

Chain Chain Invoke

Docker (and potentially other abstractions going forward)

API Gateway*

* work in progress

Page 19: Please Note...Please Note: 2 • IBM’s statements regarding its plans, directions, and intent are subject to change or withdrawal without notice at IBM’s sole discretion. • Information

OpenWhisk: Topology in OpenSource

19

Controller

… Invoker Invoker Invoker

Page 20: Please Note...Please Note: 2 • IBM’s statements regarding its plans, directions, and intent are subject to change or withdrawal without notice at IBM’s sole discretion. • Information

Cloudant

OpenWhisk: Topology in Bluemix

20

ELK-Stack

soon

Controller

Integration Service

soon

… Invoker Invoker Invoker

Monitoring

soon

Page 21: Please Note...Please Note: 2 • IBM’s statements regarding its plans, directions, and intent are subject to change or withdrawal without notice at IBM’s sole discretion. • Information

OpenWhisk: Usage of Docker

•  Isolation of actions •  Control over consumed resources of each container

21

A = wsk action invoke docker run

Page 22: Please Note...Please Note: 2 • IBM’s statements regarding its plans, directions, and intent are subject to change or withdrawal without notice at IBM’s sole discretion. • Information

OpenWhisk: Container startup

22

Start container docker run

Initialize /init

Run /run

cold container

Page 23: Please Note...Please Note: 2 • IBM’s statements regarding its plans, directions, and intent are subject to change or withdrawal without notice at IBM’s sole discretion. • Information

Start container docker run

Initialize /init

Run /run

OpenWhisk: Container startup

23

pre-warmed container

Page 24: Please Note...Please Note: 2 • IBM’s statements regarding its plans, directions, and intent are subject to change or withdrawal without notice at IBM’s sole discretion. • Information

Start container docker run

Initialize /init

Run /run

OpenWhisk: Container startup

24

warm container

Page 25: Please Note...Please Note: 2 • IBM’s statements regarding its plans, directions, and intent are subject to change or withdrawal without notice at IBM’s sole discretion. • Information

OpenWhisk: Container startup optimization

•  Performance is king.

25

cold container pre-warmed container warm container

faster

Page 26: Please Note...Please Note: 2 • IBM’s statements regarding its plans, directions, and intent are subject to change or withdrawal without notice at IBM’s sole discretion. • Information

Some usage Scenarios

•  Microservices-based apps / APIs

•  Mobile Backends

•  Data (Stream) Processing

•  IoT

•  Cognitive

•  Bots

Page 27: Please Note...Please Note: 2 • IBM’s statements regarding its plans, directions, and intent are subject to change or withdrawal without notice at IBM’s sole discretion. • Information

Real-world customer scenario

Page 28: Please Note...Please Note: 2 • IBM’s statements regarding its plans, directions, and intent are subject to change or withdrawal without notice at IBM’s sole discretion. • Information

Programming model

•  Services define the events they emit as triggers, and developers associate the actions to handle the events via rules

•  The developer only needs to care about implementing the desired application logic - the system handles the rest

T R A

Page 29: Please Note...Please Note: 2 • IBM’s statements regarding its plans, directions, and intent are subject to change or withdrawal without notice at IBM’s sole discretion. • Information

Programming model

Debugging actions* A

•  Allows to… – debug actions locally –  inspect parameter values – edit code & push changes

•  Supports debugging… – NodeJS, Python and Swift actions

* work in progress

Page 30: Please Note...Please Note: 2 • IBM’s statements regarding its plans, directions, and intent are subject to change or withdrawal without notice at IBM’s sole discretion. • Information

Programming model

Debugging actions* A

* work in progress

Page 31: Please Note...Please Note: 2 • IBM’s statements regarding its plans, directions, and intent are subject to change or withdrawal without notice at IBM’s sole discretion. • Information

Programming model

Actions: Can be chained to create sequences to increase flexibility and foster reuse

A

AA := A1 + A2 + A3

AB := A2 + A1 + A3

AC := A3 + A1 + A2

Page 32: Please Note...Please Note: 2 • IBM’s statements regarding its plans, directions, and intent are subject to change or withdrawal without notice at IBM’s sole discretion. • Information

Programming model

Rules: „An association of a trigger and an action“ R

R := T A

Page 33: Please Note...Please Note: 2 • IBM’s statements regarding its plans, directions, and intent are subject to change or withdrawal without notice at IBM’s sole discretion. • Information

Programming model

Open Source

Third Party Yours

Push Notifications webhook

A

forecast

translate languageId

textToSpeech

changes

T

sendMessage

databaseCreate documentRead

...

Websocket send

webhook

post

myAction myFeed

A T

Page 34: Please Note...Please Note: 2 • IBM’s statements regarding its plans, directions, and intent are subject to change or withdrawal without notice at IBM’s sole discretion. • Information

Integration with 3rd party tools: Sample NodeRED

•  Community effort to integrate with open tools: NodeRED

•  NodeRED is all about automating flows to orchestrate calls to different service APIs –  Usually triggered by calls from external systems or devices –  Runs within a long-running single node process, with a dedicated amount of CPU & memory

being allocated

•  OpenWhisk is all about executing code (custom logic) in response to events on a scalable platform, with a dedicated amount of CPU & memory being allocated per-request

•  NodeRED and OpenWhisk complement each other –  Use NodeRED to graphically create flows, automating a series of tasks in a kind of workflow –  Use OpenWhisk to execute custom logic (requiring some kind of CPU- or memory bound

operation) triggered from within NodeRED

Page 35: Please Note...Please Note: 2 • IBM’s statements regarding its plans, directions, and intent are subject to change or withdrawal without notice at IBM’s sole discretion. • Information

Integration with 3rd party tools: Sample VS Code

•  Community effort to integrate with open tools: VS Code extension

•  Eases development with OpenWhisk by supporting the entire development cycle (list, create, update, invoke, actions etc.) without the need to leave the IDE

•  Extension works for actions written in different languages (like JS and Swift) and on different platforms (like Windows, Mac, and Linux)

Page 36: Please Note...Please Note: 2 • IBM’s statements regarding its plans, directions, and intent are subject to change or withdrawal without notice at IBM’s sole discretion. • Information

Live demo - Part 2

Page 37: Please Note...Please Note: 2 • IBM’s statements regarding its plans, directions, and intent are subject to change or withdrawal without notice at IBM’s sole discretion. • Information

Join us today

•  You want to try OpenWhisk on your own? – Want to try out our IBM Bluemix OpenWhisk offering for free?

• Sign-up today at: https://console.ng.bluemix.net/openwhisk/ – Want to try out our open-source OpenWhisk offering?

• Visit: https://developer.ibm.com/openwhisk/

Page 38: Please Note...Please Note: 2 • IBM’s statements regarding its plans, directions, and intent are subject to change or withdrawal without notice at IBM’s sole discretion. • Information

Learn more

•  OpenWhisk Developer Center (focuses on our open-source project) https://developer.ibm.com/openwhisk/

•  OpenWhisk Blog https://developer.ibm.com/openwhisk/blogs/

•  OpenWhisk on Github https://github.com/openwhisk/openwhisk/

•  OpenWhisk official documentation on Github https://github.com/openwhisk/openwhisk/blob/master/docs/README.md

Page 39: Please Note...Please Note: 2 • IBM’s statements regarding its plans, directions, and intent are subject to change or withdrawal without notice at IBM’s sole discretion. • Information

Learn more

•  OpenWhisk on Twitter https://twitter.com/openwhisk

•  OpenWhisk on Slack https://dwopen.slack.com (channel: openwhisk) To join go here: http://slackindwo.mybluemix.net/

•  OpenWhisk additional material on Slideshare http://www.slideshare.net/OpenWhisk

•  OpenWhisk additional material on Youtube https://www.youtube.com/channel/UCbzgShnQk8F43NKsvEYA1SA

•  Other OpenWhisk material https://github.com/openwhisk/awesome-openwhisk

Page 40: Please Note...Please Note: 2 • IBM’s statements regarding its plans, directions, and intent are subject to change or withdrawal without notice at IBM’s sole discretion. • Information

Learn more

•  OpenWhisk past and upcoming events https://developer.ibm.com/openwhisk/events/

Page 41: Please Note...Please Note: 2 • IBM’s statements regarding its plans, directions, and intent are subject to change or withdrawal without notice at IBM’s sole discretion. • Information

Questions?

Page 42: Please Note...Please Note: 2 • IBM’s statements regarding its plans, directions, and intent are subject to change or withdrawal without notice at IBM’s sole discretion. • Information

Notices and Disclaimers

42

Copyright © 2016 by International Business Machines Corporation (IBM). No part of this document may be reproduced or transmitted in any form without written permission from IBM.

U.S. Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM.

Information in these presentations (including information relating to products that have not yet been announced by IBM) has been reviewed for accuracy as of the date of initial publication and could include unintentional technical or typographical errors. IBM shall have no responsibility to update this information. THIS DOCUMENT IS DISTRIBUTED "AS IS" WITHOUT ANY WARRANTY, EITHER EXPRESS OR IMPLIED. IN NO EVENT SHALL IBM BE LIABLE FOR ANY DAMAGE ARISING FROM THE USE OF THIS INFORMATION, INCLUDING BUT NOT LIMITED TO, LOSS OF DATA, BUSINESS INTERRUPTION, LOSS OF PROFIT OR LOSS OF OPPORTUNITY. IBM products and services are warranted according to the terms and conditions of the agreements under which they are provided.

Any statements regarding IBM's future direction, intent or product plans are subject to change or withdrawal without notice.

Performance data contained herein was generally obtained in a controlled, isolated environments. Customer examples are presented as illustrations of how those customers have used IBM products and the results they may have achieved. Actual performance, cost, savings or other results in other operating environments may vary.

References in this document to IBM products, programs, or services does not imply that IBM intends to make such products, programs or services available in all countries in which IBM operates or does business.

Workshops, sessions and associated materials may have been prepared by independent session speakers, and do not necessarily reflect the views of IBM. All materials and discussions are provided for informational purposes only, and are neither intended to, nor shall constitute legal or other guidance or advice to any individual participant or their specific situation.

It is the customer’s responsibility to insure its own compliance with legal requirements and to obtain advice of competent legal counsel as to the identification and interpretation of any relevant laws and regulatory requirements that may affect the customer’s business and any actions the customer may need to take to comply with such laws. IBM does not provide legal advice or represent or warrant that its services or products will ensure that the customer is in compliance with any law

Page 43: Please Note...Please Note: 2 • IBM’s statements regarding its plans, directions, and intent are subject to change or withdrawal without notice at IBM’s sole discretion. • Information

Notices and Disclaimers Con’t.

43

Information concerning non-IBM products was obtained from the suppliers of those products, their published announcements or other publicly available sources. IBM has not tested those products in connection with this publication and cannot confirm the accuracy of performance, compatibility or any other claims related to non-IBM products. Questions on the capabilities of non-IBM products should be addressed to the suppliers of those products. IBM does not warrant the quality of any third-party products, or the ability of any such third-party products to interoperate with IBM’s products. IBM EXPRESSLY DISCLAIMS ALL WARRANTIES, EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.

The provision of the information contained h erein is not intended to, and does not, grant any right or license under any IBM patents, copyrights, trademarks or other intellectual property right.

IBM, the IBM logo, ibm.com, Aspera®, Bluemix, Blueworks Live, CICS, Clearcase, Cognos®, DOORS®, Emptoris®, Enterprise Document Management System™, FASP®, FileNet®, Global Business Services ®, Global Technology Services ®, IBM ExperienceOne™, IBM SmartCloud®, IBM Social Business®, Information on Demand, ILOG, Maximo®, MQIntegrator®, MQSeries®, Netcool®, OMEGAMON, OpenPower, PureAnalytics™, PureApplication®, pureCluster™, PureCoverage®, PureData®, PureExperience®, PureFlex®, pureQuery®, pureScale®, PureSystems®, QRadar®, Rational®, Rhapsody®, Smarter Commerce®, SoDA, SPSS, Sterling Commerce®, StoredIQ, Tealeaf®, Tivoli®, Trusteer®, Unica®, urban{code}®, Watson, WebSphere®, Worklight®, X-Force® and System z® Z/OS, are trademarks of International Business Machines Corporation, registered in many jurisdictions worldwide. Other product and service names might be trademarks of IBM or other companies. A current list of IBM trademarks is available on the Web at "Copyright and trademark information" at: www.ibm.com/legal/copytrade.shtml.

Page 44: Please Note...Please Note: 2 • IBM’s statements regarding its plans, directions, and intent are subject to change or withdrawal without notice at IBM’s sole discretion. • Information