Serverless - introduction et perspectives concrètes
Bertrand Delacrétaz :: Principal Scientist, Adobe Basel :: Member, Apache Software Foundation :: @bdelacretaz
API DevTalks 2.0

Neuchâtel, Avril 2019
Images: Adobe Stock,

sauf indication contraire
Slides revision 2019-04-10b
T
Serverless, introduction et perspectives

Bertrand Delacretaz, API Dev Talks 2.0
2
Experience

Cloud
Serverless, introduction et perspectives

Bertrand Delacretaz, API Dev Talks 2.0
3
SERVERLESS?
Serverless, introduction et perspectives

Bertrand Delacretaz, API Dev Talks 2.0
5
$ curl https://jsonplaceholder.typicode.com/users
{
"id": 6,
"name": "Mrs. Dennis Schulist",
"username": "Leopoldo_Corkery",
"email": "Karley_Dach@jasper.info",
}
Serverless, introduction et perspectives

Bertrand Delacretaz, API Dev Talks 2.0
6
Source: Deloitte Consulting LLP, via Alexander Klimetschek, @alexkli
Evolutions des technologies dans le Cloud
Serverless, introduction et perspectives

Bertrand Delacretaz, API Dev Talks 2.0
7
Hello, Serverless!
Installation:
URL:
SERVERLESS?
Serverless, introduction et perspectives

Bertrand Delacretaz, API Dev Talks 2.0
9
Puis-je emprunter

votre container

pour un instant?
(*) Abus de langage
Serverless, introduction et perspectives

Bertrand Delacretaz, API Dev Talks 2.0
10
serverless ;-)
Scalable, unplanned capacity
Scalable cost, scale-to-zero
Fine deployment granularity (functions)
Serverless, introduction et perspectives

Bertrand Delacretaz, API Dev Talks 2.0
11
Message Bus
Alarms
Server
(Java)
Stats
Server

(Go)
Une application hétérogène...
Factory

Data
Dashboard

Server (PHP)
Notifications

Server

(Python)

Serverless, introduction et perspectives

Bertrand Delacretaz, API Dev Talks 2.0
12
Message Bus
Alarms
Functions
(Java)
Stats
Functions

(Go)
Serverless: infrastructure unique, partagée
Factory

Data
Dashboard

Functions
(PHP)
Notifications

Functions

(Python)

T
APACHE OPENWHISK
Serverless, introduction et perspectives

Bertrand Delacretaz, API Dev Talks 2.0
14
Projet en incubation de la
Fondation Apache, basé
sur une donation de code
conjointe de IBM et
Adobe, novembre 2016

http://openwhisk.incubator.apache.org
T
Fièrement propulsé par
Serverless, introduction et perspectives

Bertrand Delacretaz, API Dev Talks 2.0
15
Triggers -> OpenWhisk Core -> Orchestrated Containers

source: http://openwhisk.incubator.apache.org/
Serverless, introduction et perspectives

Bertrand Delacretaz, API Dev Talks 2.0
16
T
Commande Slack
/calc
HTTP GET
Execute
Serverless, introduction et perspectives

Bertrand Delacretaz, API Dev Talks 2.0
17
T
Commande Slack
/calc
zip:
installation:
exécution:
Slack:

Create App

Create Command (URL)
Serverless, introduction et perspectives

Bertrand Delacretaz, API Dev Talks 2.0
18
$ wsk action update $(md5 -q action.zip) action.zip 
> --web true --kind nodejs:10
ok: updated action 91c6b9a9d1d58ecda39e1966022ca9d9
$ wsk action get 91c6b9a9d1d58ecda39e1966022ca9d9 --url
ok: got action 91c6b9a9d1d58ecda39e1966022ca9d9
https://runtime.adobe.io/91c6b9a9d1d58ecda39e1966022ca9d9
Content-addressed code!
Scale-to-zero: keeping multiple versions of the
action code ready to run costs "nothing".
MAIS POUR QUOI FAIRE?
Serverless, introduction et perspectives

Bertrand Delacretaz, API Dev Talks 2.0
20
Assets Ingestion
Diagram by Alexander Klimetschek, @aklimets
BETA
Serverless, introduction et perspectives

Bertrand Delacretaz, API Dev Talks 2.0
21
With Adobe Sensei
Examples by Alexander Klimetschek, @alexkli
sensei-caption-worker.js
deployment-package.json
BETA
Serverless, introduction et perspectives

Bertrand Delacretaz, API Dev Talks 2.0
22
https://github.com/adobe/commerce-cif-api
BETA
Serverless, introduction et perspectives

Bertrand Delacretaz, API Dev Talks 2.0
23
source: https://www.adobe.io/apis/experiencecloud/commerce-integration-framework/docs.html
T
Commerce Integration Framework Architecture
BETA
Serverless, introduction et perspectives

Bertrand Delacretaz, API Dev Talks 2.0
24
Edge Computing - CDN - Workers
source: https://www.cloudflare.com/network/
Serverless, introduction et perspectives

Bertrand Delacretaz, API Dev Talks 2.0
Adobe I/O Runtime

https://www.adobe.io/apis/experienceplatform/runtime.html
Apache OpenWhisk + mes exemples

http://openwhisk.incubator.apache.org/

https://github.com/bdelacretaz/openwhisk-playground
Serverless to the Max:case study, Troy Hunt, haveibeenpwned.com

http://bit.ly/serverless-max
Developing Serverless Applications

short book by Raymond Camden, O'Reilly
Twitter:

@adobeio, @alexkli, @bdelacretaz
Liens et Coda
Serverless -> Intégration !
TM
BETA
Many thanks to the I/O Runtime & Friends "gang" for your contributions, you know who you are!

Serverless - introduction et perspectives concrètes

  • 1.
    Serverless - introductionet perspectives concrètes Bertrand Delacrétaz :: Principal Scientist, Adobe Basel :: Member, Apache Software Foundation :: @bdelacretaz API DevTalks 2.0
 Neuchâtel, Avril 2019 Images: Adobe Stock,
 sauf indication contraire Slides revision 2019-04-10b T
  • 2.
    Serverless, introduction etperspectives
 Bertrand Delacretaz, API Dev Talks 2.0 2 Experience
 Cloud
  • 3.
    Serverless, introduction etperspectives
 Bertrand Delacretaz, API Dev Talks 2.0 3
  • 4.
  • 5.
    Serverless, introduction etperspectives
 Bertrand Delacretaz, API Dev Talks 2.0 5 $ curl https://jsonplaceholder.typicode.com/users { "id": 6, "name": "Mrs. Dennis Schulist", "username": "Leopoldo_Corkery", "email": "Karley_Dach@jasper.info", }
  • 6.
    Serverless, introduction etperspectives
 Bertrand Delacretaz, API Dev Talks 2.0 6 Source: Deloitte Consulting LLP, via Alexander Klimetschek, @alexkli Evolutions des technologies dans le Cloud
  • 7.
    Serverless, introduction etperspectives
 Bertrand Delacretaz, API Dev Talks 2.0 7 Hello, Serverless! Installation: URL:
  • 8.
  • 9.
    Serverless, introduction etperspectives
 Bertrand Delacretaz, API Dev Talks 2.0 9 Puis-je emprunter
 votre container
 pour un instant? (*) Abus de langage
  • 10.
    Serverless, introduction etperspectives
 Bertrand Delacretaz, API Dev Talks 2.0 10 serverless ;-) Scalable, unplanned capacity Scalable cost, scale-to-zero Fine deployment granularity (functions)
  • 11.
    Serverless, introduction etperspectives
 Bertrand Delacretaz, API Dev Talks 2.0 11 Message Bus Alarms Server (Java) Stats Server
 (Go) Une application hétérogène... Factory
 Data Dashboard
 Server (PHP) Notifications
 Server
 (Python)

  • 12.
    Serverless, introduction etperspectives
 Bertrand Delacretaz, API Dev Talks 2.0 12 Message Bus Alarms Functions (Java) Stats Functions
 (Go) Serverless: infrastructure unique, partagée Factory
 Data Dashboard
 Functions (PHP) Notifications
 Functions
 (Python)
 T
  • 13.
  • 14.
    Serverless, introduction etperspectives
 Bertrand Delacretaz, API Dev Talks 2.0 14 Projet en incubation de la Fondation Apache, basé sur une donation de code conjointe de IBM et Adobe, novembre 2016
 http://openwhisk.incubator.apache.org T Fièrement propulsé par
  • 15.
    Serverless, introduction etperspectives
 Bertrand Delacretaz, API Dev Talks 2.0 15 Triggers -> OpenWhisk Core -> Orchestrated Containers
 source: http://openwhisk.incubator.apache.org/
  • 16.
    Serverless, introduction etperspectives
 Bertrand Delacretaz, API Dev Talks 2.0 16 T Commande Slack /calc HTTP GET Execute
  • 17.
    Serverless, introduction etperspectives
 Bertrand Delacretaz, API Dev Talks 2.0 17 T Commande Slack /calc zip: installation: exécution: Slack:
 Create App
 Create Command (URL)
  • 18.
    Serverless, introduction etperspectives
 Bertrand Delacretaz, API Dev Talks 2.0 18 $ wsk action update $(md5 -q action.zip) action.zip > --web true --kind nodejs:10 ok: updated action 91c6b9a9d1d58ecda39e1966022ca9d9 $ wsk action get 91c6b9a9d1d58ecda39e1966022ca9d9 --url ok: got action 91c6b9a9d1d58ecda39e1966022ca9d9 https://runtime.adobe.io/91c6b9a9d1d58ecda39e1966022ca9d9 Content-addressed code! Scale-to-zero: keeping multiple versions of the action code ready to run costs "nothing".
  • 19.
  • 20.
    Serverless, introduction etperspectives
 Bertrand Delacretaz, API Dev Talks 2.0 20 Assets Ingestion Diagram by Alexander Klimetschek, @aklimets BETA
  • 21.
    Serverless, introduction etperspectives
 Bertrand Delacretaz, API Dev Talks 2.0 21 With Adobe Sensei Examples by Alexander Klimetschek, @alexkli sensei-caption-worker.js deployment-package.json BETA
  • 22.
    Serverless, introduction etperspectives
 Bertrand Delacretaz, API Dev Talks 2.0 22 https://github.com/adobe/commerce-cif-api BETA
  • 23.
    Serverless, introduction etperspectives
 Bertrand Delacretaz, API Dev Talks 2.0 23 source: https://www.adobe.io/apis/experiencecloud/commerce-integration-framework/docs.html T Commerce Integration Framework Architecture BETA
  • 24.
    Serverless, introduction etperspectives
 Bertrand Delacretaz, API Dev Talks 2.0 24 Edge Computing - CDN - Workers source: https://www.cloudflare.com/network/
  • 25.
    Serverless, introduction etperspectives
 Bertrand Delacretaz, API Dev Talks 2.0 Adobe I/O Runtime
 https://www.adobe.io/apis/experienceplatform/runtime.html Apache OpenWhisk + mes exemples
 http://openwhisk.incubator.apache.org/
 https://github.com/bdelacretaz/openwhisk-playground Serverless to the Max:case study, Troy Hunt, haveibeenpwned.com
 http://bit.ly/serverless-max Developing Serverless Applications
 short book by Raymond Camden, O'Reilly Twitter:
 @adobeio, @alexkli, @bdelacretaz Liens et Coda Serverless -> Intégration ! TM BETA Many thanks to the I/O Runtime & Friends "gang" for your contributions, you know who you are!