SlideShare a Scribd company logo
1 of 50
Download to read offline
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

What's hot (20)

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

Similar to Serverless Patterns by Jesse Butler

利用Fargate無伺服器的容器環境建置高可用的系統
利用Fargate無伺服器的容器環境建置高可用的系統利用Fargate無伺服器的容器環境建置高可用的系統
利用Fargate無伺服器的容器環境建置高可用的系統
Amazon Web Services
 

Similar to Serverless Patterns by Jesse Butler (20)

Serverless patterns
Serverless patternsServerless patterns
Serverless patterns
 
Serverless Java - Challenges and Triumphs
Serverless Java - Challenges and TriumphsServerless Java - Challenges and Triumphs
Serverless Java - Challenges and Triumphs
 
Serverless Java Challenges & Triumphs
Serverless Java Challenges & TriumphsServerless Java Challenges & Triumphs
Serverless Java Challenges & Triumphs
 
Functions and DevOps
Functions and DevOpsFunctions and DevOps
Functions and DevOps
 
Oracle Database 19c - poslední z rodiny 12.2 a co přináší nového
Oracle Database 19c - poslední z rodiny 12.2 a co přináší novéhoOracle Database 19c - poslední z rodiny 12.2 a co přináší nového
Oracle Database 19c - poslední z rodiny 12.2 a co přináší nového
 
Serverless Java: JJUG CCC 2019
Serverless Java: JJUG CCC 2019Serverless Java: JJUG CCC 2019
Serverless Java: JJUG CCC 2019
 
Modern Applications Development on AWS
Modern Applications Development on AWSModern Applications Development on AWS
Modern Applications Development on AWS
 
利用Fargate無伺服器的容器環境建置高可用的系統
利用Fargate無伺服器的容器環境建置高可用的系統利用Fargate無伺服器的容器環境建置高可用的系統
利用Fargate無伺服器的容器環境建置高可用的系統
 
Java Development on Bluemix
Java Development on BluemixJava Development on Bluemix
Java Development on Bluemix
 
Enabling a hardware accelerated deep learning data science experience for Apa...
Enabling a hardware accelerated deep learning data science experience for Apa...Enabling a hardware accelerated deep learning data science experience for Apa...
Enabling a hardware accelerated deep learning data science experience for Apa...
 
TechEvent 2019: Create a Private Database Cloud in the Public Cloud using the...
TechEvent 2019: Create a Private Database Cloud in the Public Cloud using the...TechEvent 2019: Create a Private Database Cloud in the Public Cloud using the...
TechEvent 2019: Create a Private Database Cloud in the Public Cloud using the...
 
The Changing Role of a DBA in an Autonomous World
The Changing Role of a DBA in an Autonomous WorldThe Changing Role of a DBA in an Autonomous World
The Changing Role of a DBA in an Autonomous World
 
20191201 kubernetes managed weblogic revival - part 2
20191201 kubernetes managed weblogic revival - part 220191201 kubernetes managed weblogic revival - part 2
20191201 kubernetes managed weblogic revival - part 2
 
High Volume Payments using Mule
High Volume Payments using MuleHigh Volume Payments using Mule
High Volume Payments using Mule
 
Breaking the Monolith road to containers.pdf
Breaking the Monolith road to containers.pdfBreaking the Monolith road to containers.pdf
Breaking the Monolith road to containers.pdf
 
The Kubernetes WebLogic revival (part 2)
The Kubernetes WebLogic revival (part 2)The Kubernetes WebLogic revival (part 2)
The Kubernetes WebLogic revival (part 2)
 
Lessons Learned from Deploying Apache Spark as a Service on IBM Power Systems...
Lessons Learned from Deploying Apache Spark as a Service on IBM Power Systems...Lessons Learned from Deploying Apache Spark as a Service on IBM Power Systems...
Lessons Learned from Deploying Apache Spark as a Service on IBM Power Systems...
 
利用 Fargate - 無伺服器的容器環境建置高可用的系統
利用 Fargate - 無伺服器的容器環境建置高可用的系統利用 Fargate - 無伺服器的容器環境建置高可用的系統
利用 Fargate - 無伺服器的容器環境建置高可用的系統
 
Breaking the Monolith road to containers.pdf
Breaking the Monolith road to containers.pdfBreaking the Monolith road to containers.pdf
Breaking the Monolith road to containers.pdf
 
CICDforModernApplications_Stockholm.pdf
CICDforModernApplications_Stockholm.pdfCICDforModernApplications_Stockholm.pdf
CICDforModernApplications_Stockholm.pdf
 

More from Oracle Developers

More from Oracle Developers (20)

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

Recently uploaded

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 

Recently uploaded (20)

Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot ModelNavi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 

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