ibm bluemix openwhisk: cloud foundry summit 2016, frankfurt, germany: the future of cloud...

Post on 16-Apr-2017

304 Views

Category:

Software

1 Downloads

Preview:

Click to see full reader

TRANSCRIPT

Serverless and Event-driven Applications with Cloud Foundry and OpenWhisk

Andrei Yurkevich (@yurkvch)Chief Technology Officer

Andreas Nauerz (@AndreasNauerz)Technical Product Manager

@altoros

@yurkvch

WHAT WE DOAltoros brings “software assembly lines” into organizationsthrough integration of solutions offered by the Cloud Foundry ecosystem.

TRAINING:

FOR OPERATORS FOR DEVELOPERS

DEVELOPER ADOPTION

CONSULTING

PROOF OF CONCEPT

& IMPLEMENTATION

APP DEVELOPMENT & MICROSERVICES

2

POPULARPOPULAR

Delivered by partners:

Delivered by Altoros:

@altoros

@yurkvch

WHO WE AREAltoros offices Delivery partner in APAC

3

Minsk, BY

Oslo, NO

Sunnyvale, CA

(HQ)Chicopee,

MA

London, UK

Espoo, FI

Buenos Aires, ARSanta Fe,

AR

Tokyo, JP

Silkeborg, DK

Zurich, CH

Taby, SE

4

We will tell you about…

● Why we need event-driven infrastructure

5

We will tell you about…

● Why we need event-driven infrastructure

● Requirements for event-driven infrastructure

6

We will tell you about…

● Why we need event-driven infrastructure

● Requirements for event-driven infrastructure

● Introducing OpenWhisk

7

We will tell you about…

● Why we need event-driven infrastructure

● Requirements for event-driven infrastructure

● Introducing OpenWhisk

● OpenWhisk and CloudFoundry

8

We will tell you about…

● Why we need event-driven infrastructure

● Requirements for event-driven infrastructure

● Introducing OpenWhisk

● OpenWhisk and CloudFoundry

● Demo

9

Welcome to Industrial internet!

10

Devices can be...

11

How would you implement it?

12

OK, let’s move step by step

13

And if you want it to be HA?

14

What about another device?

15

Let’s be smart!

16

An unexpected spike!

17

Scaling out!

18

And traffic goes down...

19

An excessive compute?

20

Or maybe those ones?

21

And in the meantime...

22

And further down...

23

And...

24

One process, one container

25

One process, one container

26

But if we don’t scale fast...

How much does it cost?

27

Ideal case

28

Compute follows traffic

29

Compute follows traffic

30

So what are the requirements?

● Invoke and scale as fast as possible● Terminate after completion

31

So what are the requirements?

● Invoke and scale as fast as possible● Terminate after completion● Charge per compute used

32

So what are the requirements?

● Invoke and scale as fast as possible● Terminate after completion● Charge per compute used● Guaranteed message delivery● Load balancing

33

So what are the requirements?

● Invoke and scale as fast as possible● Terminate after completion● Charge per compute used● Guaranteed message delivery● Load balancing● High availability● Self-healing

34

So what are the requirements?

● Invoke and scale as fast as possible● Terminate after completion● Charge per compute used● Guaranteed message delivery● Load balancing● High availability● Self-healing

● Support of multiple technologies

● Have possibility to launch other microservices

● Write and read data from multiple data sources

35

So what are the requirements?

● Invoke and scale as fast as possible● Terminate after completion● Charge per compute used● Guaranteed message delivery● Load balancing● High availability● Self-healing

● Support of multiple technologies

● Have possibility to launch other microservices

● Write and read data from multiple data sources

● Abstract developers from the infrastructure

Yorktown, NY

OpenWhisk in a nutshell

Raleigh, NCAustin, TX

Boeblingen, Germany

Serverless computing in general and OpenWhisk in particular is regarded an important effort 31

37

OpenWhisk in a nutshell

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

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

38

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)

39

OpenWhisk in a nutshell

Serverless deployment & operations model

40

OpenWhisk in a nutshell

Serverless deployment & operations model

Optimal utilization & granular pricing

41

OpenWhisk in a nutshell

Serverless deployment & operations model

Optimal utilization & granular pricing

Scales on a per-request basis

42

OpenWhisk in a nutshell

Serverless deployment & operations model

Optimal utilization & granular pricing

Flexible programming model

Supports higher-level programming constructs (e.g. sequencing)

Scales on a per-request basis

Polyglot support

43

OpenWhisk in a nutshell

Serverless deployment & operations model

Optimal utilization & granular pricing

Flexible programming model

Open (Apache 2) & open ecosystem

Supports higher-level programming constructs (e.g. sequencing)

Open interface for event providers

Scales on a per-request basis

Polyglot support

Leverages Docker, Kafka, Consul, …

44

OpenWhisk in a nutshell

Serverless deployment & operations model

Optimal utilization & granular pricing

Flexible programming model

Open (Apache 2) & open ecosystem

Supports higher-level programming constructs (e.g. sequencing)

Open interface for event providers

Scales on a per-request basis

Polyglot support

Implemented in Scala

Leverages Docker, Kafka, Consul, …

OpenWhisk in a nutshell

Swift

Application

Container VMCF

2

Polling

1b

Request

1a

Traditional model

• Continous polling due to missing event programming model

• Charges even when idling due to poor utilization

Process & idle

OpenWhisk in a nutshell

Swift

Application

Container VMCF

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?

Process & idle

OpenWhisk in a nutshell

Swift

Application

Container VMCF

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

OpenWhisk in a nutshell

OpenWhisk

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

utilization Pool of actions

Swift DockerJS

Trigger

1

Running action

Running action

Running action

3

Deploy action within millisecs,run it, free up resources

OpenWhisk Engine

2

OpenWhisk in a nutshell

OpenWhisk

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

utilization

• Scales inherently- One process per request

Pool of actions

Swift DockerJS

Trigger

1

Running action

Running action

Running action

3

Deploy action within millisecs,run it, free up resources

OpenWhisk Engine

2

OpenWhisk in a nutshell

OpenWhisk

• 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

Pool of actions

Swift DockerJS

Trigger

1

Running action

Running action

Running action

3

Deploy action within millisecs,run it, free up resources

OpenWhisk Engine

2

OpenWhisk in a nutshell

} 1

Event Providers

OpenWhisk

Cloudant

Push Notifcations

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

Trigger execution of associated OpenWhisk action

2

…JS Swift Docker …

OpenWhisk in a nutshell

OpenWhisk

JS Swift Docker …

Incoming HTTP request, e.g.HTTP GET mynewcoolapp.com/customers

1 2 Invoke associated OpenWhisk action „getCustomers“

Browser

Mobile App

Web App

Variety of languages

OpenWhisk in a nutshell

• 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

OpenWhisk in a nutshell

Trigger: „A class of events that can happen“T

OpenWhisk in a nutshell

A Actions: „An event-handler, i.e. code that runs in response to an event“

OpenWhisk in a nutshell

A

AA:= A1

+ A2+ A3

AB:= A2

+ A1+ A3

AC:= A3

+ A1+ A2

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

OpenWhisk in a nutshell

R

R := T A

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

OpenWhisk in a nutshell

myActionmyFeedT

A

Packages: „A shared collection of triggers and actions“P

A forecast

OpenSource YoursThird

Party

translatelanguageIdtextToSpeechA

AA

databaseCreatedocumentRead...changesT

AAA

Push Notifications

sendMessagewebhookT

A

webhookT

postA

WebsocketsendA

OpenWhisk in a nutshell

You want to try OpenWhisk on your own?

OpenWhisk in a nutshell

You want to try OpenWhisk on your own?

• Want to try out our IBM Bluemix OpenWhisk offering?Sign-up today at: https://new-console.ng.bluemix.net/openwhisk/

OpenWhisk in a nutshell

You want to try OpenWhisk on your own?

• Want to try out our IBM Bluemix OpenWhisk offering?Sign-up today at: https://new-console.ng.bluemix.net/openwhisk/

• Want to try out our open-source OpenWhisk offering?Visit: https://developer.ibm.com/openwhisk/

62

Demo time!

http://bit.ly/1Uw6OP3

63

I will show you...

64

How did it work?

https://developer.ibm.com/openwhisk/2016/04/01/ibm-bluemix-openwhisk-whats-under-the-hood/

65

Another prospective

@yurkvch @altoros 6

6

Cloud Foundry and OpenWhisk

67

I can’t use OpenWhisk on Bluemix because

Vendor lock-in

68

I can’t use OpenWhisk on Bluemix because

Vendor lock-inAll my data is (in local datacenter)

69

I can’t use OpenWhisk on Bluemix because

Vendor lock-inAll my data is (in local datacenter)

We implement a hybrid strategy

70

I can’t use OpenWhisk on Bluemix because

Vendor lock-inAll my data is (in local datacenter)

We implement a hybrid strategy

We don’t use Bluemix at...

71

I can’t use OpenWhisk on Bluemix because

Vendor lock-inAll my data is (in local datacenter)

We implement a hybrid strategy

We don’t use Bluemix at...

I need to have the compute device on the network edge

72

I can’t use OpenWhisk on Bluemix because

Vendor lock-inAll my data is (in a local data center)

We implement a hybrid strategy

We don’t use Bluemix at...

I need to have the compute device on the network edge

Security!

73

https://github.com/openwhisk

altoros.comblog.altoros.com

developer.ibm.com/openwhisk

74

@yurkvch@altoros

Questions? @AndreasNauerz@OpenWhisk

altoros.comblog.altoros.com

developer.ibm.com/openwhisk

75

@yurkvch@altoros

Thank you! @AndreasNauerz@OpenWhisk

top related