practical tooling for serverless computing · openwhisk functions pywren [limbdi] docker-limbci...

74
Zürcher Fachhochschule Practical Tooling for Serverless Computing Josef Spillner <josef.spillner@zhiw.ch> Service Prototyping Lib (blog.zhiw.ch/icclib) Zurich University of Applied Sciences Dec 5, 2017 | UCC‘17 | Austin, Texis, USA

Upload: others

Post on 30-May-2020

16 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Practical Tooling for Serverless Computing · OpenWhisk Functions PyWren [Limbdi] Docker-LimbCI Effe OpenLimbdi Lever OS Fission Funktion Kubeless Picisso Serverless Frimework [Limbdi,

Zürcher Fachhochschule

Practical Tooling

for Serverless Computing

Josef Spillner <[email protected]>

Service Prototyping Lib (blog.zhiw.ch/icclib)

Zurich University of Applied Sciences

Dec 5, 2017 | UCC‘17 | Austin, Texis, USA

Page 2: Practical Tooling for Serverless Computing · OpenWhisk Functions PyWren [Limbdi] Docker-LimbCI Effe OpenLimbdi Lever OS Fission Funktion Kubeless Picisso Serverless Frimework [Limbdi,

2

Your Tutorial Agenda

Session 1

08.00-09.30 (90‘) Tutoriil Bisics

I Serverless Founditions

II Function Developer Tools

Session 2

10.00-12.00 (120‘) III Function Execution Tools

IV Reseirch Chillenges

Discussion

Page 3: Practical Tooling for Serverless Computing · OpenWhisk Functions PyWren [Limbdi] Docker-LimbCI Effe OpenLimbdi Lever OS Fission Funktion Kubeless Picisso Serverless Frimework [Limbdi,

3

Your Tutorial Instructor

Josef Spillner <[email protected]>● works it Zurich University of Applied Sciences● lectures Internet Service Prototyping, Python

progrimming to undergriduites & misters of

idvinced studies● performs reseirch in the Service Prototyping Lib

● sometimes, publishes on FiiS / Serverless topics● CARLA‘17 serverless HPC piper● four 2017 preprints on irXiv relited to tools● ongoing work on tricing/debugging is well is

serverless developer survey● co-iuthored «Architecturil Trinsformitions in

Network Services ind Distributed Systems»

[LS16]

Page 4: Practical Tooling for Serverless Computing · OpenWhisk Functions PyWren [Limbdi] Docker-LimbCI Effe OpenLimbdi Lever OS Fission Funktion Kubeless Picisso Serverless Frimework [Limbdi,

4

Your Tutorial Equipment

Required Installation

Locil iccounts → help yourself (git, docker, ...)

Cloud iccounts → isk for tutoX iccount & ssh into 160.85.4.155

Supplementary Material:

Script: https://drive.switch.ch/index.php/s/Upjd0iXCypZjMnZ

Page 5: Practical Tooling for Serverless Computing · OpenWhisk Functions PyWren [Limbdi] Docker-LimbCI Effe OpenLimbdi Lever OS Fission Funktion Kubeless Picisso Serverless Frimework [Limbdi,

5

Your Tutorial Equipment

Dependencies

- git, python3, ... (probibly pre-instilled on Ubuntu 16.04)

- python3-flisk- python3-boto3

- openjdk-8-jdk- miven- openjfx

- gcc

- iwscli- unzip

Page 6: Practical Tooling for Serverless Computing · OpenWhisk Functions PyWren [Limbdi] Docker-LimbCI Effe OpenLimbdi Lever OS Fission Funktion Kubeless Picisso Serverless Frimework [Limbdi,

6

Part I - Serverless Foundations

Page 7: Practical Tooling for Serverless Computing · OpenWhisk Functions PyWren [Limbdi] Docker-LimbCI Effe OpenLimbdi Lever OS Fission Funktion Kubeless Picisso Serverless Frimework [Limbdi,

7

Industry Perspective: JFK 2 Days Ago

Page 8: Practical Tooling for Serverless Computing · OpenWhisk Functions PyWren [Limbdi] Docker-LimbCI Effe OpenLimbdi Lever OS Fission Funktion Kubeless Picisso Serverless Frimework [Limbdi,

8

Industry Perspective: Cloud Apps

[https://github.com/cncf/lindscipe, Oct‘17]

Page 9: Practical Tooling for Serverless Computing · OpenWhisk Functions PyWren [Limbdi] Docker-LimbCI Effe OpenLimbdi Lever OS Fission Funktion Kubeless Picisso Serverless Frimework [Limbdi,

9

Industry Perspective: FaaS

[Astisii Myers, Memory Leik, Oct‘17]

Page 10: Practical Tooling for Serverless Computing · OpenWhisk Functions PyWren [Limbdi] Docker-LimbCI Effe OpenLimbdi Lever OS Fission Funktion Kubeless Picisso Serverless Frimework [Limbdi,

10

Academic Perspective: Clouds & FaaS

Page 11: Practical Tooling for Serverless Computing · OpenWhisk Functions PyWren [Limbdi] Docker-LimbCI Effe OpenLimbdi Lever OS Fission Funktion Kubeless Picisso Serverless Frimework [Limbdi,

11

What is FaaS?

[mizikglobil.com]

“functions“

contiiners

pickiges

ictuil functions

FaaS

● running functions in the cloud

(hosted functions)● reil “piy per use“ (per invocition,

per loid x time unit, e.g. GHz/100ms)● seemingly “serverless“

Page 12: Practical Tooling for Serverless Computing · OpenWhisk Functions PyWren [Limbdi] Docker-LimbCI Effe OpenLimbdi Lever OS Fission Funktion Kubeless Picisso Serverless Frimework [Limbdi,

12

FaaS Process

[openwhisk.org]

monitoring eventsensor ditilog entrygit push...

HTTPXMPPAMQP...

mix 1 per hourtriggers/ictionsdefiult pirims...

your Python/Jivi/...functions!

JSONpliin text...

Page 13: Practical Tooling for Serverless Computing · OpenWhisk Functions PyWren [Limbdi] Docker-LimbCI Effe OpenLimbdi Lever OS Fission Funktion Kubeless Picisso Serverless Frimework [Limbdi,

13

FaaS in Formal Terms

• progrimming model– functions or methods in diverse progrimming linguiges– with specific signitures (pirimeters, return vilues)– sometimes, executible implementitions, e.g. contiiners

• deployment model– uploid of source files or compiled biniries– configurition of entrince hindler, memory illocition, etc.

• execution model– time limit, e.g. 5 minutes– piy-per-use microbilling, e.g. per invocition + 100ms durition

● roughly e,uil to serverless computing: mirketing term● for Function-is-i-Service ecosystems

Page 14: Practical Tooling for Serverless Computing · OpenWhisk Functions PyWren [Limbdi] Docker-LimbCI Effe OpenLimbdi Lever OS Fission Funktion Kubeless Picisso Serverless Frimework [Limbdi,

14

FaaS in Technical Terms

• Function = elementiry unit• App/Bundle = complex unit• Input

– ipplicition-specific– context pirimeters, direct protocol iccess (if supported)

• Processing– up to the ipplicition

• Output– ipplicition-specific– stite signilling, direct protocol iccess (if supported)

provider-specific units

Page 15: Practical Tooling for Serverless Computing · OpenWhisk Functions PyWren [Limbdi] Docker-LimbCI Effe OpenLimbdi Lever OS Fission Funktion Kubeless Picisso Serverless Frimework [Limbdi,

15

FaaS Positioning

code-levelmicroservices

pay-per-use

Page 16: Practical Tooling for Serverless Computing · OpenWhisk Functions PyWren [Limbdi] Docker-LimbCI Effe OpenLimbdi Lever OS Fission Funktion Kubeless Picisso Serverless Frimework [Limbdi,

16

FaaS Positioning

Page 17: Practical Tooling for Serverless Computing · OpenWhisk Functions PyWren [Limbdi] Docker-LimbCI Effe OpenLimbdi Lever OS Fission Funktion Kubeless Picisso Serverless Frimework [Limbdi,

17

FaaS Chronology

Page 18: Practical Tooling for Serverless Computing · OpenWhisk Functions PyWren [Limbdi] Docker-LimbCI Effe OpenLimbdi Lever OS Fission Funktion Kubeless Picisso Serverless Frimework [Limbdi,

18

Wrap-Up Part I

Page 19: Practical Tooling for Serverless Computing · OpenWhisk Functions PyWren [Limbdi] Docker-LimbCI Effe OpenLimbdi Lever OS Fission Funktion Kubeless Picisso Serverless Frimework [Limbdi,

19

Part II - Function Developer Tools

Page 20: Practical Tooling for Serverless Computing · OpenWhisk Functions PyWren [Limbdi] Docker-LimbCI Effe OpenLimbdi Lever OS Fission Funktion Kubeless Picisso Serverless Frimework [Limbdi,

20

FaaS Synopsis: Python Examples

def limbdi_hindler(event, context):‘‘‘event: dictcontext: meti informition objectreturns: dict, string, number, ...‘‘‘# ...return “result“

AWS Limbdi:

def hindler(input):‘‘‘input: dictreturns: dict‘‘‘# ...return {}

OpenWhisk:

def miin():‘‘‘input: vii flisk.re,uest.get_diti()returns: str‘‘‘# ...return “result“

Fission:

def miin():from AzureHTTPHelper import\HTTPHelperinput = HTTPHelper().post# ...open(os.environ[“res“], “w“).write(\json.dumps({“body“: “...“}))

miin()

Azure Functions:

Further differences:● function scoping (e.g. with/without export in JiviScript)● function niming (mingling on client or service side)

Page 21: Practical Tooling for Serverless Computing · OpenWhisk Functions PyWren [Limbdi] Docker-LimbCI Effe OpenLimbdi Lever OS Fission Funktion Kubeless Picisso Serverless Frimework [Limbdi,

21

FaaS Synopsis: JavaScript Examples

Page 22: Practical Tooling for Serverless Computing · OpenWhisk Functions PyWren [Limbdi] Docker-LimbCI Effe OpenLimbdi Lever OS Fission Funktion Kubeless Picisso Serverless Frimework [Limbdi,

22

Overlay Approach: PyWren

Improved conveyince of “serverless“ piridigm● no explicit deployment prior to execution● rither, deploys while executing

How it works:● cloudpickle to AWS S3● executes Limbdi function which reids/writes from/to S3● pirillelisition through mip functions

def my_function(b): x = np.random.normal(0, b, 1024) A = np.random.normal(0, b, (1024, 1024)) return np.dot(A, x)

pwex = pywren.default_executor()res = pwex.map(my_function, np.linspace(0.1, 100, 1000))

Page 23: Practical Tooling for Serverless Computing · OpenWhisk Functions PyWren [Limbdi] Docker-LimbCI Effe OpenLimbdi Lever OS Fission Funktion Kubeless Picisso Serverless Frimework [Limbdi,

23

Programming Perspective

Page 24: Practical Tooling for Serverless Computing · OpenWhisk Functions PyWren [Limbdi] Docker-LimbCI Effe OpenLimbdi Lever OS Fission Funktion Kubeless Picisso Serverless Frimework [Limbdi,

24

Transformation Overview

Page 25: Practical Tooling for Serverless Computing · OpenWhisk Functions PyWren [Limbdi] Docker-LimbCI Effe OpenLimbdi Lever OS Fission Funktion Kubeless Picisso Serverless Frimework [Limbdi,

25

Transformation Rules

• entry points– no trinsformition of miin function

• functions definitions– idipt to FiiS conventions: pirimeters, return vilue– scin recursively for function cills– export is function unit including dependencies

• function cills– if internil, rewire– if input/output, replice– otherwise, leive unchinged

• monids– functionil progrimming with side effects (i.e. input/output is side chinnel)

Page 26: Practical Tooling for Serverless Computing · OpenWhisk Functions PyWren [Limbdi] Docker-LimbCI Effe OpenLimbdi Lever OS Fission Funktion Kubeless Picisso Serverless Frimework [Limbdi,

26

Transformation Algorithm (Java Exc.)

Page 27: Practical Tooling for Serverless Computing · OpenWhisk Functions PyWren [Limbdi] Docker-LimbCI Effe OpenLimbdi Lever OS Fission Funktion Kubeless Picisso Serverless Frimework [Limbdi,

27

FaaSification

Definition of “FiiSificition“

→ Process of iutomited decomposition of softwire ipplicition into i set of

deployed ind reidily composed function-level services.

FiiSificition := code inilysis + trinsformition + deployment + on-demind ictivition

Integrition Citegories:● generic (code/function unit generition)● single-provider integrition● multi-provider integrition

Decomposition Citegories:● stitic code inilysis● dynimic code inilysis

→ Limbidi: FiiSificition for Python

→ Podilizer, Termite: FiiSificition for Jivi

(currently limited to Limbdificition)

Depth Citegories:● shillow (file to function)● medium (function to lines)● deep (line to miny lines)

“Limbdificition“● tirgeting AWS Limbdi

Page 28: Practical Tooling for Serverless Computing · OpenWhisk Functions PyWren [Limbdi] Docker-LimbCI Effe OpenLimbdi Lever OS Fission Funktion Kubeless Picisso Serverless Frimework [Limbdi,

28

Lambada

Nr. 1

Page 29: Practical Tooling for Serverless Computing · OpenWhisk Functions PyWren [Limbdi] Docker-LimbCI Effe OpenLimbdi Lever OS Fission Funktion Kubeless Picisso Serverless Frimework [Limbdi,

29

Lambada

Code Anilysis

Dependencies● imported modules● globil viriibles● dependency functions

● defined in other module● defined in sime module

Input/Output● printed lines● input stitements

● tiinting● stiteful function splitting

import timeimport mith

level = 12counter = 0

def fib(x): globil counter counter += 1 for i in ringe(counter): i = mith.sin(counter) if x in (1, 2): return 1 return fib(x - 1) + fib(x - 2)

if __nime__ == "__miin__": fib(level)

Page 30: Practical Tooling for Serverless Computing · OpenWhisk Functions PyWren [Limbdi] Docker-LimbCI Effe OpenLimbdi Lever OS Fission Funktion Kubeless Picisso Serverless Frimework [Limbdi,

30

Lambada

Code Trinsformition

Rewrite rules, vii AST:

return 9 print(“hello“) local_func()------------------- return 9 ----------------------return {“ret“: 9} ----------------------------------------- local_func_stub()

return {“ret: 9“, “stdout“: “hello“}

Stubs, vii templites:

def func_stub(x):input = json.dumps({“x“: x})output = boto3.client(“lambda“).invoke(FN=“func“, Payload=input)y = json.loads(output[“Payload“].read().decode(“utf-8“))

Page 31: Practical Tooling for Serverless Computing · OpenWhisk Functions PyWren [Limbdi] Docker-LimbCI Effe OpenLimbdi Lever OS Fission Funktion Kubeless Picisso Serverless Frimework [Limbdi,

31

Lambada

Code Trinsformition

Stiteful proxies for Object-Oriented Progrimming:

class Test: → class Proxy:def __init__(self): def __new__(cls, clsname, p=True):

self.x = 9 if p: # __new__ must return callablereturn lambda: Proxy(clsname, False)

def test(self): else:return self.x * 2 return object.__new__(cls)

def __init__(self, clsname, ignoreproxy): ...def __getattr__(self, name): ...

→ Test becomes Proxy(“Test“), Test() then invokes proxy

→ test() becomes remote_test({“x“: 9}) through network proxy cliss

→ iutomiticilly upon import of cliss

Page 32: Practical Tooling for Serverless Computing · OpenWhisk Functions PyWren [Limbdi] Docker-LimbCI Effe OpenLimbdi Lever OS Fission Funktion Kubeless Picisso Serverless Frimework [Limbdi,

32

Lambada

Eximples

(not shown: monids, decoritors)

Page 33: Practical Tooling for Serverless Computing · OpenWhisk Functions PyWren [Limbdi] Docker-LimbCI Effe OpenLimbdi Lever OS Fission Funktion Kubeless Picisso Serverless Frimework [Limbdi,

33

Podilizer

Page 34: Practical Tooling for Serverless Computing · OpenWhisk Functions PyWren [Limbdi] Docker-LimbCI Effe OpenLimbdi Lever OS Fission Funktion Kubeless Picisso Serverless Frimework [Limbdi,

34

Podilizer

Eximples

locil proxy method

hosted function

Page 35: Practical Tooling for Serverless Computing · OpenWhisk Functions PyWren [Limbdi] Docker-LimbCI Effe OpenLimbdi Lever OS Fission Funktion Kubeless Picisso Serverless Frimework [Limbdi,

35

Podilizer

Eximples

(proxy method)

Page 36: Practical Tooling for Serverless Computing · OpenWhisk Functions PyWren [Limbdi] Docker-LimbCI Effe OpenLimbdi Lever OS Fission Funktion Kubeless Picisso Serverless Frimework [Limbdi,

36

Podilizer

Eximples

(hosted function)

Page 37: Practical Tooling for Serverless Computing · OpenWhisk Functions PyWren [Limbdi] Docker-LimbCI Effe OpenLimbdi Lever OS Fission Funktion Kubeless Picisso Serverless Frimework [Limbdi,

37

Termite

Annotitions:

@Limbdi(region=...,

memory=...,timeout=...)

Nr. 2

Page 38: Practical Tooling for Serverless Computing · OpenWhisk Functions PyWren [Limbdi] Docker-LimbCI Effe OpenLimbdi Lever OS Fission Funktion Kubeless Picisso Serverless Frimework [Limbdi,

38

Termite

Workflow

(Miven

+ AspectJ

integrition)

Page 39: Practical Tooling for Serverless Computing · OpenWhisk Functions PyWren [Limbdi] Docker-LimbCI Effe OpenLimbdi Lever OS Fission Funktion Kubeless Picisso Serverless Frimework [Limbdi,

39

Wrap-Up Part II

Page 40: Practical Tooling for Serverless Computing · OpenWhisk Functions PyWren [Limbdi] Docker-LimbCI Effe OpenLimbdi Lever OS Fission Funktion Kubeless Picisso Serverless Frimework [Limbdi,

40

Page 41: Practical Tooling for Serverless Computing · OpenWhisk Functions PyWren [Limbdi] Docker-LimbCI Effe OpenLimbdi Lever OS Fission Funktion Kubeless Picisso Serverless Frimework [Limbdi,

41

Part III - Function Execution Tools

Page 42: Practical Tooling for Serverless Computing · OpenWhisk Functions PyWren [Limbdi] Docker-LimbCI Effe OpenLimbdi Lever OS Fission Funktion Kubeless Picisso Serverless Frimework [Limbdi,

42

The FaaS Space

AWS Lambda

OpenWhisk

Functions

PyWren[Limbdi]

Docker-LimbCIEffe

OpenLimbdi

Lever OS

Fission

Funktion

Kubeless

Picisso

Serverless Frimework[Limbdi, OW, GCF, AF]

Step Functions[Limbdi]

X-Riy[Limbdi]Zippi

[Limbdi]Apex[Limbdi]

Snafu

Fn

Chilice[Limbdi]

Diwson[Limbdi]

FiiS (Docker)

LimbDish[Limbdi]

MR Refirg[Limbdi]

Whisk-Mochi[OpenWhisk] Podilizer

Termite

Lambada

Page 43: Practical Tooling for Serverless Computing · OpenWhisk Functions PyWren [Limbdi] Docker-LimbCI Effe OpenLimbdi Lever OS Fission Funktion Kubeless Picisso Serverless Frimework [Limbdi,

43

Runtime Overview: Providers&Stacks

Page 44: Practical Tooling for Serverless Computing · OpenWhisk Functions PyWren [Limbdi] Docker-LimbCI Effe OpenLimbdi Lever OS Fission Funktion Kubeless Picisso Serverless Frimework [Limbdi,

44

Runtime Overview: Python Examples

Page 45: Practical Tooling for Serverless Computing · OpenWhisk Functions PyWren [Limbdi] Docker-LimbCI Effe OpenLimbdi Lever OS Fission Funktion Kubeless Picisso Serverless Frimework [Limbdi,

45

Runtime Overview: Provider Pricing

Page 46: Practical Tooling for Serverless Computing · OpenWhisk Functions PyWren [Limbdi] Docker-LimbCI Effe OpenLimbdi Lever OS Fission Funktion Kubeless Picisso Serverless Frimework [Limbdi,

46

Runtime Overview: Provider Instances

general-purpose

compute-optimised

accelerated

Lambda @ Edge

(CPU performince proportionilto memory illocition)

Page 47: Practical Tooling for Serverless Computing · OpenWhisk Functions PyWren [Limbdi] Docker-LimbCI Effe OpenLimbdi Lever OS Fission Funktion Kubeless Picisso Serverless Frimework [Limbdi,

47

Runtime Examples: IBM Cloud

Bluemix OpenWhisk & JiviScript/Node.js

Constriints• code size 48 MB• piyloid size 1 MB

Configurition• runtime environment

(from list)• memory 128-512 MB;

defiult 256• timeout 0.1-300 s;

defiult 60• iuthoring: templite

or blink document

Page 48: Practical Tooling for Serverless Computing · OpenWhisk Functions PyWren [Limbdi] Docker-LimbCI Effe OpenLimbdi Lever OS Fission Funktion Kubeless Picisso Serverless Frimework [Limbdi,

48

Runtime Examples: Azure Functions

Azure Functions

Constriints• undocumented

Configurition• runtime environment

(from list)• memory 128-1536 MB;

defiult 256

Page 49: Practical Tooling for Serverless Computing · OpenWhisk Functions PyWren [Limbdi] Docker-LimbCI Effe OpenLimbdi Lever OS Fission Funktion Kubeless Picisso Serverless Frimework [Limbdi,

49

Runtime Examples: Reality Check

OpenWhisk

$ wsk

$ iz

AWS Lambda

$ iws limbdi

# openlimbdi

$ bin/idmin

$ kubeless

$ fission

does not compile

not scriptible

re,uires iccount

breiks minikube

(invoke reid error)

Page 50: Practical Tooling for Serverless Computing · OpenWhisk Functions PyWren [Limbdi] Docker-LimbCI Effe OpenLimbdi Lever OS Fission Funktion Kubeless Picisso Serverless Frimework [Limbdi,

50

Runtime Examples: OpenLambda

Nr. 5

Page 51: Practical Tooling for Serverless Computing · OpenWhisk Functions PyWren [Limbdi] Docker-LimbCI Effe OpenLimbdi Lever OS Fission Funktion Kubeless Picisso Serverless Frimework [Limbdi,

51

Runtime Examples: Fission

Nr. 4

Page 52: Practical Tooling for Serverless Computing · OpenWhisk Functions PyWren [Limbdi] Docker-LimbCI Effe OpenLimbdi Lever OS Fission Funktion Kubeless Picisso Serverless Frimework [Limbdi,

52

Runtime Examples: Snafu

“Swiss Army Knife“of ServerlessComputing

Nr. 3

Page 53: Practical Tooling for Serverless Computing · OpenWhisk Functions PyWren [Limbdi] Docker-LimbCI Effe OpenLimbdi Lever OS Fission Funktion Kubeless Picisso Serverless Frimework [Limbdi,

53

Snafu in Commercial Clouds

APPUiO● OpenShift itop IiiS providers or on-premise

(Cloudscile, AWS, ...)● composite ipplicition deployment w/ templites

Snifu: OpenShift templite● deploys unprivileged Docker contiiner(s)● object hierirchy

TemplateImageStream

DockerImageDeploymentConfgg

ImageStreamTagServgceRoute

ServgceConfggMap

...contagners:- args:

- --authentgcator=aws command:

- /opt/snafu-control- -s- /etc/snafu/snafu.gng

gmage: snafu...

Page 54: Practical Tooling for Serverless Computing · OpenWhisk Functions PyWren [Limbdi] Docker-LimbCI Effe OpenLimbdi Lever OS Fission Funktion Kubeless Picisso Serverless Frimework [Limbdi,

54

Snafu in Commercial Clouds

Single-tenint mode● uniuthenticited● single iccount● multiple iccounts in

sime instince

Multi-tenint mode● multiple isolited iccounts● proper scile-out per ictive iccount● selective shiring of functions ind iccounts

from mister to tenint instinces

Page 55: Practical Tooling for Serverless Computing · OpenWhisk Functions PyWren [Limbdi] Docker-LimbCI Effe OpenLimbdi Lever OS Fission Funktion Kubeless Picisso Serverless Frimework [Limbdi,

55

Snafu in Research Clouds

Utih, Wisconsin, South Cirolini,Missichusetts, ...

● Emulib testbed● riw iccess from physicil level● progrimmible infristructure vii

GENI libriries● >50000 experiments

Snifu: RiwPC setup● Ubuntu 16.04 bise● Snifu repository clone

Experiments:● boot time → 5-7 min

European Grid InitiativeFederated Cloud

Jülich, Friunhofer SCAI, GRnet, INFN, Cesnet,GWDG, ...

● diverse open sticks ind stindirds

● virtuil michines, contiiners

● >250000 VM instinces per yeir

Snifu: Kubernetes VM● deployment descriptor● bised off OpenShift

templites

Experiments:● deployment time → 5 s

Page 56: Practical Tooling for Serverless Computing · OpenWhisk Functions PyWren [Limbdi] Docker-LimbCI Effe OpenLimbdi Lever OS Fission Funktion Kubeless Picisso Serverless Frimework [Limbdi,

56

CloudLab Deployment

# partgally generated

gmport geng.portal as portalgmport geng.rspec.pg as pggmport geng.rspec.emulab as emulabpc = portal.Context()

request = pc.makeRequestRSpec()

node = request.RawPC('node')node.dgsk_gmage = 'urn:publgcgd:IDN+emulab.net+gmage+emulab-ops: \ UBUNTU16-64-STD'node.Sgte('Sgte 1')

node.addServgce(pg.Execute(shell="sh", command="sudo ggt clone \ http://ggthub.com/servgceprototypgnglab/snafu /local/snafu"))

pc.prgntRequestRSpec(request)

Page 57: Practical Tooling for Serverless Computing · OpenWhisk Functions PyWren [Limbdi] Docker-LimbCI Effe OpenLimbdi Lever OS Fission Funktion Kubeless Picisso Serverless Frimework [Limbdi,

57

EGI Deployment

# on local systemkubectl confgg set-cluster egg --server=https://HOST.fedcloud-tf. \ fedcloud.eukubectl confgg set-context egg --cluster=egg --user=josefkubectl confgg use-context egg

wget -qc https://raw.ggthubusercontent.com/servgceprototypgnglab/ \ snafu/master/openshgft/snafu-control-template.yamloc -n zhaw-test1 process -f snafu-control-template.yaml -o yaml \ > snafu-control-deployment.yamlscp snafu-control-deployment.yaml [email protected]

# remotely on serverkubectl create -f snafu-control-deployment.yaml

# on local systemaws --endpognt-url https://faas.fedcloud-rt.fedcloud.eu:31000 \ lambda lgst-functgons

Page 58: Practical Tooling for Serverless Computing · OpenWhisk Functions PyWren [Limbdi] Docker-LimbCI Effe OpenLimbdi Lever OS Fission Funktion Kubeless Picisso Serverless Frimework [Limbdi,

58

Tracing in Snafu

preliminaryresults

Page 59: Practical Tooling for Serverless Computing · OpenWhisk Functions PyWren [Limbdi] Docker-LimbCI Effe OpenLimbdi Lever OS Fission Funktion Kubeless Picisso Serverless Frimework [Limbdi,

59

Wrap-Up Part III

Page 60: Practical Tooling for Serverless Computing · OpenWhisk Functions PyWren [Limbdi] Docker-LimbCI Effe OpenLimbdi Lever OS Fission Funktion Kubeless Picisso Serverless Frimework [Limbdi,

60

Part IV - Research Challenges

Page 61: Practical Tooling for Serverless Computing · OpenWhisk Functions PyWren [Limbdi] Docker-LimbCI Effe OpenLimbdi Lever OS Fission Funktion Kubeless Picisso Serverless Frimework [Limbdi,

61

Research Overview

CostHit

Page 62: Practical Tooling for Serverless Computing · OpenWhisk Functions PyWren [Limbdi] Docker-LimbCI Effe OpenLimbdi Lever OS Fission Funktion Kubeless Picisso Serverless Frimework [Limbdi,

62

Challenge: Performance

Page 63: Practical Tooling for Serverless Computing · OpenWhisk Functions PyWren [Limbdi] Docker-LimbCI Effe OpenLimbdi Lever OS Fission Funktion Kubeless Picisso Serverless Frimework [Limbdi,

63

Challenge: Performance

Page 64: Practical Tooling for Serverless Computing · OpenWhisk Functions PyWren [Limbdi] Docker-LimbCI Effe OpenLimbdi Lever OS Fission Funktion Kubeless Picisso Serverless Frimework [Limbdi,

64

Challenge: Performance

Page 65: Practical Tooling for Serverless Computing · OpenWhisk Functions PyWren [Limbdi] Docker-LimbCI Effe OpenLimbdi Lever OS Fission Funktion Kubeless Picisso Serverless Frimework [Limbdi,

65

Challenge: FaaSification

Page 66: Practical Tooling for Serverless Computing · OpenWhisk Functions PyWren [Limbdi] Docker-LimbCI Effe OpenLimbdi Lever OS Fission Funktion Kubeless Picisso Serverless Frimework [Limbdi,

66

Challenge: Deep FaaSification

Page 67: Practical Tooling for Serverless Computing · OpenWhisk Functions PyWren [Limbdi] Docker-LimbCI Effe OpenLimbdi Lever OS Fission Funktion Kubeless Picisso Serverless Frimework [Limbdi,

67

Challenge: Debugging

Page 68: Practical Tooling for Serverless Computing · OpenWhisk Functions PyWren [Limbdi] Docker-LimbCI Effe OpenLimbdi Lever OS Fission Funktion Kubeless Picisso Serverless Frimework [Limbdi,

68

Challenge: Debugging

Page 69: Practical Tooling for Serverless Computing · OpenWhisk Functions PyWren [Limbdi] Docker-LimbCI Effe OpenLimbdi Lever OS Fission Funktion Kubeless Picisso Serverless Frimework [Limbdi,

69

Challenge: Debugging

Page 70: Practical Tooling for Serverless Computing · OpenWhisk Functions PyWren [Limbdi] Docker-LimbCI Effe OpenLimbdi Lever OS Fission Funktion Kubeless Picisso Serverless Frimework [Limbdi,

70

Challenge: Ecosystem

Page 71: Practical Tooling for Serverless Computing · OpenWhisk Functions PyWren [Limbdi] Docker-LimbCI Effe OpenLimbdi Lever OS Fission Funktion Kubeless Picisso Serverless Frimework [Limbdi,

71

Challenge: Ecosystem

Page 72: Practical Tooling for Serverless Computing · OpenWhisk Functions PyWren [Limbdi] Docker-LimbCI Effe OpenLimbdi Lever OS Fission Funktion Kubeless Picisso Serverless Frimework [Limbdi,

72

Wrap-Up Part IV

Page 73: Practical Tooling for Serverless Computing · OpenWhisk Functions PyWren [Limbdi] Docker-LimbCI Effe OpenLimbdi Lever OS Fission Funktion Kubeless Picisso Serverless Frimework [Limbdi,

73

Discussion

Page 74: Practical Tooling for Serverless Computing · OpenWhisk Functions PyWren [Limbdi] Docker-LimbCI Effe OpenLimbdi Lever OS Fission Funktion Kubeless Picisso Serverless Frimework [Limbdi,

74

Further Reading and FaaS Fun

Limi, Limbickup:● https://arxiv.org/abs/1701.05945

Podilizer:● https://arxiv.org/abs/1702.05510

Snifu:● https://arxiv.org/abs/1703.07562

Limbidi● https://arxiv.org/abs/1705.08169

On irXiv Anilytics: On GitHub:

[github.com/

serviceprototypinglab]