Wie passen Serverless & Autonomous zusammen?

Volker Linz Senior Solution Engineer Oracle Deutschland B.V. & Co. KG November 2019

1 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 .

2 © 2019 Oracle Corporation Agenda

Einführung von Serverless & Autonomous Anwendungsszenarien / Einsatzgebiete Lösungen mit Oracle Functions & Autonomous DB entwickeln Show Cases Zusammenfassung

3 Einführung in Serverless & Autonomous

4 Software Development treibt Business Agilität voran

Development Process Application Deployment Application Architecture Packaging Infrastructure

Waterfall Monolithic Physical Server Datacenter

07

- 2000

Agile N-Tier Virtual Server Hosted

15

- 2008

Plan

Monitor Code Microservices Containers Cloud

Operate DevOps Build

2016+ Deploy Test

Release

5 Evolution der Compute Virtualization

Functions

Abstractions Containers

Virtual machines

Bare Metal

Decreasing concern (and control) over infrastructure implementation

6 Functions-as-a-service (FaaS)

Functions

Abstractions Containers

Virtual machines

Bare Metal

Decreasing concern (and control) over infrastructure implementation

7 Functions-as-a-service (FaaS)

Bare Metal Virtual machines Containers Functions

Code Code Code Code App Container App Container App Container Language Runtime Language Runtime Operating System Operating System Hardware

8 Serverless is an abstraction of infrastructure and its operations including provisioning, scaling, patching, etc.

FaaS (Functions-as-a-Service) is the compute component in a serverless platform

9 ROI bei Adoption von Serverless (Nutzen)

47% 10X 13X reduction in VMs, OS licensing in cost reductions for more software releases and server costs maintaining existing apps

✓ increase in ✓ reduction in CAPEX ✓ reduction in OPEX developer productivity

Source: Introduction to Docker, Docker, Inc.

10 Was ist Autonomous (autonom)?

RPA (Robotic 10 Millionen KI hat größeres Process Automation) selbstfahrende Potential als die wird 2022 Autos bis 2020 Dampfmaschine Mainstream - Forbes (2017) – McKinsey (2019) - Gartner (2019)

11 Ist serverless = autonomous?

Serverless ist die Abstraktion der Infrastruktur und des Betriebs, das Provisionierung, Skalierung, Wartung u.a. inkludiert Der Betrieb der Infrastruktur ist automatisiert & wird vom Provider bereitgestellt.

Autonomous Services = autonome Dienste kennzeichnen sich durch den hohen Automatisierungsgrad aus, der Nutzer braucht sich nicht um Betrieb & Wartung des Services kümmern, z.B.: AWS Lambda, Azure und Oracle Functions, Oracle Autonomous Database Services

12 Anwendungsszenarien / Einsatzgebiete

13 Allgemeine Anwendungsfälle – “Führe Code als Antwort auf Events aus”

Glue Cloud Web, Mobile, IoT Real-time File, DevOps, Batch Services, Event- Backends Stream Processing driven Processing

14 Cloud Infrastructure Event-Driven Architekturen

ORACLE CLOUD

Network DB / DW DB / DW

Audit Events Functions

Trigger Storage functions Compute Storage Functions can use DB, Storage, and other services

15 Functions als Klebstoff für Cloud Services

Cloud Applications (SaaS) Cloud Platform (PaaS)

ERP HCM Supply Chain Mobile Data Mgmt Custom Apps

Functions

Business Data Analytics CX Integration Insight Collaboration

Cloud Infrastructure (IaaS) Network Compute Storage Audit Events

16 Bedarf an Persistenz im Serverless Umfeld

Persistence allows containers to “remember” - Mechanisms for persistence: API call Functions with Persistence Autonomous Database Benefits • Fully managed, self tuned database • Complete infrastructure automation Oracle Function • Consolidation and standardization: multi modal polyglot • Security: automated patching/updating • Interoperable with any development, data integration, analysis and reporting tool • Multitenant, pluggable architecture Object Block File Autonomous Database Storage Storage Storage Block, File Storage Benefits • Durable Oracle Cloud Infrastructure Oracle Cloud Infrastructure storage, external to Functions • Enable scalable and resilient architecture • Dynamic provisioning

17 Lösungen mit Oracle Functions & Autonomous DB entwickeln

18 Zweck & Nutzen von Oracle Functions Pay Per Use Pay for execution, not for Oracle Functions idle time Functions-as-a- Service Oracle Cloud Autonomous Integrated Platform auto-scales Container Native functions No servers to provision, Open Source Engine manage Multi-tenant No Lock-in Secure Built on open-source Project and Docker

19 Fn Project im Überblick

✅ Open Source—no vendor lock-in ✅ Platform Independent—laptop, server, cloud ✅ Approachable—easy for new users, low level controls for advanced users ✅ Docker Based—leverage Docker ecosystem ✅ Scheduler Independent—deploy to Kubernetes, Swarm, Mesos, etc.

http://fnproject.io or https://github.com/fnproject

20 Was ist eine Fn Function?

• Small chunk of code wrapped into a container image with all dependencies • Fn server passes in function input and environment • Fn server returns results to caller • STDERR automatically routed to logs • Various development kits to develop a function availlable • Simple Fn Debugging by sending messages to syslog log server & using OpenTracing metrics

The Fn server handles everything else, like the API gateway, piping things around, storing logs, etc. 21 Fn Plattform Architektur

22 Fn Function Request Flow

23 Fn CLI fn init --runtime go fn create app myapp fn deploy --app myapp fn invoke myapp myfunc

→ http://localhost:8080/t/myapp/myfunc 24 Fn Function deployen

1.Builds container (multi-stage) + bumps version 2.Pushes container to registry 3.Creates/updates function & triggers (fn servers lazy load images) 1 2 3

Your code Fn Service

myfunc →

/t/myapp/myfunc:0. MyFunc:0.0. MyFunc:0.0.2 MyFunc:0.0.2 0.2 2

25 Oracle Functions – High Level Architektur

Oracle Functions

26 Oracle Functions – High Level Architektur

Oracle Functions

27 Oracle Functions – High Level Architektur

Invocation

Oracle Functions

28 Oracle Functions – High Level Architektur

Invocation

Oracle Functions

29 Oracle Functions – High Level Architektur

Invocation

Oracle Functions Tenant Resources

30 Oracle Functions – High Level Architektur

OCI Registry Invocation

Oracle Functions Tenant Resources OCI Services

31 Oracle Functions – High Level Architektur

OCI Registry Invocation

Function FunctionFunction

Oracle Functions Tenant Resources OCI Services

32 Oracle Functions – High Level Architektur Internet

Service A OCI Registry Invocation Service B

Service

FunctionFunction Function DBaaS

Oracle Functions Tenant Resources OCI Services

33 Oracle Functions – High Level Architektur

Service A OCI Registry Invocation Service B Monitoring Service C Object Events storage Logging

Key Function Function Mgmt Function DBaaS

Oracle Functions Tenant Resources OCI Services

34 How to deploy functions to Oracle Functions

35 http://bit.ly/FunctionsQuick Part B: Set up your client – 1/3

Create Signing Key-Pairs openssl genrsa -out ~/.keys/.pem -aes128 2048 openssl rsa -pubout -in ~/.keys/.pem -out ~/.oci/.pem Add public key in OCI console (User -> User settings -> API Keys -> Add Public Key ) Create & configure OCI profile on your client [fn-user-profile] user= fingerprint= key_file=/home/oracle/.keys/.pem tenancy= region=eu-frankfurt-1 pass_phrase=

36 Confidential – Oracle Internal/Restricted/Highly Restricted Part B: Set up your client – 2/3

Install Docker & verify installation docker version docker run hello-world Install Fn CLI & validate installation curl -LSs https://raw.githubusercontent.com/fnproject/cli/master/install | sh fn version Configure Fn CLI Context to connect to Oracle Functions Service fn create context fn-services --provider oracle fn use context fn-services fn update context oracle.compartment-id fn update context api-url https://functions.eu-frankfurt-1.oraclecloud.com fn update context registry fra.ocir.io// fn update context oracle.profile fn-user-profile

37 Confidential – Oracle Internal/Restricted/Highly Restricted Part B: Set up your client – 3/3

Generate auth Token in OCI console (User -> User Settings -> Auth Tokens -> Generate Token and save it locally, example output xl;>Lr]sZ}GB{-SC+380 Log in to registry docker login fra.ocir.io username: volkerlinzdemo/oracleidentitycloudservice/[email protected] password: , for example xl;>Lr]sZ}GB{-SC+380

38 Confidential – Oracle Internal/Restricted/Highly Restricted Part C: Create & Deploy first function to Oracle Functions

Create function fn init --runtime helloworld-func Create app (logical group of functions) fn create app Hello-Fn-App -annotation oracle.com/oci/subnetIds=‚ [""]' Change directory & deploy function cd helloworld-func fn deploy --app Hello-Fn-App Test function fn invoke Hello-Fn-App helloworld-func

39 Confidential – Oracle Internal/Restricted/Highly Restricted Autonomous Database

Eine Oracle Datenbank mit allen Optionen, auf Exadata, vorkonfiguriert und automatisiert

ORACLE CLOUD

Automatated Data ORACLE Exadata Database Automation AUTONOMOUS Infrastructure Center Operations DATABASE Automation

40 Oracle DB unterstützt Polyglot Persistence

Polyglot (single-model) Multimodel ▪ Oracle supports multiple data ▪ supports multiple models stores Oracle Database Relational - Spatial Graph Spatial Oracle NoSQL Database XML - Graph Hadoop JSON - OLAP JSON XML Text - Sharding ▪ Oracle integrates polyglot ▪ Oracle Database provides integrated access to environments Text Relational all database objects Big Data SQL

41 Oracle Multimodel DB unterstützt wichtige Dev Env. & API’s – 1/2

LANGUAGE DRIVER Oracle provided Drivers C OCI, ODPI-C Open Source Drivers (Oracle contributions) C++ OCCI Open Source Drivers Java JDBC (Third-party maintainers) .NET ODP.NET Node.js node-oracledb Python cx_Oracle PHP OCI8, PDO_OCI R ROracle … and ODBC, OLE DB, Go goracle, rana, mattn Pro*C, Pro*COBOL, Rust mimir Pro*Fortran, SQLJ Ruby ruby-oci8 Perl DBD::Oracle Oracle Multimodel DB unterstützt wichtige Dev Env. & API’s – 2/2 Model Language/API Oracle provided Drivers Java, REST, SQL, Spatial ODPI-C Open Source Drivers (Oracle contributions) PGQ, SPARQL, Java, Graph Open Source Drivers REST (Third-party Analytics Python, R, JDBC maintainers) .NET ODP.NET Node.js node-oracledb Python cx_Oracle PHP OCI8, PDO_OCI R ROracle … and ODBC, OLE DB, Pro*C, Pro*COBOL, Go goracle, rana, mattn Pro*Fortran, SQLJ Rust mimir

43 Ruby ruby-oci8 Perl DBD::Oracle Eigenschaften der Autonomous Database

Self-Driving Self-Securing Self-Repairing Automates database and Protects from both external Protects from all infrastructure management, attacks and malicious downtime including planned configuring, monitoring, tuning, internal users maintenance patching Save on Human Labor Prevent Human Error No Human Intervention

44 44 What Autonomous Database Means for DBAs Removes tactical drudgery, more time to innovate Value Scale Innovation • Tasks Specific to the Business – Architecture, planning, data modeling – Data security and data lifecycle management – Application-related tuning – End-to-End service level management

• Tactical Operations – Configuration and tuning of systems, network, storage – Database provisioning, patching – Database backups, H/A, disaster recovery – Database optimization Maintenance

45 Copyright © 2019, Oracle and/or its affiliates. All rights reserved. Eine Autonomous Familie optimiert für verschiedene Workloads

Oracle Autonomous Database

Autonomous Transaction Autonomous Data Warehouse Processing

All Analytic Workloads Online TP & Mixed Workloads • Data Warehouse, Data Mart • Transactions, Batch, Reporting, • Data Lake, Machine Learning • Application Dev, ML,IoT

Wähle eine Autonomous Database Cloud Lösung, die am besten zu Deinem Workload passt

46 Autonomous Transaction Processing gibt es in zwei Deployment-Varianten

Autonomous Transaction Processing

Serverless Dedicated Exadata Cloud Infrastructure Exadata Cloud Infrastructure

Customizable Private Cloud in Public Ultra-Simple, Elastic Cloud

47 Autonomous Database Serverless

Simple Customer chooses database compute, storage, and region Oracle manages deployment, lifecycle, and software versions

Elastic Low minimum size - 1 OCPU and 1 TB of storage Low minimum time commitment - 1 hour Instantly grow or shrink online, pay for what you use

DB

48 Autonomous Database Dedicated Infrastructure

Private Reserved Infrastructure in Public Cloud • Single Tenant • Dedicated Exadata Infrastructure • Databases of any size, scale, or criticality

Highest Security: Secure Isolation Zone • Perimeter Control Computers: Impenetrable Barrier • Highest protection from other tenants • Container Databases for intra-company isolation

Customizable Operational Policies • Control of provisioning, updates, availability, density Gen 2 Oracle Cloud Security Hardware: Secure Isolation Zones

Dedicated Servers inside tenant’s isolation zone run tenant’s VMs and DBs Dedicated Servers protects from security exploits at the VM, OS, and other software levels Perimeter Control Computers (PerCon) filter all incoming network packets Perimeter Control Computers not visible on the network Immune from software and zero-day exploits

Oracle Public Cloud Perimeter Perimeter Control Control Computer Computer

Dedicated Servers Dedicated Servers

Tenant X Isolation Zone Tenant Y Isolation Zone Perimeter Control Computers:

Customer 1 Customer 2 Customer 3 Customer 4

Perimeter Perimeter Perimeter Perimeter Control Control Control Control Computer Computer Computer Computer

Border Patrol

Outside Threats can’t enter Resources Threats can’t spread

Copyright © 2019 Oracle and/or its affiliates. Gen 1 Cloud Gen 2 Cloud Shared Computers Perimeter Control Computers User Code + Cloud Control Code No User Code

Dedicated User Computer Shared Computer Intel CPU Intel CPU Users Code + Cloud Control Code User Code

Shared CPU, , Storage RAM & Flash Storage

Shared Network Port Network Port Create any Instance

Perimeter Control Computer

Non-Intel CPU Customer Customer Customer Network Network Network RAM & Flash Storage

Your Network

Shared Cloud Control Computer Vulnerabilities Separate Network of Perimeter Control Computers • Cloud Provider Can See Customer Data • Oracle Cannot See Customer Data • User Code Can Access Cloud Control Code • No User Access to Perimeter Control Computer or Code Probiere Oracle Cloud Free Tier aus! oracle.com/cloud/free “Always Free” • Services you can use for an unlimited time. + 30-day Free Trial • US$300 in free credits. • Access to a wide range of Oracle Cloud services for 30 days, including Databases, Analytics, Compute, and Container Engine for Kubernetes • Up to eight instances across all available services • Up to 5 TB of storage See the list of eligible services

53 Always Free – What’s Included

Autonomous Compute Storage Networking/ Monitoring / Database Load Balancing Notifications 100 GB Block 2 x Databases 2 x VMs 10 Mbps LB 500M Metrics Ingestion 10 GB Object 20 GB each 1 GB Memory each 10 TB Outbound 1B Metrics Retrieval 10 GB Archive Data Transfer 1M Notifications 1K Emails

Available to All New and Existing Cloud Accounts

Copyright © 2019 Oracle and/or its affiliates. Copyright © 2019 Oracle and/or its affiliates. Demo

Register Oracle Cloud account

55 56 57 58 59 60 61 Demo

Deploy Autonomous DB

62 63 64 65 66 67 68 69 70 71 72 73 74 75 Show Cases

76 Show-Case: Public Safety

77 Proxima City Demo am Oracle Stand

78 Zusammenfassung

79 Vorteile von Serverless

Economics Agility Reliability Innovation

80 Vertiefe Dein Wissen zu Serverless

Serverless Image Classification with Oracle Functions and TensorFlow Serverless and Recurrent Neural Networks with Fn, GraphPipe and TensorFlow Using GraalVM for AOT compiled Java functions in serverless Official Fn tutorials

81 Oracle Functions im Zusammenspiel mit Autonomous DB

Todd Sharps Blogartikel Serie :

Java basierende Function im Zusammenspiel mit Autonomous DB https://blogs.oracle.com/developers/oracle-functions-connecting-to-an-atp-database

NodeJS basierende Function im Zusammenspiel mit Autonomous DB https://blogs.oracle.com/developers/oracle-functions-connecting-to-atp-with-nodejs

Connecting your function to Autonmous DB by leveraging ORDS (REST Feature of Oracle DB) https://blogs.oracle.com/developers/oracle-functions-an-easier-way-to-talk-to-your- autonomous-database

82 Fragen & Antworten

Kontakt [email protected]

@sporti1703

83