63
© 2017 IBM Corporation l Interconnect 2017 IBM Bluemix OpenWhisk The Future of Cloud Compute: Event-driven and Serverless Applications with OpenWhisk © 2017 IBM Corporation l Interconnect 2017 @Michael_beh @AndreasNauerz

IBM Bluemix OpenWhisk overview (InterConnect 2017)

Embed Size (px)

Citation preview

© 2017 IBM Corporation l Interconnect 2017

IBM Bluemix OpenWhiskThe Future of Cloud Compute: Event-driven and Serverless Applications with OpenWhisk

© 2017 IBM Corporation l Interconnect 2017

@Michael_beh@AndreasNauerz

© 2017 IBM Corporation l Interconnect 2017

IBM Bluemix OpenWhisk

Please noteIBM’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 inthe 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.

© 2017 IBM Corporation l Interconnect 2017

IBM Bluemix OpenWhisk

Agenda

1. Evolution of Serverless 2. What is serverless aka FaaS? 3. Why is serverless better than a traditional approach? 4. OpenWhisk 5. What is serverless good for? 6. Q&A

© 2017 IBM Corporation l Interconnect 2017

IBM Bluemix OpenWhisk

Agenda

1. Evolution of Serverless 2. What is serverless aka FaaS? 3. Why is serverless better than a traditional approach? 4. OpenWhisk 5. What is serverless good for? 6. Q&A

© 2017 IBM Corporation l Interconnect 2017

IBM Bluemix OpenWhisk

Everything is getting more fine-granular.

Evolution of Serverless

© 2017 IBM Corporation l Interconnect 2017

IBM Bluemix OpenWhiskEvolution of Serverless

Unit of management getting more granular

VM VM

VM

Virtual Machine ServerlessBare Metal

© 2017 IBM Corporation l Interconnect 2017

IBM Bluemix OpenWhiskEvolution of Serverless

Application architecture

Monolithic Application

Break-down into microservices

Make each microservice HA

Protect against regional outage

Region A

Region B

© 2017 IBM Corporation l Interconnect 2017

IBM Bluemix OpenWhisk

Agenda

1. Evolution of Serverless 2. What is serverless aka FaaS? 3. Why is serverless better than a traditional approach? 4. OpenWhisk 5. What is serverless good for? 6. Q&A

© 2017 IBM Corporation l Interconnect 2017

IBM Bluemix OpenWhiskWhat is serverless aka FaaS?

Runs code only on-demand on a per-request basis

© 2017 IBM Corporation l Interconnect 2017

IBM Bluemix OpenWhiskWhat is serverless aka FaaS?

Runs code only on-demand on a per-request basis

Serverless deployment & operations model

VM

No servers Just code

© 2017 IBM Corporation l Interconnect 2017

IBM Bluemix OpenWhiskWhat is serverless aka FaaS?

Runs code only on-demand on a per-request basis

“Serverless is for compute what object storage is for storage”

VM

No servers Just code

© 2017 IBM Corporation l Interconnect 2017

IBM Bluemix OpenWhiskWhat is serverless aka FaaS?

Runs code only on-demand on a per-request basis

Optimal utilization & granular pricing

zzz

timecharged

© 2017 IBM Corporation l Interconnect 2017

IBM Bluemix OpenWhiskWhat is serverless aka FaaS?

Runs code only on-demand on a per-request basis

Scales on a per-request basis

© 2017 IBM Corporation l Interconnect 2017

IBM Bluemix OpenWhisk

Agenda

1. Evolution of Serverless 2. What is serverless aka FaaS? 3. Why is serverless better than a traditional approach? 4. OpenWhisk 5. What is serverless good for? 6. Q&A

© 2017 IBM Corporation l Interconnect 2017

IBM Bluemix OpenWhiskWhy serverless?

CF Container VM

Application

Processand Idle

2

Requests

1a

Polling

1b

Worry about scaling • When to scale? (mem-, cpu-, response time-, etc. driven?) • How fast can you scale?

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

Charged even when idling / not 100% utilized

Continuous polling due to missing event programming model

Traditional model

Processand Idle

© 2017 IBM Corporation l Interconnect 2017

IBM Bluemix OpenWhiskWhy serverless?

Trigger

1

OpenWhisk Engine

2 Pool of Actions

Js Swift

Java PythonDocker

Running Action

Running Action

Running Action

3

Scales inherently • One process per request

No cost overhead for resiliency • No long running process to be made HA / multi-region

Introduces event programming model

Charges only for what is used • Only worry about code

higher dev velocity, lower operational costs

Serverless model

Deploy actions within millisecs, run it, free up resources

© 2017 IBM Corporation l Interconnect 2017

IBM Bluemix OpenWhisk

Agenda

1. Evolution of Serverless 2. What is serverless aka FaaS? 3. Why is serverless better than a traditional approach? 4. OpenWhisk 5. What is serverless good for? 6. Q&A

© 2017 IBM Corporation l Interconnect 2017

IBM Bluemix OpenWhiskOpenWhisk

FaaS platform to execute code in response to events

© 2017 IBM Corporation l Interconnect 2017

IBM Bluemix OpenWhisk

Delivered asOpen source via Apacheopenwhisk.org

FaaS platform to execute code in response to events

OpenWhisk

© 2017 IBM Corporation l Interconnect 2017

IBM Bluemix OpenWhisk

Managed service on IBM Bluemixbluemix.net/openwhisk

FaaS platform to execute code in response to events

OpenWhisk

© 2017 IBM Corporation l Interconnect 2017

IBM Bluemix OpenWhisk

Triggers(response)

Rules

Actions(code)

Source (events) Results

OpenWhisk

© 2017 IBM Corporation l Interconnect 2017

IBM Bluemix OpenWhisk

OpenWhisk allows you to build up an entirely serverless application architecture

Openwhisk

IOT

Mobile

Cognitive

APIs

Data

OpenWhisk

© 2017 IBM Corporation l Interconnect 2017

IBM Bluemix OpenWhiskOpenWhisk

Supported Languages

JS/NodeJS Swift

Python

Java Docker

Go Haskell

Scala . . .

Multi language

Support

Community Efforts

… and more to come

JS/NodeJS 6

Java

Python 2(3 coming soon)

Swift 3

Docker(any compiled binary,

incl Go, C, …)

Haskell

Scala

© 2017 IBM Corporation l Interconnect 2017

IBM Bluemix OpenWhisk

Non-blocking

Blocking

Periodic

Support for different invocation models

OpenWhisk

© 2017 IBM Corporation l Interconnect 2017

IBM Bluemix OpenWhisk

Supports higher-level programming constructs Chaining/

Sequencing

Action 1

Action 2

Parameter Binding

Default Name

Default Parameters

Default Value

OpenWhisk

© 2017 IBM Corporation l Interconnect 2017

IBM Bluemix OpenWhisk

Event Provider

Open event emitter (consumer ecosystem)

Open interfacefor event emitters

OpenWhisk

© 2017 IBM Corporation l Interconnect 2017

IBM Bluemix OpenWhisk

Event Provider Periodic IBM Cloudant Message Hub

Mobile Push Github

OpenWhisk

IBM App Connect

© 2017 IBM Corporation l Interconnect 2017

IBM Bluemix OpenWhisk

zzz

timechargedGranular pricing

Pay only for the exact time your actions run, on a 100 millisecond granularity. When an action is not invoked, it’s not running in memory, so you don’t pay anything.

OpenWhisk

© 2017 IBM Corporation l Interconnect 2017

IBM Bluemix OpenWhisk

Memory allocated(MB)

Time executing (milliseconds)

Instancesexecuting simultaneously (count)

Pricing modelTime an action was running * memory allocated to action

$0.000017 per GBs Free tier: 400,000 GBs

OpenWhisk

© 2017 IBM Corporation l Interconnect 2017

IBM Bluemix OpenWhisk

Community efforts to integrate with open tools

• VS Code • NodeRED • Jupyter Notebooks • … #BuildUp

OpenWhisk

© 2017 IBM Corporation l Interconnect 2017

IBM Bluemix OpenWhisk

Allows to package & deploy all actions, triggers, rules

into a single project

Serverless Framework

OpenWhisk

© 2017 IBM Corporation l Interconnect 2017

IBM Bluemix OpenWhiskOpenWhiskOpen Engine

Docker (and potentially other abstractions going forward)

*work in progress

REST

Action 2Swift

Action 3NodeJS

Action 5Docker

Action 4Docker

Action 1NodeJS

Rule

Rule

Rule

Service Ecosystem

Bluemix Services

3rd Party Services

Self-enabled Services

Invo

ke

CLI SDKUIIDE API Gateway*

Package

Feed

Package

Feed

Triggers

Package

Feed

© 2017 IBM Corporation l Interconnect 2017

IBM Bluemix OpenWhisk

Agenda

1. Evolution of Serverless 2. What is serverless aka FaaS? 3. Why is serverless better than a traditional approach? 4. OpenWhisk 5. What is serverless good for? 6. Q&A

© 2017 IBM Corporation l Interconnect 2017

IBM Bluemix OpenWhiskWhat is Serverless good for?

Volatile workload that can be split in smaller short-running pieces.

Suited for sporadic as well as heavy load scenarios.

© 2017 IBM Corporation l Interconnect 2017

IBM Bluemix OpenWhiskWhat is Serverless good for?

Serverless microservices / API backends

© 2017 IBM Corporation l Interconnect 2017

IBM Bluemix OpenWhiskWhat is Serverless good for?

Define API Endpoints (URLs) and map to Actions

Define ActionsFull control over HTTP headers & body

12Serverless microservice APIs/backend

© 2017 IBM Corporation l Interconnect 2017

IBM Bluemix OpenWhiskWhat is Serverless good for?

Serverless microservices / API backends

Define Actions:getCustomercreateCustomer deleteCustomer

Define API Endpoints (URLs) and map to ActionsGet: mydomain.com/…/customersPost: mydomain.com/…/customers Delete: mydomain.com/…/customers

2 1

© 2017 IBM Corporation l Interconnect 2017

IBM Bluemix OpenWhiskWhat is Serverless good for?Define API Endpoints (URLs) (optionally by using custom domains)

getCostumercreateCostumer deleteCostumer

GetPostDelete

API Gateway takes care of:Context path mappingCustom host name & SSL certThrottlingSecurity

© 2017 IBM Corporation l Interconnect 2017

IBM Bluemix OpenWhiskWhat is Serverless good for?

Swift Action

Mobile backend

IBM API Gateway

Openwhisk

APIHi!

© 2017 IBM Corporation l Interconnect 2017

IBM Bluemix OpenWhiskWhat is Serverless good for?

Outsource compute-intensive tasks to a scalable serverless platform and implement your actions without having to switch the programming language.

Swift Action

IBM API Gateway

Openwhisk

APIHi!

Mobile backend

© 2017 IBM Corporation l Interconnect 2017

IBM Bluemix OpenWhiskWhat is Serverless good for?

Data processing

OpenwhiskIBM Cloudant

© 2017 IBM Corporation l Interconnect 2017

IBM Bluemix OpenWhiskWhat is Serverless good for?

Data processing

OpenwhiskIBM Cloudant

Ideally suited for working with all kinds of data like audio, image, video, docs or text data• audio normalization • image rotation, sharpening, noise reduction • generate thumbnails • apply OCR on images • video transcoding • detect objects or people appearing in images or videos

© 2017 IBM Corporation l Interconnect 2017

IBM Bluemix OpenWhiskWhat is Serverless good for?

Data processing

OpenwhiskIBM Cloudant

http://ecc.ibm.com/case-study/us-en/ECCF-CDC12387USEN

© 2017 IBM Corporation l Interconnect 2017

IBM Bluemix OpenWhiskWhat is Serverless good for?

Cognitive

OpenwhiskIBM Cloudant

© 2017 IBM Corporation l Interconnect 2017

IBM Bluemix OpenWhiskWhat is Serverless good for?

Cognitive

Dark Visiongithub.com/IBM-Bluemix/openwhisk-darkvisionapp

OpenwhiskIBM Cloudant

© 2017 IBM Corporation l Interconnect 2017

IBM Bluemix OpenWhiskWhat is Serverless good for?

Cognitive

Skylinkhttps://github.com/IBM-Bluemix/skylink

OpenwhiskIBM Cloudant

© 2017 IBM Corporation l Interconnect 2017

IBM Bluemix OpenWhiskWhat is Serverless good for?

Event processing/Message Hub

Real-time Datastream OpenwhiskIBM Message Hub IBM Cloudant

© 2017 IBM Corporation l Interconnect 2017

IBM Bluemix OpenWhisk

Real-time Datastream OpenwhiskIBM Message Hub IBM Cloudant

What is Serverless good for?

Event processing/Message Hub

Bluemix-managed Apache Kafka service for real-time build outs of data pipelines and streaming apps

supports binary dataNew

© 2017 IBM Corporation l Interconnect 2017

IBM Bluemix OpenWhisk

Real-time Datastream OpenwhiskIBM Message Hub IBM Cloudant

What is Serverless good for?

Event processing via IBM App Connect

IBM App Connect

© 2017 IBM Corporation l Interconnect 2017

IBM Bluemix OpenWhiskWhat is Serverless good for?

IoT Watson IoT Realtime Insights

Trigger events based on IoT sensor data

© 2017 IBM Corporation l Interconnect 2017

IBM Bluemix OpenWhiskWhat is Serverless good for?

IoT Node-Red

© 2017 IBM Corporation l Interconnect 2017

IBM Bluemix OpenWhiskWhat is Serverless good for?

Scheduled tasks

Periodic Alarm Openwhisk

© 2017 IBM Corporation l Interconnect 2017

IBM Bluemix OpenWhiskWhat is Serverless good for?

ChatbotsIBM API Gateway

(Optional)

API

© 2017 IBM Corporation l Interconnect 2017

IBM Bluemix OpenWhiskWhat is Serverless good for?

Compute intensive scale out tasks

© 2017 IBM Corporation l Interconnect 2017

IBM Bluemix OpenWhiskWhat is Serverless good for?

Compute intensive scale out tasks

© 2017 IBM Corporation l Interconnect 2017

IBM Bluemix OpenWhiskWhat is Serverless good for?

Compute intensive scale out tasks

© 2017 IBM Corporation l Interconnect 2017

IBM Bluemix OpenWhisk

Agenda

1. Evolution of Serverless 2. What is serverless aka FaaS? 3. Why is serverless better than a traditional approach? 4. OpenWhisk 5. What is serverless good for? 6. Q&A

© 2017 IBM Corporation l Interconnect 2017

IBM Bluemix OpenWhisk

Commercial offering home: bluemix.net/openwhisk

Open-source project home: openwhisk.org

Slack: slack.openwhisk.org

Learn More

Learn more

© 2017 IBM Corporation l Interconnect 2017

IBM Bluemix OpenWhisk

Github github.com/openwhisk

Twitter twitter.com/openwhisk

Medium medium.com/openwhisk

Slideshare slideshare.net/OpenWhisk

Youtube youtube.com/channel/UCbzgShnQk8F43NKsvEYA1SA

Learn More

Learn more

© 2017 IBM Corporation l Interconnect 2017

IBM Bluemix OpenWhisk

Serverless Conf, Austin austin.serverlessconf.io

FunctionConf, Amsterdam functionconf.io

Learn More

Future Conferences

© 2017 IBM Corporation l Interconnect 2017

IBM Bluemix OpenWhisk

Q&A@Michael_beh@AndreasNauerz

© 2017 IBM Corporation l Interconnect 2017

IBM Bluemix OpenWhisk

Notices and disclaimersCopyright © 2017 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.

IBM products are manufactured from new parts or new and used parts. In some cases, a product may not be new and may have been previously installed. Regardless, our warranty terms apply.”

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 actionsthe 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.

© 2017 IBM Corporation l Interconnect 2017

IBM Bluemix OpenWhisk

Notices and disclaimers continued

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 herein 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.