Upgrade to Pro — share decks privately, control downloads, hide ads and more …

gids2019-serverless-architectures-and-patterns-in-action.pdf

 gids2019-serverless-architectures-and-patterns-in-action.pdf

Abhishek Gupta

April 25, 2019
Tweet

More Decks by Abhishek Gupta

Other Decks in Technology

Transcript

  1. 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
  2. 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
  3. 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.
  4. Copyright © 2019, Oracle and/or its affiliates. All rights reserved.

    | For slides and code… https://github.com/abhirockzz/gids2019
  5. 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
  6. Copyright © 2019, Oracle and/or its affiliates. All rights reserved.

    | FaaS-inating options Oracle Functions Open source Cloud offerings and lots more….
  7. 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
  8. Copyright © 2019, Oracle and/or its affiliates. All rights reserved.

    | 12 CLI https://github.com/fnproject/cli/releases
  9. 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)
  10. 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 <functions-ctx-name> 4. fn create app <additional info> oracodemo 5. fn –v deploy --app oracodemo --local 6. fn invoke oracodemo hellofunc Local development Oracle Functions (Cloud)
  11. 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
  12. Copyright © 2019, Oracle and/or its affiliates. All rights reserved.

    | APIs (data services) API Gateway Mobile Web Oracle Functions Legacy system Other backend(s)
  13. 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
  14. 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
  15. 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
  16. 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
  17. 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
  18. Copyright © 2019, Oracle and/or its affiliates. All rights reserved.

    | https://blog.csanchez.org/2019/02/19/serverless-jenkins-pipelines-with-project-fn/
  19. 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
  20. 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
  21. 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.
  22. 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