SlideShare a Scribd company logo
ive cloudnative.oracle.com
Serverless Patterns
Jesse Butler Cloud Developer Advocate, Oracle Cloud Infrastructure @jlb13
Design and Use Patterns in Serverless
Copyright © 2019, Oracle and/or its affiliates. All rights reserved. @jlb13
Level Set
• Roles in the room?
• Serverless users?
• In production?
• Lambda? Azure? Something Else?
2
Copyright © 2019, Oracle and/or its affiliates. All rights reserved. @jlb13
Monolithic Applications
Users
Application
Database
Copyright © 2019, Oracle and/or its affiliates. All rights reserved. @jlb13
Monolithic Applications
Users
Application
Database
Copyright © 2019, Oracle and/or its affiliates. All rights reserved. 5
Abstractions
Decreasing concern (and control) over infrastructure implementation
Virtual machines
Containers
Bare Metal
Virtualization and Consolidation
@jlb13
To the Cloud
Copyright © 2019, Oracle and/or its affiliates. All rights reserved. @jlb13
Microservices
Load
balancer
Service Service
Database
Service
Queue
Deploying Code to Systems We Build in the Cloud with Containers and Kubernetes
Copyright © 2019, Oracle and/or its affiliates. All rights reserved. @jlb13
Serverless
Load
balancer
Service Service
Database
Service
Queue
Deploying Code to Systems We Build in the Cloud with Containers and Kubernetes
Copyright © 2019, Oracle and/or its affiliates. All rights reserved. 8
Abstractions
Infrastructure implementation and maintenance responsibility
Virtual machines
Functions
Containers
Bare Metal
Trend towards Serverless
@jlb13
To the Cloud
Copyright © 2019, Oracle and/or its affiliates. All rights reserved. 9
Serverless is a Spectrum
@jlb13
Container
Orchestration
Kubernetes
Nomad
Docker Swarm
Ideally managed, but
still infrastructure
you care about
Managed Serverless
AWS Lambda
Azure Functions
Google Functions
Oracle Functions
Fully managed
platform for hosting
and executing code
Container Services
ECS, Fargate
Azure CS
GCP Cloud Run
Managed service
provision containers,
abstracts
infrastructure you
care about
DIY FaaS
OpenFaaS
Fn Project
Leverage container
management system
under the covers,
introduce Functions
architecture
Awareness of infrastructureFully aware Invisible
Copyright © 2019, Oracle and/or its affiliates. All rights reserved. 10
Containers are the new Process Model, Right?
@jlb13
Copyright © 2019, Oracle and/or its affiliates. All rights reserved. 11
Containers are the new Process Model, Right?
@jlb13
Copyright © 2019, Oracle and/or its affiliates. All rights reserved. 12
Don’t Conflate Requirements with Complexity Aversion
@jlb13
Copyright © 2019, Oracle and/or its affiliates. All rights reserved.
What Is Serverless
• Event-driven architecture
• Invisible infrastructure
• Automatic scaling on demand
• Granular billing for execution time
• Fault tolerant and highly available
13@jlb13
Copyright © 2019, Oracle and/or its affiliates. All rights reserved. @jlb13
Serverless Deployment, the Duck Test
14
Upload
Function
Source Code
Configure
Function
Trigger
Function is
invoked
when
triggered
Pay for execution
time, not idle
time
Copyright © 2019, Oracle and/or its affiliates. All rights reserved. 15
Serverless is Not Really a Spectrum
@jlb13
Container
Orchestration
Kubernetes
Nomad
Docker Swarm
Ideally managed, but
still infrastructure
you care about
Managed Serverless
AWS Lambda
Azure Functions
Google Functions
Oracle Functions
Fully managed
platform for hosting
and executing code
Container Services
ECS, Fargate
Azure CS
GCP Cloud Run
Managed service
provision containers,
abstracts
infrastructure you
care about
DIY FaaS
OpenFaaS
Fn Project
Leverage container
management system
under the covers,
introduce Functions
architecture
Awareness of infrastructureFully aware Invisible
Copyright © 2019, Oracle and/or its affiliates. All rights reserved. 16
What Is Serverless, Distilled
@jlb13
Copyright © 2019, Oracle and/or its affiliates. All rights reserved.
What Is Serverless Not
• It’s not magic, it’s a choice
• Brownfield: You need to break the
monolith apart regardless
• Greenfield: You need a solid design
• Nothing is free
17@jlb13
Copyright © 2019, Oracle and/or its affiliates. All rights reserved. @jlb13
Hype Cycle – Productive Adoption
Cloud Computing
Copyright © 2019, Oracle and/or its affiliates. All rights reserved. @jlb13
Hype Cycle – Serverless in Waves
Serverless Computing
Copyright © 2019, Oracle and/or its affiliates. All rights reserved. @jlb13
Get Through This Quickly…
Copyright © 2019, Oracle and/or its affiliates. All rights reserved. @jlb13
…And Get Here
Copyright © 2019, Oracle and/or its affiliates. All rights reserved. 22
Serverless From 30k Feet
Event Sources
Triggers
Function Execution Backend Services
Business
Intelligence
Analytics
Databases
Compute, Network, Storage
Kubernetes, Docker, and/or
Hypervisor
F(n)F(n) F(n) F(n)
@jlb13
Copyright © 2019, Oracle and/or its affiliates. All rights reserved.
Function Example
• Different projects and products
differ in use and workflow
• Just the code, configured against
any number of event triggers
• Basically follow microservices rules
of engagement
• As with microservices, applications
are composed of many functions
@jlb13
Copyright © 2019, Oracle and/or its affiliates. All rights reserved.
Events and Execution Models
• Events are driven by context
• Execution model is your choice
@jlb13
Copyright © 2019, Oracle and/or its affiliates. All rights reserved.
Events, Determined by Context
• Changes in data
• API Invocations
• Requests on endpoints
• Changes in resources
• Timers, Alarms, Direct Invocation…
@jlb13
Copyright © 2019, Oracle and/or its affiliates. All rights reserved.
Using Events
• Events are configured differently
per platform
• Inform the platform as to what
event(s) should invoke this function
• Function can consume the event
and do the things
• CNCF Serverless WG has drafted a
CloudEvents specification
@jlb13
Copyright © 2019, Oracle and/or its affiliates. All rights reserved.
Execution Models
• Synchronous
• Asynchronous
• Streaming
@jlb13
Copyright © 2019, Oracle and/or its affiliates. All rights reserved.
Error Handling by Model
• Synchronous
–Calling code handles the error
• Asynchronous
–System retries based upon timeline
• Streaming
–System retries based upon data efficacy
@jlb13
Copyright © 2019, Oracle and/or its affiliates. All rights reserved.
What Can We Build With Serverless?
• Web and Mobile Backends
• Any other backend API implementations
• Real-time Processing of Files, Streams
• Batch Processing
• Glueing up SaaS things
• Kind of anything
@jlb13
Copyright © 2019, Oracle and/or its affiliates. All rights reserved. @jlb13
Web and Mobile Backends
30
Identity
Process dataTrigger functions
Functions
Web, Mobile Apps
API Platform
Mobile
Data persisted
Database
Storage
Copyright © 2019, Oracle and/or its affiliates. All rights reserved. 31
Extend and Enhance Existing Applications
SaaS App
Analytics
Visualize data
Enrich data and
send to Analytics
service
Use data
for analytics
and insights
Inventory create / update
Another
App
Trigger
functionsSupport incident
create / update
Functions
@jlb13
Copyright © 2019, Oracle and/or its affiliates. All rights reserved. @jlb13
Real-Time Stream Processing
32
Messaging/
Streaming
Database
Perform user
sentiment analysis
Trigger functions
Functions
Data from multiple sources –
Product Reviews and Ratings,
Customer Service Interactions,
Social Media, etc.
Records saved in
database
Dashboards with user sentiment
analysis trends
Copyright © 2019, Oracle and/or its affiliates. All rights reserved. @jlb13
Real-Time File Processing
33
Storage
Database
Generate images of
different resolutions
and sizes
Trigger functions
Functions
High resolution product image
uploaded to storage
Storage
Images saved
in Storage,
metadata in
Database
Generated images displayed on
various pages and devices
Copyright © 2019, Oracle and/or its affiliates. All rights reserved. 34
Internet of Things
Check data against
thresholds. If
exceeded, raise
support incidents,
send notifications
Ingest
Trigger
functions
Functions
Devices and things
streaming sensor data
Incident created
in Service Cloud,
notification sent
to the technician
Mobile
Technician
App
Service
Cloud
Executive Dashboard
@jlb13
Copyright © 2019, Oracle and/or its affiliates. All rights reserved. @jlb13
Batch Processing
35
Database Database
Calculate
bonus points
Functions
Utility consumption
Storage
Bonus
points updated
Utility bill PDF file
Transaction
details
Scheduled
batch job
Functions
Database
Generate utility bill
PDF file
PDF files saved in
Storage
Consumption
details
Scheduled
batch job
Loyalty bonus receivedCredit card transactions
Copyright © 2019, Oracle and/or its affiliates. All rights reserved. 36
DevOps Automation
Compute
State Change or
a Timer
Storage
Other
- Check tags
- Check security roles
- Patch or update
- Modify/kill resource
- Vulnerability assess
- Check for idle
…
@jlb13
Copyright © 2019, Oracle and/or its affiliates. All rights reserved.
Big Ideas Around the Code
• Don’t own what you don’t have to
• Serverless is all about APIs
• When you do implement, simplify
• Plan ahead for observability
@jlb13
Copyright © 2019, Oracle and/or its affiliates. All rights reserved.
Choose a Pattern that Helps you Minimize
• Less is more: shoot for a single
handler per module
• If one function does more than one
discrete thing, break it up
• Better to proliferate than to
decompensate
• Observability and triage become
infinitely easier at the boundaries
@jlb13
Copyright © 2019, Oracle and/or its affiliates. All rights reserved.
Separate and Simplify
• Simplify application estate as well
• Events can and probably should
define application boundaries
• Share libraries between functions and
applications, not execution context
@jlb13
Copyright © 2019, Oracle and/or its affiliates. All rights reserved.
Code Reuse
• Not long ago, Serverless function
deployments were zip files
• Now, many Serverless platforms
expose a container image to you
• Others use layering which mimics
the container image stacking
@jlb13
Copyright © 2019, Oracle and/or its affiliates. All rights reserved.
Observability
• Metrics
– Aggregate data regarding the behavior of a
thing over time
• Tracing
– Instrumentation which provides an instance
of an action, traversing the entire stack
• Logging
– Developer breadcrumbs we leave to give
context for a certain code path
@jlb13
Copyright © 2019, Oracle and/or its affiliates. All rights reserved.
Triaging Issues
• Monolith in a VM – log into the host,
look at logs, run a debugger
• Containers in Kubernetes – Istio, Jaeger,
Prometheus, Grafana, et al
• Serverless… is complicated. Logging is
there, but that’s not very useful at scale
• OpenTracing & Jaeger is a possibility
@jlb13
Copyright © 2019, Oracle and/or its affiliates. All rights reserved.
Observability Solutions From Your Provider
@jlb13
Cloudwatch, X-ray, Stackdriver, OCI Monitoring and Logging,
Azure Insights, IBM Monitoring, and others
Copyright © 2019, Oracle and/or its affiliates. All rights reserved.
Observability Solutions From Other Experts
@jlb13
Honeycomb, IO|Pipe, DataDog, Dashbird, Thundra, Epsagon,
Splunk, Lightstep, Solo, and others (sorry if I missed yours!)
Copyright © 2019, Oracle and/or its affiliates. All rights reserved.
Use Services and SaaS When Possible
@jlb13
• DBaaS
• Identity, Auth, Forms
• Storage Services
• Email, SMS
• Maps, GPS
• Media Streaming
• Chat and Chatbots
Copyright © 2019, Oracle and/or its affiliates. All rights reserved.
Worries
• Don’t worry too much about cold starts
• Do worry about data egress and
migration
• Pay attention to the system you are
integrating with, keep it open if possible
@jlb13
Copyright © 2019, Oracle and/or its affiliates. All rights reserved.
Is Serverless Simpler?
• In a word, no
• But that doesn’t mean it’s not better
• Serverless doesn’t really mean less
complexity
• Resolving complexity is generally
directly related to your core business
@jlb13
Copyright © 2019, Oracle and/or its affiliates. All rights reserved.
Is Serverless Better?
• In a word, yes
• Less toil in deployment and maintenance
of systems is beneficial to focus
• OpEx reductions can be profound
• Tradeoff: we depend upon third parties
to address issues as they arise
@jlb13
Copyright © 2019, Oracle and/or its affiliates. All rights reserved.
Final Thoughts
• Put Serverless on your radar
– Greenfield
– Brownfield migration
• Often a POC becomes production
• Resist the urge to compare DevOps
and Serverless. Apples to Apple Pie.
• Build stuff!
@jlb13
cloud.oracle.com/trial
cloudnative.oracle.com
Thanks!
@jlb13

More Related Content

PDF
General Capabilities of GraalVM by Oleg Selajev @shelajev
PPT
Oracle 10g Application Server
PDF
Container Native Development Tools - Talk by Mickey Boxell
PDF
Running Kubernetes Workloads on Oracle Cloud Infrastructure
PDF
【旧版】Oracle Cloud Infrastructure:サービス概要のご紹介 [2020年6月版]
PDF
Oracle Cloud Infrastructure:2020年6月度サービス・アップデート
PDF
Oracle SOA Suite Everywhere
PDF
MongoDB Sharding
General Capabilities of GraalVM by Oleg Selajev @shelajev
Oracle 10g Application Server
Container Native Development Tools - Talk by Mickey Boxell
Running Kubernetes Workloads on Oracle Cloud Infrastructure
【旧版】Oracle Cloud Infrastructure:サービス概要のご紹介 [2020年6月版]
Oracle Cloud Infrastructure:2020年6月度サービス・アップデート
Oracle SOA Suite Everywhere
MongoDB Sharding

What's hot (20)

PDF
クラウドのコストを大幅削減!事例から見るクラウド間移行の効果(Oracle Cloudウェビナーシリーズ: 2020年7月8日)
PDF
Cloud Foundry Anniversary: Technical Slides
PDF
Business-critical applications on VMware vSphere 6, VMware Virtual SAN, and V...
PDF
Oracle Cloud Infrastructure:2020年5月度サービス・アップデート
PDF
Symantec NetBackup 7.6 benchmark comparison: Data protection in a large-scale...
PPTX
Exadata
PDF
Migrate VMs faster with a new Dell EMC PowerEdge MX solution
PDF
Power edge mx7000_sds_performance_1018
PDF
Ensure greater uptime and boost VMware vSAN cluster performance with the Del...
PPTX
Presentation oracle exalogic elastic cloud
PPTX
Scale Multi container Apps using Docker Swarm and Azure Container Service
PDF
【旧版】Oracle Cloud Infrastructure:サービス概要のご紹介 [2020年2月版]
PDF
Give DevOps teams self-service resource pools within your private infrastruct...
PDF
Boost your work with hardware from Intel
PDF
SQL Server 2016 database performance on the Dell EMC PowerEdge FC630 QLogic 1...
PPTX
Run Stateful Apps on Kubernetes with VMware PKS - Highlight WebLogic Server
PPTX
Cloud Foundry Diego, Lattice, Docker and more
PDF
Preserve user response time while ensuring data availability
PDF
Keep data available without affecting user response time
PDF
Upgrade to Dell EMC PowerEdge R940 servers with VMware vSphere 7.0 and gain g...
クラウドのコストを大幅削減!事例から見るクラウド間移行の効果(Oracle Cloudウェビナーシリーズ: 2020年7月8日)
Cloud Foundry Anniversary: Technical Slides
Business-critical applications on VMware vSphere 6, VMware Virtual SAN, and V...
Oracle Cloud Infrastructure:2020年5月度サービス・アップデート
Symantec NetBackup 7.6 benchmark comparison: Data protection in a large-scale...
Exadata
Migrate VMs faster with a new Dell EMC PowerEdge MX solution
Power edge mx7000_sds_performance_1018
Ensure greater uptime and boost VMware vSAN cluster performance with the Del...
Presentation oracle exalogic elastic cloud
Scale Multi container Apps using Docker Swarm and Azure Container Service
【旧版】Oracle Cloud Infrastructure:サービス概要のご紹介 [2020年2月版]
Give DevOps teams self-service resource pools within your private infrastruct...
Boost your work with hardware from Intel
SQL Server 2016 database performance on the Dell EMC PowerEdge FC630 QLogic 1...
Run Stateful Apps on Kubernetes with VMware PKS - Highlight WebLogic Server
Cloud Foundry Diego, Lattice, Docker and more
Preserve user response time while ensuring data availability
Keep data available without affecting user response time
Upgrade to Dell EMC PowerEdge R940 servers with VMware vSphere 7.0 and gain g...
Ad

Similar to Serverless Patterns by Jesse Butler (20)

PPTX
Serverless patterns
PPTX
Functions and DevOps
PDF
2019 10-21 Java in the Age of Serverless
PDF
Introduction to Serverless through Architectural Patterns
PDF
Serverless / FaaS / Lambda and how it relates to Microservices
PDF
NDev Talk - Serverless Design Patterns
PPTX
What is Serverless Computing?
PDF
Learning Serverless Design Develop and Deploy with Confidence 1st Edition Jas...
PDF
Serverless Toronto User Group - Let's go Serverless!
PDF
Servereless Jobs with AWS Lambda
PPTX
Serverless-Computing-The-Future-of-Backend-Development
PPTX
Building Serverless Microservices Using Serverless Framework on the Cloud
PPTX
Serverless
PDF
Montréal AWS Users United: Let's go Serverless!
PPTX
Building Cross-Cloud Platform Cognitive Microservices Using Serverless Archit...
PDF
Serverless, oui mais pour quels usages ?
PPTX
Serverless and AI: Orit Nissan-Messing, Iguazio, Serverless NYC 2018
PDF
Stateful on Stateless - The Future of Applications in the Cloud
PPTX
Event-Driven Serverless Architecture - the next big thing in the cloud (Cleme...
PPTX
Transforming your Business with Serverless
Serverless patterns
Functions and DevOps
2019 10-21 Java in the Age of Serverless
Introduction to Serverless through Architectural Patterns
Serverless / FaaS / Lambda and how it relates to Microservices
NDev Talk - Serverless Design Patterns
What is Serverless Computing?
Learning Serverless Design Develop and Deploy with Confidence 1st Edition Jas...
Serverless Toronto User Group - Let's go Serverless!
Servereless Jobs with AWS Lambda
Serverless-Computing-The-Future-of-Backend-Development
Building Serverless Microservices Using Serverless Framework on the Cloud
Serverless
Montréal AWS Users United: Let's go Serverless!
Building Cross-Cloud Platform Cognitive Microservices Using Serverless Archit...
Serverless, oui mais pour quels usages ?
Serverless and AI: Orit Nissan-Messing, Iguazio, Serverless NYC 2018
Stateful on Stateless - The Future of Applications in the Cloud
Event-Driven Serverless Architecture - the next big thing in the cloud (Cleme...
Transforming your Business with Serverless
Ad

More from Oracle Developers (20)

PDF
Apex atp customer_presentation_wwc march 2019
PDF
Building Cloud Native Applications with Oracle Autonomous Database.
PDF
Fn meetup by Sardar Jamal Arif
PDF
Get ready for_an_autonomous_data_driven_future_ext
PDF
Cloud Native Meetup Santa Clara 07-11-2019 by Manish Kapur
PDF
GraalVM Native Images by Oleg Selajev @shelajev
PDF
Java Library for High Speed Streaming Data
PDF
Artificial Intelligence
PDF
Reactive Java Programming: A new Asynchronous Database Access API by Kuassi M...
PDF
Managing containers on Oracle Cloud by Jamal Arif
PDF
North America November Meetups
PDF
GraphPipe - Blazingly Fast Machine Learning Inference by Vish Abrams
PDF
North America Meetups in September
PPTX
Introduction to the Oracle Container Engine
PPTX
Oracle Data Science Platform
PDF
Persistent storage with containers By Kaslin Fields
PDF
The Fn Project by Jesse Butler
PDF
Silicon Valley JUG meetup July 18, 2018
PDF
Hyperledger Austin meetup July 10, 2018
PPTX
Oracle Global Meetups Team Update - Upcoming Meetups (July and August)
Apex atp customer_presentation_wwc march 2019
Building Cloud Native Applications with Oracle Autonomous Database.
Fn meetup by Sardar Jamal Arif
Get ready for_an_autonomous_data_driven_future_ext
Cloud Native Meetup Santa Clara 07-11-2019 by Manish Kapur
GraalVM Native Images by Oleg Selajev @shelajev
Java Library for High Speed Streaming Data
Artificial Intelligence
Reactive Java Programming: A new Asynchronous Database Access API by Kuassi M...
Managing containers on Oracle Cloud by Jamal Arif
North America November Meetups
GraphPipe - Blazingly Fast Machine Learning Inference by Vish Abrams
North America Meetups in September
Introduction to the Oracle Container Engine
Oracle Data Science Platform
Persistent storage with containers By Kaslin Fields
The Fn Project by Jesse Butler
Silicon Valley JUG meetup July 18, 2018
Hyperledger Austin meetup July 10, 2018
Oracle Global Meetups Team Update - Upcoming Meetups (July and August)

Recently uploaded (20)

PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
DOCX
The AUB Centre for AI in Media Proposal.docx
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
KodekX | Application Modernization Development
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PDF
Modernizing your data center with Dell and AMD
PDF
Review of recent advances in non-invasive hemoglobin estimation
PDF
Encapsulation theory and applications.pdf
PDF
Empathic Computing: Creating Shared Understanding
PPTX
MYSQL Presentation for SQL database connectivity
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PPTX
Cloud computing and distributed systems.
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
“AI and Expert System Decision Support & Business Intelligence Systems”
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
The AUB Centre for AI in Media Proposal.docx
Building Integrated photovoltaic BIPV_UPV.pdf
KodekX | Application Modernization Development
Reach Out and Touch Someone: Haptics and Empathic Computing
Advanced methodologies resolving dimensionality complications for autism neur...
Digital-Transformation-Roadmap-for-Companies.pptx
Modernizing your data center with Dell and AMD
Review of recent advances in non-invasive hemoglobin estimation
Encapsulation theory and applications.pdf
Empathic Computing: Creating Shared Understanding
MYSQL Presentation for SQL database connectivity
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Cloud computing and distributed systems.
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Spectral efficient network and resource selection model in 5G networks
Diabetes mellitus diagnosis method based random forest with bat algorithm
Dropbox Q2 2025 Financial Results & Investor Presentation

Serverless Patterns by Jesse Butler

  • 1. ive cloudnative.oracle.com Serverless Patterns Jesse Butler Cloud Developer Advocate, Oracle Cloud Infrastructure @jlb13 Design and Use Patterns in Serverless
  • 2. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. @jlb13 Level Set • Roles in the room? • Serverless users? • In production? • Lambda? Azure? Something Else? 2
  • 3. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. @jlb13 Monolithic Applications Users Application Database
  • 4. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. @jlb13 Monolithic Applications Users Application Database
  • 5. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. 5 Abstractions Decreasing concern (and control) over infrastructure implementation Virtual machines Containers Bare Metal Virtualization and Consolidation @jlb13 To the Cloud
  • 6. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. @jlb13 Microservices Load balancer Service Service Database Service Queue Deploying Code to Systems We Build in the Cloud with Containers and Kubernetes
  • 7. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. @jlb13 Serverless Load balancer Service Service Database Service Queue Deploying Code to Systems We Build in the Cloud with Containers and Kubernetes
  • 8. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. 8 Abstractions Infrastructure implementation and maintenance responsibility Virtual machines Functions Containers Bare Metal Trend towards Serverless @jlb13 To the Cloud
  • 9. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. 9 Serverless is a Spectrum @jlb13 Container Orchestration Kubernetes Nomad Docker Swarm Ideally managed, but still infrastructure you care about Managed Serverless AWS Lambda Azure Functions Google Functions Oracle Functions Fully managed platform for hosting and executing code Container Services ECS, Fargate Azure CS GCP Cloud Run Managed service provision containers, abstracts infrastructure you care about DIY FaaS OpenFaaS Fn Project Leverage container management system under the covers, introduce Functions architecture Awareness of infrastructureFully aware Invisible
  • 10. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. 10 Containers are the new Process Model, Right? @jlb13
  • 11. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. 11 Containers are the new Process Model, Right? @jlb13
  • 12. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. 12 Don’t Conflate Requirements with Complexity Aversion @jlb13
  • 13. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. What Is Serverless • Event-driven architecture • Invisible infrastructure • Automatic scaling on demand • Granular billing for execution time • Fault tolerant and highly available 13@jlb13
  • 14. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. @jlb13 Serverless Deployment, the Duck Test 14 Upload Function Source Code Configure Function Trigger Function is invoked when triggered Pay for execution time, not idle time
  • 15. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. 15 Serverless is Not Really a Spectrum @jlb13 Container Orchestration Kubernetes Nomad Docker Swarm Ideally managed, but still infrastructure you care about Managed Serverless AWS Lambda Azure Functions Google Functions Oracle Functions Fully managed platform for hosting and executing code Container Services ECS, Fargate Azure CS GCP Cloud Run Managed service provision containers, abstracts infrastructure you care about DIY FaaS OpenFaaS Fn Project Leverage container management system under the covers, introduce Functions architecture Awareness of infrastructureFully aware Invisible
  • 16. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. 16 What Is Serverless, Distilled @jlb13
  • 17. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. What Is Serverless Not • It’s not magic, it’s a choice • Brownfield: You need to break the monolith apart regardless • Greenfield: You need a solid design • Nothing is free 17@jlb13
  • 18. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. @jlb13 Hype Cycle – Productive Adoption Cloud Computing
  • 19. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. @jlb13 Hype Cycle – Serverless in Waves Serverless Computing
  • 20. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. @jlb13 Get Through This Quickly…
  • 21. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. @jlb13 …And Get Here
  • 22. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. 22 Serverless From 30k Feet Event Sources Triggers Function Execution Backend Services Business Intelligence Analytics Databases Compute, Network, Storage Kubernetes, Docker, and/or Hypervisor F(n)F(n) F(n) F(n) @jlb13
  • 23. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. Function Example • Different projects and products differ in use and workflow • Just the code, configured against any number of event triggers • Basically follow microservices rules of engagement • As with microservices, applications are composed of many functions @jlb13
  • 24. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. Events and Execution Models • Events are driven by context • Execution model is your choice @jlb13
  • 25. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. Events, Determined by Context • Changes in data • API Invocations • Requests on endpoints • Changes in resources • Timers, Alarms, Direct Invocation… @jlb13
  • 26. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. Using Events • Events are configured differently per platform • Inform the platform as to what event(s) should invoke this function • Function can consume the event and do the things • CNCF Serverless WG has drafted a CloudEvents specification @jlb13
  • 27. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. Execution Models • Synchronous • Asynchronous • Streaming @jlb13
  • 28. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. Error Handling by Model • Synchronous –Calling code handles the error • Asynchronous –System retries based upon timeline • Streaming –System retries based upon data efficacy @jlb13
  • 29. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. What Can We Build With Serverless? • Web and Mobile Backends • Any other backend API implementations • Real-time Processing of Files, Streams • Batch Processing • Glueing up SaaS things • Kind of anything @jlb13
  • 30. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. @jlb13 Web and Mobile Backends 30 Identity Process dataTrigger functions Functions Web, Mobile Apps API Platform Mobile Data persisted Database Storage
  • 31. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. 31 Extend and Enhance Existing Applications SaaS App Analytics Visualize data Enrich data and send to Analytics service Use data for analytics and insights Inventory create / update Another App Trigger functionsSupport incident create / update Functions @jlb13
  • 32. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. @jlb13 Real-Time Stream Processing 32 Messaging/ Streaming Database Perform user sentiment analysis Trigger functions Functions Data from multiple sources – Product Reviews and Ratings, Customer Service Interactions, Social Media, etc. Records saved in database Dashboards with user sentiment analysis trends
  • 33. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. @jlb13 Real-Time File Processing 33 Storage Database Generate images of different resolutions and sizes Trigger functions Functions High resolution product image uploaded to storage Storage Images saved in Storage, metadata in Database Generated images displayed on various pages and devices
  • 34. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. 34 Internet of Things Check data against thresholds. If exceeded, raise support incidents, send notifications Ingest Trigger functions Functions Devices and things streaming sensor data Incident created in Service Cloud, notification sent to the technician Mobile Technician App Service Cloud Executive Dashboard @jlb13
  • 35. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. @jlb13 Batch Processing 35 Database Database Calculate bonus points Functions Utility consumption Storage Bonus points updated Utility bill PDF file Transaction details Scheduled batch job Functions Database Generate utility bill PDF file PDF files saved in Storage Consumption details Scheduled batch job Loyalty bonus receivedCredit card transactions
  • 36. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. 36 DevOps Automation Compute State Change or a Timer Storage Other - Check tags - Check security roles - Patch or update - Modify/kill resource - Vulnerability assess - Check for idle … @jlb13
  • 37. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. Big Ideas Around the Code • Don’t own what you don’t have to • Serverless is all about APIs • When you do implement, simplify • Plan ahead for observability @jlb13
  • 38. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. Choose a Pattern that Helps you Minimize • Less is more: shoot for a single handler per module • If one function does more than one discrete thing, break it up • Better to proliferate than to decompensate • Observability and triage become infinitely easier at the boundaries @jlb13
  • 39. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. Separate and Simplify • Simplify application estate as well • Events can and probably should define application boundaries • Share libraries between functions and applications, not execution context @jlb13
  • 40. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. Code Reuse • Not long ago, Serverless function deployments were zip files • Now, many Serverless platforms expose a container image to you • Others use layering which mimics the container image stacking @jlb13
  • 41. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. Observability • Metrics – Aggregate data regarding the behavior of a thing over time • Tracing – Instrumentation which provides an instance of an action, traversing the entire stack • Logging – Developer breadcrumbs we leave to give context for a certain code path @jlb13
  • 42. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. Triaging Issues • Monolith in a VM – log into the host, look at logs, run a debugger • Containers in Kubernetes – Istio, Jaeger, Prometheus, Grafana, et al • Serverless… is complicated. Logging is there, but that’s not very useful at scale • OpenTracing & Jaeger is a possibility @jlb13
  • 43. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. Observability Solutions From Your Provider @jlb13 Cloudwatch, X-ray, Stackdriver, OCI Monitoring and Logging, Azure Insights, IBM Monitoring, and others
  • 44. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. Observability Solutions From Other Experts @jlb13 Honeycomb, IO|Pipe, DataDog, Dashbird, Thundra, Epsagon, Splunk, Lightstep, Solo, and others (sorry if I missed yours!)
  • 45. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. Use Services and SaaS When Possible @jlb13 • DBaaS • Identity, Auth, Forms • Storage Services • Email, SMS • Maps, GPS • Media Streaming • Chat and Chatbots
  • 46. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. Worries • Don’t worry too much about cold starts • Do worry about data egress and migration • Pay attention to the system you are integrating with, keep it open if possible @jlb13
  • 47. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. Is Serverless Simpler? • In a word, no • But that doesn’t mean it’s not better • Serverless doesn’t really mean less complexity • Resolving complexity is generally directly related to your core business @jlb13
  • 48. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. Is Serverless Better? • In a word, yes • Less toil in deployment and maintenance of systems is beneficial to focus • OpEx reductions can be profound • Tradeoff: we depend upon third parties to address issues as they arise @jlb13
  • 49. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. Final Thoughts • Put Serverless on your radar – Greenfield – Brownfield migration • Often a POC becomes production • Resist the urge to compare DevOps and Serverless. Apples to Apple Pie. • Build stuff! @jlb13