Slide 1

Slide 1 text

Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | GIDS.2019 Serverless Architectures and Patterns in Action Abhishek Gupta Principal Product Manager Oracle Cloud Infrastructure – Serverless @abhi_tweeter April 25, 2019

Slide 2

Slide 2 text

Copyright © 2019, Oracle and/or its affiliates. All rights reserved. | Agenda Intro to Serverless Open source Fn Project and Oracle Functions “in action…” – use cases & demos QnA 1 2 3 2 4

Slide 3

Slide 3 text

Copyright © 2019, Oracle and/or its affiliates. All rights reserved. | Safe Harbor Statement The following is intended to outline our general product direction. It is intended for information purposes only, and may not be incorporated into any contract. It is not a commitment to deliver any material, code, or functionality, and should not be relied upon in making purchasing decisions. The development, release, timing, and pricing of any features or functionality described for Oracle’s products may change and remains at the sole discretion of Oracle Corporation.

Slide 4

Slide 4 text

Copyright © 2019, Oracle and/or its affiliates. All rights reserved. | For slides and code… https://github.com/abhirockzz/gids2019

Slide 5

Slide 5 text

Copyright © 2019, Oracle and/or its affiliates. All rights reserved. | Hello Serverless

Slide 6

Slide 6 text

Copyright © 2019, Oracle and/or its affiliates. All rights reserved. |

Slide 7

Slide 7 text

Copyright © 2019, Oracle and/or its affiliates. All rights reserved. | Serverless characteristics There are servers, but don’t worry about them (provisioning, patching etc.) Scale (in and out) automatically Cost effective – pay only for use

Slide 8

Slide 8 text

Copyright © 2019, Oracle and/or its affiliates. All rights reserved. | FaaS-inating options Oracle Functions Open source Cloud offerings and lots more….

Slide 9

Slide 9 text

Copyright © 2019, Oracle and/or its affiliates. All rights reserved. | • Open Source—no vendor lock-in • Docker Based—leverage Docker ecosystem • Platform Independent—laptop, server, cloud • Scheduler Independent—deploy to Kubernetes, Swarm, Mesos, etc. • Approachable—easy for new users, low level controls for advanced users www.fnproject.io Oracle Functions Currently in Limited Availability

Slide 10

Slide 10 text

Copyright © 2019, Oracle and/or its affiliates. All rights reserved. | Basic Concepts

Slide 11

Slide 11 text

Copyright © 2019, Oracle and/or its affiliates. All rights reserved. | A Function

Slide 12

Slide 12 text

Copyright © 2019, Oracle and/or its affiliates. All rights reserved. | 12 CLI https://github.com/fnproject/cli/releases

Slide 13

Slide 13 text

Copyright © 2019, Oracle and/or its affiliates. All rights reserved. | Deploy and Invoke - function - func.yaml - Dockerfile fn deploy fn invoke Pull image, run container Docker registry Server (fn or Oracle Functions)

Slide 14

Slide 14 text

Copyright © 2019, Oracle and/or its affiliates. All rights reserved. | Developer experience 1. fn start 2. fn init --runtime go --name hellofunc 3. fn use context default 4. fn create app oracodemo 5. fn –v deploy --app oracodemo --local 6. fn invoke oracodemo hellofunc 1. fn start 2. fn init --runtime go --name hellofunc 3. fn use context 4. fn create app oracodemo 5. fn –v deploy --app oracodemo --local 6. fn invoke oracodemo hellofunc Local development Oracle Functions (Cloud)

Slide 15

Slide 15 text

Copyright © 2019, Oracle and/or its affiliates. All rights reserved. | Use Cases & Patterns

Slide 16

Slide 16 text

Copyright © 2019, Oracle and/or its affiliates. All rights reserved. | Backend systems Event-Driven systems Integration Automation • APIs • Web apps • Event driven apps • Stream Processing • Webhooks • Workflows • IaaS monitoring • Scheduled/Batch jobs

Slide 17

Slide 17 text

Copyright © 2019, Oracle and/or its affiliates. All rights reserved. | Backend systems

Slide 18

Slide 18 text

Copyright © 2019, Oracle and/or its affiliates. All rights reserved. | APIs (data services) API Gateway Mobile Web Oracle Functions Legacy system Other backend(s)

Slide 19

Slide 19 text

Copyright © 2019, Oracle and/or its affiliates. All rights reserved. | FaaS APIs + ‘friends’ = Serverless Web apps API Gateway Object Storage Front end assets (HTML, JS etc.) User

Slide 20

Slide 20 text

Copyright © 2019, Oracle and/or its affiliates. All rights reserved. | Event-Driven Systems

Slide 21

Slide 21 text

Copyright © 2019, Oracle and/or its affiliates. All rights reserved. | Asynchronous processing OCI Object Storage Object Storage events – created, deleted, updated etc. Oracle Functions Drops text file to input bucket 1 2 3 Converts to PDF and stores in output bucket Text to PDF conversion

Slide 22

Slide 22 text

Copyright © 2019, Oracle and/or its affiliates. All rights reserved. | Stream Processing • Built to handle continuous (streams of) data – Durable/persistent • Possible to replay and reprocess data (aka time travel) – Message Ordering, low latency, different guarantees • Amazon Kinesis, Apache Kafka etc. • Streaming-FaaS integration – Native – tight coupling b/w streaming and FaaS platforms • vendor specific e.g. Kinesis -> Lambda – Custom – roll your own • vendor agnostic, flexible e.g. Kafka -> FaaS • Need a server component

Slide 23

Slide 23 text

Copyright © 2019, Oracle and/or its affiliates. All rights reserved. | Kafka -> Kafka Connect -> FaaS Kafka Connect (sink connectors) Kafka Connect (source connectors) Producers Consumers Sources Oracle Functions Stream Processors

Slide 24

Slide 24 text

Copyright © 2019, Oracle and/or its affiliates. All rights reserved. | Integration

Slide 25

Slide 25 text

Copyright © 2019, Oracle and/or its affiliates. All rights reserved. | Webhooks • Wikipedia – “user-defined HTTP callbacks” – “usually triggered by some event” • Event driven on steroids – trigger functions using (almost) any event source • Easily integrate with third party systems like GitHub, Slack, Twilio etc. Slack service (with configured webhook) Random API Slack workspace (user) 1 2 3 4 funcy – trimmed down version of the Giphy Slack app

Slide 26

Slide 26 text

Copyright © 2019, Oracle and/or its affiliates. All rights reserved. | https://blog.csanchez.org/2019/02/19/serverless-jenkins-pipelines-with-project-fn/

Slide 27

Slide 27 text

Copyright © 2019, Oracle and/or its affiliates. All rights reserved. | Function Orchestration • Problem(s) – How do I integrate functions to build complex apps ? – Orchestrate their behavior – Manage intermediate state • Options - AWS Step Functions, Azure Durable Functions, Fn Flow etc. • Fn Flow – Build long-running functions with rich sets of language- specific primitives including fork-join, chaining, delays and error handling – Supports complex parallel processes that are readable and testable (including unit tests) with standard programming tools 27 Fn Flow Java User Guide

Slide 28

Slide 28 text

Copyright © 2019, Oracle and/or its affiliates. All rights reserved. | Automation

Slide 29

Slide 29 text

Copyright © 2019, Oracle and/or its affiliates. All rights reserved. | Infra monitoring IaaS Create, start, stop, terminate etc. Events…. Oracle Functions Monitoring Oracle DB lifecycle events OCI Email Delivery Service

Slide 30

Slide 30 text

Copyright © 2019, Oracle and/or its affiliates. All rights reserved. | Scheduled Jobs • Configure and forget! • Good for automating repetitive tasks – Reminders, alerts (email, SMS etc.) – Backups, import/export – etc.

Slide 31

Slide 31 text

Copyright © 2019, Oracle and/or its affiliates. All rights reserved. | Links • Slack - https://fnproject.slack.com/ • Blog - https://medium.com/fnproject • Twitter - https://twitter.com/fnproject • GitHub – Fn – https://github.com/fnproject/fn – FDKs - https://github.com/fnproject/?&q=fdk – Fn Flow - https://github.com/fnproject/flow • Oracle Functions - https://blogs.oracle.com/cloud-infrastructure/announcing-oracle- functions • GitHub repo for this talk - https://github.com/abhirockzz/gids2019

Slide 32

Slide 32 text

Copyright © 2019, Oracle and/or its affiliates. All rights reserved. | Thank you !

Slide 33

Slide 33 text

No content