applications orientées événements et traitement …...open (apache 2) & open ecosystem...
TRANSCRIPT
![Page 1: Applications orientées événements et traitement …...Open (Apache 2) & open ecosystem Supports higher-level programming constructs(e.g. sequencing) Open interface for event providers](https://reader034.vdocument.in/reader034/viewer/2022042220/5ec6345befbf28749963ad25/html5/thumbnails/1.jpg)
Applications orientées événements et traitement sans serveur (“serverless”)
Catherine Ezvan (@cezvan)Senior Certified IT SpecialistIBM Cloud
![Page 2: Applications orientées événements et traitement …...Open (Apache 2) & open ecosystem Supports higher-level programming constructs(e.g. sequencing) Open interface for event providers](https://reader034.vdocument.in/reader034/viewer/2022042220/5ec6345befbf28749963ad25/html5/thumbnails/2.jpg)
2
Let’s talk about…
● Why we need event-driven infrastructure
● Requirements for event-driven infrastructure
● Introducing OpenWhisk
● Conclusion
![Page 3: Applications orientées événements et traitement …...Open (Apache 2) & open ecosystem Supports higher-level programming constructs(e.g. sequencing) Open interface for event providers](https://reader034.vdocument.in/reader034/viewer/2022042220/5ec6345befbf28749963ad25/html5/thumbnails/3.jpg)
3
Welcome to Industrial internet!
![Page 4: Applications orientées événements et traitement …...Open (Apache 2) & open ecosystem Supports higher-level programming constructs(e.g. sequencing) Open interface for event providers](https://reader034.vdocument.in/reader034/viewer/2022042220/5ec6345befbf28749963ad25/html5/thumbnails/4.jpg)
4
Devices can be...
![Page 5: Applications orientées événements et traitement …...Open (Apache 2) & open ecosystem Supports higher-level programming constructs(e.g. sequencing) Open interface for event providers](https://reader034.vdocument.in/reader034/viewer/2022042220/5ec6345befbf28749963ad25/html5/thumbnails/5.jpg)
5
How would you implement it?
![Page 6: Applications orientées événements et traitement …...Open (Apache 2) & open ecosystem Supports higher-level programming constructs(e.g. sequencing) Open interface for event providers](https://reader034.vdocument.in/reader034/viewer/2022042220/5ec6345befbf28749963ad25/html5/thumbnails/6.jpg)
6
OK, let’s move step by step
![Page 7: Applications orientées événements et traitement …...Open (Apache 2) & open ecosystem Supports higher-level programming constructs(e.g. sequencing) Open interface for event providers](https://reader034.vdocument.in/reader034/viewer/2022042220/5ec6345befbf28749963ad25/html5/thumbnails/7.jpg)
7
And if you want it to be HA?
![Page 8: Applications orientées événements et traitement …...Open (Apache 2) & open ecosystem Supports higher-level programming constructs(e.g. sequencing) Open interface for event providers](https://reader034.vdocument.in/reader034/viewer/2022042220/5ec6345befbf28749963ad25/html5/thumbnails/8.jpg)
8
What about another device?
![Page 9: Applications orientées événements et traitement …...Open (Apache 2) & open ecosystem Supports higher-level programming constructs(e.g. sequencing) Open interface for event providers](https://reader034.vdocument.in/reader034/viewer/2022042220/5ec6345befbf28749963ad25/html5/thumbnails/9.jpg)
9
Let’s be smart!
![Page 10: Applications orientées événements et traitement …...Open (Apache 2) & open ecosystem Supports higher-level programming constructs(e.g. sequencing) Open interface for event providers](https://reader034.vdocument.in/reader034/viewer/2022042220/5ec6345befbf28749963ad25/html5/thumbnails/10.jpg)
10
An unexpected spike!
![Page 11: Applications orientées événements et traitement …...Open (Apache 2) & open ecosystem Supports higher-level programming constructs(e.g. sequencing) Open interface for event providers](https://reader034.vdocument.in/reader034/viewer/2022042220/5ec6345befbf28749963ad25/html5/thumbnails/11.jpg)
11
Scaling out!
![Page 12: Applications orientées événements et traitement …...Open (Apache 2) & open ecosystem Supports higher-level programming constructs(e.g. sequencing) Open interface for event providers](https://reader034.vdocument.in/reader034/viewer/2022042220/5ec6345befbf28749963ad25/html5/thumbnails/12.jpg)
12
And traffic goes down...
![Page 13: Applications orientées événements et traitement …...Open (Apache 2) & open ecosystem Supports higher-level programming constructs(e.g. sequencing) Open interface for event providers](https://reader034.vdocument.in/reader034/viewer/2022042220/5ec6345befbf28749963ad25/html5/thumbnails/13.jpg)
13
An excessive compute?
![Page 14: Applications orientées événements et traitement …...Open (Apache 2) & open ecosystem Supports higher-level programming constructs(e.g. sequencing) Open interface for event providers](https://reader034.vdocument.in/reader034/viewer/2022042220/5ec6345befbf28749963ad25/html5/thumbnails/14.jpg)
14
Or maybe those ones?
![Page 15: Applications orientées événements et traitement …...Open (Apache 2) & open ecosystem Supports higher-level programming constructs(e.g. sequencing) Open interface for event providers](https://reader034.vdocument.in/reader034/viewer/2022042220/5ec6345befbf28749963ad25/html5/thumbnails/15.jpg)
15
And in the meantime...
![Page 16: Applications orientées événements et traitement …...Open (Apache 2) & open ecosystem Supports higher-level programming constructs(e.g. sequencing) Open interface for event providers](https://reader034.vdocument.in/reader034/viewer/2022042220/5ec6345befbf28749963ad25/html5/thumbnails/16.jpg)
16
And further down...
![Page 17: Applications orientées événements et traitement …...Open (Apache 2) & open ecosystem Supports higher-level programming constructs(e.g. sequencing) Open interface for event providers](https://reader034.vdocument.in/reader034/viewer/2022042220/5ec6345befbf28749963ad25/html5/thumbnails/17.jpg)
17
And...
![Page 18: Applications orientées événements et traitement …...Open (Apache 2) & open ecosystem Supports higher-level programming constructs(e.g. sequencing) Open interface for event providers](https://reader034.vdocument.in/reader034/viewer/2022042220/5ec6345befbf28749963ad25/html5/thumbnails/18.jpg)
18
One process, one container
![Page 19: Applications orientées événements et traitement …...Open (Apache 2) & open ecosystem Supports higher-level programming constructs(e.g. sequencing) Open interface for event providers](https://reader034.vdocument.in/reader034/viewer/2022042220/5ec6345befbf28749963ad25/html5/thumbnails/19.jpg)
19
One process, one container
![Page 20: Applications orientées événements et traitement …...Open (Apache 2) & open ecosystem Supports higher-level programming constructs(e.g. sequencing) Open interface for event providers](https://reader034.vdocument.in/reader034/viewer/2022042220/5ec6345befbf28749963ad25/html5/thumbnails/20.jpg)
20
But if we don’t scale fast...
How much does it cost?
![Page 21: Applications orientées événements et traitement …...Open (Apache 2) & open ecosystem Supports higher-level programming constructs(e.g. sequencing) Open interface for event providers](https://reader034.vdocument.in/reader034/viewer/2022042220/5ec6345befbf28749963ad25/html5/thumbnails/21.jpg)
21
Ideal case
![Page 22: Applications orientées événements et traitement …...Open (Apache 2) & open ecosystem Supports higher-level programming constructs(e.g. sequencing) Open interface for event providers](https://reader034.vdocument.in/reader034/viewer/2022042220/5ec6345befbf28749963ad25/html5/thumbnails/22.jpg)
22
Compute follows traffic
![Page 23: Applications orientées événements et traitement …...Open (Apache 2) & open ecosystem Supports higher-level programming constructs(e.g. sequencing) Open interface for event providers](https://reader034.vdocument.in/reader034/viewer/2022042220/5ec6345befbf28749963ad25/html5/thumbnails/23.jpg)
23
Compute follows traffic
![Page 24: Applications orientées événements et traitement …...Open (Apache 2) & open ecosystem Supports higher-level programming constructs(e.g. sequencing) Open interface for event providers](https://reader034.vdocument.in/reader034/viewer/2022042220/5ec6345befbf28749963ad25/html5/thumbnails/24.jpg)
24
So what are the requirements?
● Invoke and scale as fast as possible● Terminate after completion
![Page 25: Applications orientées événements et traitement …...Open (Apache 2) & open ecosystem Supports higher-level programming constructs(e.g. sequencing) Open interface for event providers](https://reader034.vdocument.in/reader034/viewer/2022042220/5ec6345befbf28749963ad25/html5/thumbnails/25.jpg)
25
So what are the requirements?
● Invoke and scale as fast as possible● Terminate after completion● Charge per compute used
![Page 26: Applications orientées événements et traitement …...Open (Apache 2) & open ecosystem Supports higher-level programming constructs(e.g. sequencing) Open interface for event providers](https://reader034.vdocument.in/reader034/viewer/2022042220/5ec6345befbf28749963ad25/html5/thumbnails/26.jpg)
26
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
![Page 27: Applications orientées événements et traitement …...Open (Apache 2) & open ecosystem Supports higher-level programming constructs(e.g. sequencing) Open interface for event providers](https://reader034.vdocument.in/reader034/viewer/2022042220/5ec6345befbf28749963ad25/html5/thumbnails/27.jpg)
27
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
![Page 28: Applications orientées événements et traitement …...Open (Apache 2) & open ecosystem Supports higher-level programming constructs(e.g. sequencing) Open interface for event providers](https://reader034.vdocument.in/reader034/viewer/2022042220/5ec6345befbf28749963ad25/html5/thumbnails/28.jpg)
28
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
![Page 29: Applications orientées événements et traitement …...Open (Apache 2) & open ecosystem Supports higher-level programming constructs(e.g. sequencing) Open interface for event providers](https://reader034.vdocument.in/reader034/viewer/2022042220/5ec6345befbf28749963ad25/html5/thumbnails/29.jpg)
29
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)
![Page 30: Applications orientées événements et traitement …...Open (Apache 2) & open ecosystem Supports higher-level programming constructs(e.g. sequencing) Open interface for event providers](https://reader034.vdocument.in/reader034/viewer/2022042220/5ec6345befbf28749963ad25/html5/thumbnails/30.jpg)
30
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 31: Applications orientées événements et traitement …...Open (Apache 2) & open ecosystem Supports higher-level programming constructs(e.g. sequencing) Open interface for event providers](https://reader034.vdocument.in/reader034/viewer/2022042220/5ec6345befbf28749963ad25/html5/thumbnails/31.jpg)
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
![Page 32: Applications orientées événements et traitement …...Open (Apache 2) & open ecosystem Supports higher-level programming constructs(e.g. sequencing) Open interface for event providers](https://reader034.vdocument.in/reader034/viewer/2022042220/5ec6345befbf28749963ad25/html5/thumbnails/32.jpg)
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
![Page 33: Applications orientées événements et traitement …...Open (Apache 2) & open ecosystem Supports higher-level programming constructs(e.g. sequencing) Open interface for event providers](https://reader034.vdocument.in/reader034/viewer/2022042220/5ec6345befbf28749963ad25/html5/thumbnails/33.jpg)
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
![Page 34: Applications orientées événements et traitement …...Open (Apache 2) & open ecosystem Supports higher-level programming constructs(e.g. sequencing) Open interface for event providers](https://reader034.vdocument.in/reader034/viewer/2022042220/5ec6345befbf28749963ad25/html5/thumbnails/34.jpg)
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
![Page 35: Applications orientées événements et traitement …...Open (Apache 2) & open ecosystem Supports higher-level programming constructs(e.g. sequencing) Open interface for event providers](https://reader034.vdocument.in/reader034/viewer/2022042220/5ec6345befbf28749963ad25/html5/thumbnails/35.jpg)
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
![Page 36: Applications orientées événements et traitement …...Open (Apache 2) & open ecosystem Supports higher-level programming constructs(e.g. sequencing) Open interface for event providers](https://reader034.vdocument.in/reader034/viewer/2022042220/5ec6345befbf28749963ad25/html5/thumbnails/36.jpg)
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
![Page 37: Applications orientées événements et traitement …...Open (Apache 2) & open ecosystem Supports higher-level programming constructs(e.g. sequencing) Open interface for event providers](https://reader034.vdocument.in/reader034/viewer/2022042220/5ec6345befbf28749963ad25/html5/thumbnails/37.jpg)
OpenWhisk in a nutshell
} 1
Event Providers
OpenWhisk
NoSQL DB (ex. Cloudant)
Push Notifications
…
…
…
Data event occurs, e.g.-Commit on a Git Repository-CRUD operation on NoSQL DB (Cloudant)-….
Trigger execution of associated OpenWhisk action
2
…JS Swift Docker …
![Page 38: Applications orientées événements et traitement …...Open (Apache 2) & open ecosystem Supports higher-level programming constructs(e.g. sequencing) Open interface for event providers](https://reader034.vdocument.in/reader034/viewer/2022042220/5ec6345befbf28749963ad25/html5/thumbnails/38.jpg)
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
![Page 39: Applications orientées événements et traitement …...Open (Apache 2) & open ecosystem Supports higher-level programming constructs(e.g. sequencing) Open interface for event providers](https://reader034.vdocument.in/reader034/viewer/2022042220/5ec6345befbf28749963ad25/html5/thumbnails/39.jpg)
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
![Page 40: Applications orientées événements et traitement …...Open (Apache 2) & open ecosystem Supports higher-level programming constructs(e.g. sequencing) Open interface for event providers](https://reader034.vdocument.in/reader034/viewer/2022042220/5ec6345befbf28749963ad25/html5/thumbnails/40.jpg)
OpenWhisk in a nutshell
Trigger: „A class of events that can happen“T
![Page 41: Applications orientées événements et traitement …...Open (Apache 2) & open ecosystem Supports higher-level programming constructs(e.g. sequencing) Open interface for event providers](https://reader034.vdocument.in/reader034/viewer/2022042220/5ec6345befbf28749963ad25/html5/thumbnails/41.jpg)
OpenWhisk in a nutshell
A Actions: „An event-handler, i.e. code that runs in response to an event“
![Page 42: Applications orientées événements et traitement …...Open (Apache 2) & open ecosystem Supports higher-level programming constructs(e.g. sequencing) Open interface for event providers](https://reader034.vdocument.in/reader034/viewer/2022042220/5ec6345befbf28749963ad25/html5/thumbnails/42.jpg)
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
![Page 43: Applications orientées événements et traitement …...Open (Apache 2) & open ecosystem Supports higher-level programming constructs(e.g. sequencing) Open interface for event providers](https://reader034.vdocument.in/reader034/viewer/2022042220/5ec6345befbf28749963ad25/html5/thumbnails/43.jpg)
OpenWhisk in a nutshell
R
R := T A
Rules: „An association of a trigger and an action“
![Page 44: Applications orientées événements et traitement …...Open (Apache 2) & open ecosystem Supports higher-level programming constructs(e.g. sequencing) Open interface for event providers](https://reader034.vdocument.in/reader034/viewer/2022042220/5ec6345befbf28749963ad25/html5/thumbnails/44.jpg)
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
![Page 45: Applications orientées événements et traitement …...Open (Apache 2) & open ecosystem Supports higher-level programming constructs(e.g. sequencing) Open interface for event providers](https://reader034.vdocument.in/reader034/viewer/2022042220/5ec6345befbf28749963ad25/html5/thumbnails/45.jpg)
OpenWhisk in action, on Bluemix - Dark Vision by Fred Lavigne
45
1. User uploads video from mobile device2. Cloud (Watson services) analyze frames to detect
products, objects, faces, text3. Use results to deliver improved navigation,
recommendations, search
https://www.youtube.com/watch?v=1teIMpkI_Sg
![Page 46: Applications orientées événements et traitement …...Open (Apache 2) & open ecosystem Supports higher-level programming constructs(e.g. sequencing) Open interface for event providers](https://reader034.vdocument.in/reader034/viewer/2022042220/5ec6345befbf28749963ad25/html5/thumbnails/46.jpg)
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/
![Page 47: Applications orientées événements et traitement …...Open (Apache 2) & open ecosystem Supports higher-level programming constructs(e.g. sequencing) Open interface for event providers](https://reader034.vdocument.in/reader034/viewer/2022042220/5ec6345befbf28749963ad25/html5/thumbnails/47.jpg)
• 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/
You want to try OpenWhisk on your own?
![Page 48: Applications orientées événements et traitement …...Open (Apache 2) & open ecosystem Supports higher-level programming constructs(e.g. sequencing) Open interface for event providers](https://reader034.vdocument.in/reader034/viewer/2022042220/5ec6345befbf28749963ad25/html5/thumbnails/48.jpg)
48
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
Rich set of services available in Bluemix (incl Watson)
Leverages Docker, Kafka, Consul, …
![Page 49: Applications orientées événements et traitement …...Open (Apache 2) & open ecosystem Supports higher-level programming constructs(e.g. sequencing) Open interface for event providers](https://reader034.vdocument.in/reader034/viewer/2022042220/5ec6345befbf28749963ad25/html5/thumbnails/49.jpg)
References• General Availability: What’s new in IBM Bluemix OpenWhisk?
• Articles, media and much more on Github Awesome OpenWhisk
• Press and analysts focusing on serverless:– The Wall Street Journal: Look Ma, No Server: Corporate IT
Expects ‘Serverless’ Computing to Trigger Big Changes– Forbes: Three Ways That "Serverless" Computing Will Transform
App Development In 2017– Forbes: Why Enterprises Should Care About Serverless Computing49
![Page 50: Applications orientées événements et traitement …...Open (Apache 2) & open ecosystem Supports higher-level programming constructs(e.g. sequencing) Open interface for event providers](https://reader034.vdocument.in/reader034/viewer/2022042220/5ec6345befbf28749963ad25/html5/thumbnails/50.jpg)
Thank you!
50
@cezvan