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

What's hot (20)

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

Similar to Serverless Patterns by Jesse Butler (20)

PPTX
Serverless patterns
Jesse Butler
 
PDF
Serverless Java - Challenges and Triumphs
David Delabassee
 
PDF
Serverless Java Challenges & Triumphs
David Delabassee
 
PPTX
Functions and DevOps
Shaun Smith
 
PDF
Oracle Database 19c - poslední z rodiny 12.2 a co přináší nového
MarketingArrowECS_CZ
 
PDF
Serverless Java: JJUG CCC 2019
Shaun Smith
 
PDF
Modern Applications Development on AWS
Boaz Ziniman
 
PPT
Java Development on Bluemix
Ram Vennam
 
PDF
Enabling a hardware accelerated deep learning data science experience for Apa...
Indrajit Poddar
 
PDF
introduction to kubernetes slide deck by Roach
ZiyanMaraikar1
 
PDF
TechEvent 2019: Create a Private Database Cloud in the Public Cloud using the...
Trivadis
 
PPTX
The Changing Role of a DBA in an Autonomous World
Maria Colgan
 
PPTX
20191201 kubernetes managed weblogic revival - part 2
makker_nl
 
PPTX
High Volume Payments using Mule
Adhish Pendharkar
 
PDF
The Kubernetes WebLogic revival (part 2)
Simon Haslam
 
PDF
Lessons Learned from Deploying Apache Spark as a Service on IBM Power Systems...
Indrajit Poddar
 
PDF
MySQL Shell - A DevOps-engineer day with MySQL’s development and administrati...
Miguel Araújo
 
PDF
Łukasz Romaszewski on Internet of Things Raspberry Pi and Java Embedded JavaC...
Tomek Borek
 
PDF
Oracle RAC 19c - the Basis for the Autonomous Database
Markus Michalewicz
 
PPTX
Meetup callback
Wayne Scarano
 
Serverless patterns
Jesse Butler
 
Serverless Java - Challenges and Triumphs
David Delabassee
 
Serverless Java Challenges & Triumphs
David Delabassee
 
Functions and DevOps
Shaun Smith
 
Oracle Database 19c - poslední z rodiny 12.2 a co přináší nového
MarketingArrowECS_CZ
 
Serverless Java: JJUG CCC 2019
Shaun Smith
 
Modern Applications Development on AWS
Boaz Ziniman
 
Java Development on Bluemix
Ram Vennam
 
Enabling a hardware accelerated deep learning data science experience for Apa...
Indrajit Poddar
 
introduction to kubernetes slide deck by Roach
ZiyanMaraikar1
 
TechEvent 2019: Create a Private Database Cloud in the Public Cloud using the...
Trivadis
 
The Changing Role of a DBA in an Autonomous World
Maria Colgan
 
20191201 kubernetes managed weblogic revival - part 2
makker_nl
 
High Volume Payments using Mule
Adhish Pendharkar
 
The Kubernetes WebLogic revival (part 2)
Simon Haslam
 
Lessons Learned from Deploying Apache Spark as a Service on IBM Power Systems...
Indrajit Poddar
 
MySQL Shell - A DevOps-engineer day with MySQL’s development and administrati...
Miguel Araújo
 
Łukasz Romaszewski on Internet of Things Raspberry Pi and Java Embedded JavaC...
Tomek Borek
 
Oracle RAC 19c - the Basis for the Autonomous Database
Markus Michalewicz
 
Meetup callback
Wayne Scarano
 
Ad

More from Oracle Developers (20)

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

Recently uploaded (20)

PDF
CIFDAQ Token Spotlight for 9th July 2025
CIFDAQ
 
PDF
New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
PDF
Python basic programing language for automation
DanialHabibi2
 
PDF
"AI Transformation: Directions and Challenges", Pavlo Shaternik
Fwdays
 
PDF
HubSpot Main Hub: A Unified Growth Platform
Jaswinder Singh
 
PDF
CIFDAQ Weekly Market Wrap for 11th July 2025
CIFDAQ
 
PDF
The Builder’s Playbook - 2025 State of AI Report.pdf
jeroen339954
 
PDF
Exolore The Essential AI Tools in 2025.pdf
Srinivasan M
 
PPTX
Top iOS App Development Company in the USA for Innovative Apps
SynapseIndia
 
PDF
SFWelly Summer 25 Release Highlights July 2025
Anna Loughnan Colquhoun
 
PDF
Agentic AI lifecycle for Enterprise Hyper-Automation
Debmalya Biswas
 
PDF
Jak MŚP w Europie Środkowo-Wschodniej odnajdują się w świecie AI
dominikamizerska1
 
PDF
Newgen Beyond Frankenstein_Build vs Buy_Digital_version.pdf
darshakparmar
 
PDF
"Beyond English: Navigating the Challenges of Building a Ukrainian-language R...
Fwdays
 
PDF
Windsurf Meetup Ottawa 2025-07-12 - Planning Mode at Reliza.pdf
Pavel Shukhman
 
PDF
How Startups Are Growing Faster with App Developers in Australia.pdf
India App Developer
 
PDF
SWEBOK Guide and Software Services Engineering Education
Hironori Washizaki
 
PPT
Interview paper part 3, It is based on Interview Prep
SoumyadeepGhosh39
 
PDF
Blockchain Transactions Explained For Everyone
CIFDAQ
 
PDF
Newgen 2022-Forrester Newgen TEI_13 05 2022-The-Total-Economic-Impact-Newgen-...
darshakparmar
 
CIFDAQ Token Spotlight for 9th July 2025
CIFDAQ
 
New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
Python basic programing language for automation
DanialHabibi2
 
"AI Transformation: Directions and Challenges", Pavlo Shaternik
Fwdays
 
HubSpot Main Hub: A Unified Growth Platform
Jaswinder Singh
 
CIFDAQ Weekly Market Wrap for 11th July 2025
CIFDAQ
 
The Builder’s Playbook - 2025 State of AI Report.pdf
jeroen339954
 
Exolore The Essential AI Tools in 2025.pdf
Srinivasan M
 
Top iOS App Development Company in the USA for Innovative Apps
SynapseIndia
 
SFWelly Summer 25 Release Highlights July 2025
Anna Loughnan Colquhoun
 
Agentic AI lifecycle for Enterprise Hyper-Automation
Debmalya Biswas
 
Jak MŚP w Europie Środkowo-Wschodniej odnajdują się w świecie AI
dominikamizerska1
 
Newgen Beyond Frankenstein_Build vs Buy_Digital_version.pdf
darshakparmar
 
"Beyond English: Navigating the Challenges of Building a Ukrainian-language R...
Fwdays
 
Windsurf Meetup Ottawa 2025-07-12 - Planning Mode at Reliza.pdf
Pavel Shukhman
 
How Startups Are Growing Faster with App Developers in Australia.pdf
India App Developer
 
SWEBOK Guide and Software Services Engineering Education
Hironori Washizaki
 
Interview paper part 3, It is based on Interview Prep
SoumyadeepGhosh39
 
Blockchain Transactions Explained For Everyone
CIFDAQ
 
Newgen 2022-Forrester Newgen TEI_13 05 2022-The-Total-Economic-Impact-Newgen-...
darshakparmar
 

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