Slide 1

Slide 1 text

munz & more Serverless Computing & Machine Learning March 2018 Dr. Frank Munz

Slide 2

Slide 2 text

• Founded munz & more in 2007 • > 15 years Middleware, Multi Cloud, and Distributed Computing • Consulting, Conferences and High-End Training • Wrote two WebLogic and a Cloud book Dr. Frank Munz @frankmunz

Slide 3

Slide 3 text

Agenda • Cloud • The Serverless Journey + FaaS • Machine Learning • Q&A @frankmunz

Slide 4

Slide 4 text

Clouds!

Slide 5

Slide 5 text

API @frankmunz

Slide 6

Slide 6 text

Elasticity

Slide 7

Slide 7 text

Pay Per Use • ~1 US cent/h (micro instance), with HA & geo-distribution included • You own a massively parallel, distributed and highly available supercomputer with linear costs: 1 instance for 100 hours $= 100 instances for 1h @frankmunz

Slide 8

Slide 8 text

Cloud Computing API Elasticity Pay per use Fully Programmable Data Center

Slide 9

Slide 9 text

Serverless

Slide 10

Slide 10 text

AWS Lambda

Slide 11

Slide 11 text

FaaS: AWS Lambda • AWS announced Lambda in 2014 • Lambda is Function as a Service (FaaS) • Serverless: Abstract away all notion of infrastructure – Automated elasticity – True pay per invocation • Other serverless examples: Messaging, DBs, blob storage -> Future of cloud @frankmunz

Slide 12

Slide 12 text

AWS Lambda AWS SAM Local: test and locally run Lambda event: event passed to function context: runtime context callback: optional return (or null) @frankmunz

Slide 13

Slide 13 text

Create Lambda S3 @frankmunz

Slide 14

Slide 14 text

Example: REST Request

Slide 15

Slide 15 text

Cost Savings: Case Studies Expedia(2016): – 2.3 billions calls – 200k hours / month – $ 550 a month Postlight – API GW, Lambda, Serverless – Costs dropped 2 orders of magnitude down to $ 370 https://www.youtube.com/watch?v=gT9x9LnU_rE https://trackchanges.postlight.com/serving-39-million-requests-for-370-month-or-how-we-reduced-our-hosting-costs-by-two-orders-of-edc30a9a88cd http://serverlesscalc.com/ @frankmunz

Slide 16

Slide 16 text

Frameworks

Slide 17

Slide 17 text

Serverless Frameworks @frankmunz AWS Chalice Portability Complexity Standards

Slide 18

Slide 18 text

OS FaaS Platforms

Slide 19

Slide 19 text

FaaS OS Frameworks Overlap in functionality -> expect consolidation Who will survive? • Integration: K8s, Traefik, Zipkin, Prometheus, Kafka etc. • Adoption, adoption, adoption • FaaS as PaaS implementation? https://github.com/faas-lane/ FaaS-Lane/tree/master/candidates @frankmunz

Slide 20

Slide 20 text

Fn Project • Apache 2, Open Source since Java One 2017 • Fn Server (micro API GW), LB, Flow • Function / Container duality • Docker is only dependency -> polyglot • Helm chart for Kubernetes @frankmunz

Slide 21

Slide 21 text

Fn Flow Java 8 CompletableFutures API

Slide 22

Slide 22 text

Fn Demo?

Slide 23

Slide 23 text

Machine Learning

Slide 24

Slide 24 text

Stanford Course: Andrew Ng

Slide 25

Slide 25 text

ML Steps 1. Gather / prepare data 2. Choose ML model 3. Training (80% data) 4. Evaluation 5. Hyperparameter tuning 6. Use model for prediction

Slide 26

Slide 26 text

@frankmunz

Slide 27

Slide 27 text

No content

Slide 28

Slide 28 text

Export ML Model • Host on-premises / cloud as FaaS • Formats: – As POJO (H2O) – Predictive Model Markup Language (PMML), e.g. pmml package in R – Exported model + Model server (TensorFlow) @frankmunz

Slide 29

Slide 29 text

No content

Slide 30

Slide 30 text

Recommendation Engine Mock Demo? https://github.com/fmunz/fn-recommend

Slide 31

Slide 31 text

Demo: FaaS Bot?

Slide 32

Slide 32 text

Conclusion

Slide 33

Slide 33 text

Serverless + Machine Learning • Learn about Severless and FaaS • Start ML with top down approach – Zeppelin / Jupyter notebooks – Keep maths for later • Consider hosting your prediction model as FaaS @frankmunz

Slide 34

Slide 34 text

Serverless + Machine Learning • Fn Project gives you func + container • A future Fn cloud service should give you ... – True pay per use / never pay for idle – Automated scaling – Integration with other Oracle Cloud services – Standards based • Check Oracle‘s new capabilities with ML and notebooks • Soon? serverless training and prediction of ML models @frankmunz

Slide 35

Slide 35 text

No content

Slide 36

Slide 36 text

munzandmore.com/blog @frankmunz munzandmore.com/youtube

Slide 37

Slide 37 text

Q&A Discussion