SlideShare uma empresa Scribd logo
1 de 31
Serverless Architecture
Jesse Butler Cloud Native Advocate, Oracle Cloud Infrastructure
Basic Patterns with Serverless
Copyright © 2018, Oracle and/or its affiliates. All rights reserved.
Safe Harbor Statement
The following is intended to outline our general product direction. It is intended for
information purposes only, and may not be incorporated into any contract. It is not a
commitment to deliver any material, code, or functionality, and should not be relied upon
in making purchasing decisions. The development, release, and timing of any features or
functionality described for Oracle’s products remains at the sole discretion of Oracle.
Copyright © 2018, Oracle and/or its affiliates. All rights reserved.
About Me
• Oracle via Sun Microsystems
• Responsible for Docker on Solaris, later on Oracle Linux
• Some work with Open Containers and CNCF WGs
• Now a Cloud Native Advocate @ Oracle Cloud
• @jlb13 on Twitter
3
Copyright © 2018, Oracle and/or its affiliates. All rights reserved.
About OCI
• Next-generation Cloud Infrastructure
• Highly performant, very affordable
• Managed Cloud Native Services
–OKE & OCIR at the core
–Many managed services in the pipeline
• Check out OCI: https://cloud.oracle.com/tryit
4
Copyright © 2018, Oracle and/or its affiliates. All rights reserved.
Level Set
• Serverless
• In production?
• Lambda?
5
Copyright © 2018, Oracle and/or its affiliates. All rights reserved.
Monolithic Applications
Users
Application
Database
Copyright © 2018, Oracle and/or its affiliates. All rights reserved.
Monolithic Applications
Users
Application
Database
Copyright © 2018, Oracle and/or its affiliates. All rights reserved.
Microservices
Load
balancer
Service Service
Database
Service
Queue
Deploying Code to Systems We Build in the Cloud with Excellent Abstractions
Copyright © 2018, Oracle and/or its affiliates. All rights reserved.
Serverless
Load
balancer
Service Service
Database
Service
Queue
Deploying Code to Systems We Build in the Cloud with Excellent Abstractions
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. 10
Abstractions
Decreasing concern (and control) over infrastructure implementation
Virtual machines
Functions
Containers
Bare Metal
Trend towards Serverless
Copyright © 2018, Oracle and/or its affiliates. All rights reserved.
What Is Serverless?
• Event-driven architecture
• Invisible infrastructure
• Automatic scaling on demand
• Fault tolerant and highly available
• Granular billing for execution time
Confidential – Oracle Internal/Restricted/Highly Restricted11
Copyright © 2018, Oracle and/or its affiliates. All rights reserved.
How Does it Work?
12
Upload
Function
Source Code
Configure
Function
Trigger
Function is
invoked
when
triggered
Pay for execution
time, not idle
time
Copyright © 2018, Oracle and/or its affiliates. All rights reserved.
Function Example
• Different projects and products
differ in use and workflow
• This example function can be
deployed in Oracle Functions
• Just the code, configured against
any number of event triggers
• As with microservices, applications
are composed of many functions
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. 14
Functions-as-a-Service
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)
Copyright © 2018, Oracle and/or its affiliates. All rights reserved.
Oracle Functions
15
Autonomous
Platform auto-scales functions
No servers to provision,
manage
Pay Per Use
Pay for execution, not for idle
time
No Lock-in
Built on open-source Fn
Project and Docker
Oracle Functions
Functions-as-a-Service
Oracle Cloud
Integrated
Container Native
Multi-tenant
Secure
Open Source Engine
Copyright © 2018, Oracle and/or its affiliates. All rights reserved.
Key Features
Function Dev KitsOpen Source Engine
Oracle Cloud Triggers
Events
HTTP
Timer
Streams
Container Native
Advanced DiagnosticsFine-grained Billing
Copyright © 2018, Oracle and/or its affiliates. All rights reserved.
Execution Model
• Synchronous
• Asynchronous
• Streaming
Copyright © 2018, Oracle and/or its affiliates. All rights reserved.
Events, Determined by Context
• Changes in data
• Requests on endpoints
• Changes in resources
• Timers
Copyright © 2018, Oracle and/or its affiliates. All rights reserved.
Using Events
• Events or triggers are configured
differently
• Abstractly, inform the platform to
what event(s) should invoke this
function
• OCI Functions use Cloud Events
format for portability
Copyright © 2018, Oracle and/or its affiliates. All rights reserved.
ORACLE CLOUD
Use Case: Web and Mobile Backends
20
Identity
Process dataTrigger functions
Functions
Web, Mobile Apps
API Platform
Mobile
Data persisted
Database
Storage
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. 21
Extend and Enhance Existing Applications
ORACLE CLOUD
SaaS App
Analytics
Visualize data
Enrich data and
send to Analytics
service
Use data
for analytics
and insights
Inventory create / update
Another
App
Trigger
functions
Support incident
create / update
Functions
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. 22
Automation and DevOps
ORACLE CLOUD
Compute
State Change
Triggers
Storage
Other
- Check tags
- Check security roles
- Patch or update
- Modify/kill resource
- Vulnerability assess
Reports/Notifications
Copyright © 2018, Oracle and/or its affiliates. All rights reserved.
ORACLE CLOUD
Use Case: Real-Time Stream Processing
23
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 © 2018, Oracle and/or its affiliates. All rights reserved.
ORACLE CLOUD
Use Case: Real-Time File Processing
24
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 © 2018, Oracle and/or its affiliates. All rights reserved.
ORACLE CLOUD
Use Case: Batch Processing
25
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 © 2018, Oracle and/or its affiliates. All rights reserved. 26
Internet of Things
ORACLE CLOUD
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
Copyright © 2018, Oracle and/or its affiliates. All rights reserved.
Mapping Execution, Events and Architecture
• Eventing model is driven by the
requirement and context
• Choose the right execution model
for your application
Copyright © 2018, Oracle and/or its affiliates. All rights reserved.
Choose a Pattern that Helps you Minimize
• Less is more, good rule of thumb
is a single handler per module
• Better to proliferate than to
decompensate
• Observability and triage become
infinitely easier at the boundaries
Copyright © 2018, Oracle and/or its affiliates. All rights reserved.
Separate and Simplify
• Typically consumption of events
define application boundaries
• Share libraries between functions
and applications, not execution
context
Copyright © 2018, Oracle and/or its affiliates. All rights reserved.
Separate and Simplify
• Don’t worry about cold starts
• Do worry about lock-in and data
egress
cloud.oracle.com/trial
cloudnative.oracle.com
Thanks!

Mais conteúdo relacionado

Mais procurados

Breathing New Life into Apache Oozie with Apache Ambari Workflow Manager
Breathing New Life into Apache Oozie with Apache Ambari Workflow ManagerBreathing New Life into Apache Oozie with Apache Ambari Workflow Manager
Breathing New Life into Apache Oozie with Apache Ambari Workflow Manager
DataWorks Summit
 
Building Audi’s enterprise big data platform
Building Audi’s enterprise big data platformBuilding Audi’s enterprise big data platform
Building Audi’s enterprise big data platform
DataWorks Summit
 

Mais procurados (20)

Adobe Spark Meetup - 9/19/2018 - San Jose, CA
Adobe Spark Meetup - 9/19/2018 - San Jose, CAAdobe Spark Meetup - 9/19/2018 - San Jose, CA
Adobe Spark Meetup - 9/19/2018 - San Jose, CA
 
Omc AMIS evenement 26012017 Dennis van Soest
Omc AMIS evenement 26012017 Dennis van SoestOmc AMIS evenement 26012017 Dennis van Soest
Omc AMIS evenement 26012017 Dennis van Soest
 
Breathing New Life into Apache Oozie with Apache Ambari Workflow Manager
Breathing New Life into Apache Oozie with Apache Ambari Workflow ManagerBreathing New Life into Apache Oozie with Apache Ambari Workflow Manager
Breathing New Life into Apache Oozie with Apache Ambari Workflow Manager
 
Working with Oracle Big Data Cloud Compute Edition and Apache Zeppelin
Working with Oracle Big Data Cloud Compute Edition and Apache ZeppelinWorking with Oracle Big Data Cloud Compute Edition and Apache Zeppelin
Working with Oracle Big Data Cloud Compute Edition and Apache Zeppelin
 
Oracle Stream Analytics - Developer Introduction
Oracle Stream Analytics - Developer IntroductionOracle Stream Analytics - Developer Introduction
Oracle Stream Analytics - Developer Introduction
 
Elastic Integration for ServiceNow
Elastic Integration for ServiceNowElastic Integration for ServiceNow
Elastic Integration for ServiceNow
 
First Take - Oracle unveils database 18c - the autonomy begins
First Take - Oracle unveils database 18c - the autonomy beginsFirst Take - Oracle unveils database 18c - the autonomy begins
First Take - Oracle unveils database 18c - the autonomy begins
 
Building Audi’s enterprise big data platform
Building Audi’s enterprise big data platformBuilding Audi’s enterprise big data platform
Building Audi’s enterprise big data platform
 
Occ ebizoncloud
Occ ebizoncloudOcc ebizoncloud
Occ ebizoncloud
 
Webinar Data Mesh - Part 3
Webinar Data Mesh - Part 3Webinar Data Mesh - Part 3
Webinar Data Mesh - Part 3
 
Postgres Vision 2018: Your Migration Path - Isabel Case Study
Postgres Vision 2018: Your Migration Path - Isabel Case StudyPostgres Vision 2018: Your Migration Path - Isabel Case Study
Postgres Vision 2018: Your Migration Path - Isabel Case Study
 
Microservices Patterns with GoldenGate
Microservices Patterns with GoldenGateMicroservices Patterns with GoldenGate
Microservices Patterns with GoldenGate
 
B6 improve operational_efficiency_through_process_and_document_collaboration
B6 improve operational_efficiency_through_process_and_document_collaborationB6 improve operational_efficiency_through_process_and_document_collaboration
B6 improve operational_efficiency_through_process_and_document_collaboration
 
C6 oracles storage_strategy_from_databases_to_engineered_systems_to_cloud
C6 oracles storage_strategy_from_databases_to_engineered_systems_to_cloudC6 oracles storage_strategy_from_databases_to_engineered_systems_to_cloud
C6 oracles storage_strategy_from_databases_to_engineered_systems_to_cloud
 
Oracle Management Cloud - HybridCloud Café - May 2016
Oracle Management Cloud - HybridCloud Café - May 2016Oracle Management Cloud - HybridCloud Café - May 2016
Oracle Management Cloud - HybridCloud Café - May 2016
 
IoT meets AI in the Clouds
IoT meets AI in the CloudsIoT meets AI in the Clouds
IoT meets AI in the Clouds
 
Powering Business Transformation with Oracle Exadata: a Capgemini Case Study
Powering Business Transformation with Oracle Exadata: a Capgemini Case StudyPowering Business Transformation with Oracle Exadata: a Capgemini Case Study
Powering Business Transformation with Oracle Exadata: a Capgemini Case Study
 
B5 modernise your_cloud_to_on_premises_integration
B5 modernise your_cloud_to_on_premises_integrationB5 modernise your_cloud_to_on_premises_integration
B5 modernise your_cloud_to_on_premises_integration
 
Business and IT agility through DevOps and microservice architecture powered ...
Business and IT agility through DevOps and microservice architecture powered ...Business and IT agility through DevOps and microservice architecture powered ...
Business and IT agility through DevOps and microservice architecture powered ...
 
Audi‘s Hadoop Journey into the Hybrid Cloud
Audi‘s Hadoop Journey into the Hybrid CloudAudi‘s Hadoop Journey into the Hybrid Cloud
Audi‘s Hadoop Journey into the Hybrid Cloud
 

Semelhante a Serverless patterns

Semelhante a Serverless patterns (20)

Solaris 11.4 launch
Solaris 11.4 launchSolaris 11.4 launch
Solaris 11.4 launch
 
Microservices at Scale with Istio
Microservices at Scale with IstioMicroservices at Scale with Istio
Microservices at Scale with Istio
 
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
 
Functions and DevOps
Functions and DevOpsFunctions and DevOps
Functions and DevOps
 
Serverless Patterns by Jesse Butler
Serverless Patterns by Jesse ButlerServerless Patterns by Jesse Butler
Serverless Patterns by Jesse Butler
 
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
 
Oracle Modern AppDev Approach to Cloud & Container Native App
Oracle Modern AppDev Approach to Cloud & Container Native AppOracle Modern AppDev Approach to Cloud & Container Native App
Oracle Modern AppDev Approach to Cloud & Container Native App
 
Oracle Autonomous Data Warehouse Cloud Webex - with Demo
Oracle Autonomous Data Warehouse Cloud Webex - with DemoOracle Autonomous Data Warehouse Cloud Webex - with Demo
Oracle Autonomous Data Warehouse Cloud Webex - with Demo
 
Episode 1: Transition to Iaas
Episode 1: Transition to IaasEpisode 1: Transition to Iaas
Episode 1: Transition to Iaas
 
Stream based Data Integration
Stream based Data IntegrationStream based Data Integration
Stream based Data Integration
 
Enterprise Cloud transformation z pohledu Oracle
Enterprise Cloud transformation z pohledu OracleEnterprise Cloud transformation z pohledu Oracle
Enterprise Cloud transformation z pohledu Oracle
 
Move your oracle apps to oci
Move your oracle apps to ociMove your oracle apps to oci
Move your oracle apps to oci
 
Discover & Migrate at Scale with AWS Migration Hub & Application Discovery Se...
Discover & Migrate at Scale with AWS Migration Hub & Application Discovery Se...Discover & Migrate at Scale with AWS Migration Hub & Application Discovery Se...
Discover & Migrate at Scale with AWS Migration Hub & Application Discovery Se...
 
Achieving digital transformation with Siebel CRM and Oracle Cloud
Achieving digital transformation with Siebel CRM and Oracle Cloud Achieving digital transformation with Siebel CRM and Oracle Cloud
Achieving digital transformation with Siebel CRM and Oracle Cloud
 
SOUG Day - autonomous what is next
SOUG Day - autonomous what is nextSOUG Day - autonomous what is next
SOUG Day - autonomous what is next
 
MySQL day Dublin - OCI & Application Development
MySQL day Dublin - OCI & Application DevelopmentMySQL day Dublin - OCI & Application Development
MySQL day Dublin - OCI & Application Development
 
Oracle GoldenGate Performance Tuning
Oracle GoldenGate Performance TuningOracle GoldenGate Performance Tuning
Oracle GoldenGate Performance Tuning
 
Hit Refresh with Oracle GoldenGate Microservices
Hit Refresh with Oracle GoldenGate MicroservicesHit Refresh with Oracle GoldenGate Microservices
Hit Refresh with Oracle GoldenGate Microservices
 
Oracle goldegate microservice
Oracle goldegate microserviceOracle goldegate microservice
Oracle goldegate microservice
 
Why citizen developers should be your new best friend - Oracle APEX
Why citizen developers should be your new best friend - Oracle APEXWhy citizen developers should be your new best friend - Oracle APEX
Why citizen developers should be your new best friend - Oracle APEX
 

Último

AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
VictorSzoltysek
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
Health
 
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfintroduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
VishalKumarJha10
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 

Último (20)

call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
Sector 18, Noida Call girls :8448380779 Model Escorts | 100% verified
Sector 18, Noida Call girls :8448380779 Model Escorts | 100% verifiedSector 18, Noida Call girls :8448380779 Model Escorts | 100% verified
Sector 18, Noida Call girls :8448380779 Model Escorts | 100% verified
 
Define the academic and professional writing..pdf
Define the academic and professional writing..pdfDefine the academic and professional writing..pdf
Define the academic and professional writing..pdf
 
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
 
LEVEL 5 - SESSION 1 2023 (1).pptx - PDF 123456
LEVEL 5   - SESSION 1 2023 (1).pptx - PDF 123456LEVEL 5   - SESSION 1 2023 (1).pptx - PDF 123456
LEVEL 5 - SESSION 1 2023 (1).pptx - PDF 123456
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
 
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfintroduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
 
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) SolutionIntroducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
 
Pharm-D Biostatistics and Research methodology
Pharm-D Biostatistics and Research methodologyPharm-D Biostatistics and Research methodology
Pharm-D Biostatistics and Research methodology
 
8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
BUS PASS MANGEMENT SYSTEM USING PHP.pptx
BUS PASS MANGEMENT SYSTEM USING PHP.pptxBUS PASS MANGEMENT SYSTEM USING PHP.pptx
BUS PASS MANGEMENT SYSTEM USING PHP.pptx
 
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdfPayment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
 

Serverless patterns

  • 1. Serverless Architecture Jesse Butler Cloud Native Advocate, Oracle Cloud Infrastructure Basic Patterns with Serverless
  • 2. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. Safe Harbor Statement The following is intended to outline our general product direction. It is intended for information purposes only, and may not be incorporated into any contract. It is not a commitment to deliver any material, code, or functionality, and should not be relied upon in making purchasing decisions. The development, release, and timing of any features or functionality described for Oracle’s products remains at the sole discretion of Oracle.
  • 3. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. About Me • Oracle via Sun Microsystems • Responsible for Docker on Solaris, later on Oracle Linux • Some work with Open Containers and CNCF WGs • Now a Cloud Native Advocate @ Oracle Cloud • @jlb13 on Twitter 3
  • 4. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. About OCI • Next-generation Cloud Infrastructure • Highly performant, very affordable • Managed Cloud Native Services –OKE & OCIR at the core –Many managed services in the pipeline • Check out OCI: https://cloud.oracle.com/tryit 4
  • 5. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. Level Set • Serverless • In production? • Lambda? 5
  • 6. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. Monolithic Applications Users Application Database
  • 7. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. Monolithic Applications Users Application Database
  • 8. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. Microservices Load balancer Service Service Database Service Queue Deploying Code to Systems We Build in the Cloud with Excellent Abstractions
  • 9. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. Serverless Load balancer Service Service Database Service Queue Deploying Code to Systems We Build in the Cloud with Excellent Abstractions
  • 10. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. 10 Abstractions Decreasing concern (and control) over infrastructure implementation Virtual machines Functions Containers Bare Metal Trend towards Serverless
  • 11. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. What Is Serverless? • Event-driven architecture • Invisible infrastructure • Automatic scaling on demand • Fault tolerant and highly available • Granular billing for execution time Confidential – Oracle Internal/Restricted/Highly Restricted11
  • 12. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. How Does it Work? 12 Upload Function Source Code Configure Function Trigger Function is invoked when triggered Pay for execution time, not idle time
  • 13. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. Function Example • Different projects and products differ in use and workflow • This example function can be deployed in Oracle Functions • Just the code, configured against any number of event triggers • As with microservices, applications are composed of many functions
  • 14. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. 14 Functions-as-a-Service 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)
  • 15. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. Oracle Functions 15 Autonomous Platform auto-scales functions No servers to provision, manage Pay Per Use Pay for execution, not for idle time No Lock-in Built on open-source Fn Project and Docker Oracle Functions Functions-as-a-Service Oracle Cloud Integrated Container Native Multi-tenant Secure Open Source Engine
  • 16. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. Key Features Function Dev KitsOpen Source Engine Oracle Cloud Triggers Events HTTP Timer Streams Container Native Advanced DiagnosticsFine-grained Billing
  • 17. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. Execution Model • Synchronous • Asynchronous • Streaming
  • 18. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. Events, Determined by Context • Changes in data • Requests on endpoints • Changes in resources • Timers
  • 19. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. Using Events • Events or triggers are configured differently • Abstractly, inform the platform to what event(s) should invoke this function • OCI Functions use Cloud Events format for portability
  • 20. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. ORACLE CLOUD Use Case: Web and Mobile Backends 20 Identity Process dataTrigger functions Functions Web, Mobile Apps API Platform Mobile Data persisted Database Storage
  • 21. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. 21 Extend and Enhance Existing Applications ORACLE CLOUD SaaS App Analytics Visualize data Enrich data and send to Analytics service Use data for analytics and insights Inventory create / update Another App Trigger functions Support incident create / update Functions
  • 22. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. 22 Automation and DevOps ORACLE CLOUD Compute State Change Triggers Storage Other - Check tags - Check security roles - Patch or update - Modify/kill resource - Vulnerability assess Reports/Notifications
  • 23. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. ORACLE CLOUD Use Case: Real-Time Stream Processing 23 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
  • 24. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. ORACLE CLOUD Use Case: Real-Time File Processing 24 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
  • 25. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. ORACLE CLOUD Use Case: Batch Processing 25 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
  • 26. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. 26 Internet of Things ORACLE CLOUD 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
  • 27. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. Mapping Execution, Events and Architecture • Eventing model is driven by the requirement and context • Choose the right execution model for your application
  • 28. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. Choose a Pattern that Helps you Minimize • Less is more, good rule of thumb is a single handler per module • Better to proliferate than to decompensate • Observability and triage become infinitely easier at the boundaries
  • 29. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. Separate and Simplify • Typically consumption of events define application boundaries • Share libraries between functions and applications, not execution context
  • 30. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. Separate and Simplify • Don’t worry about cold starts • Do worry about lock-in and data egress

Notas do Editor

  1. Functions, monitoring, messaging, many managed services
  2. Audience check
  3. I’m not here to tell you that monolithic apps are bad. In fact, nice and simple.
  4. The problem is, they typically contain a lot of complexity and moving parts, all tightly coupled into a blob of stuff Any one change effectively touches the entire body, and everything needs to be tested. This can be expensive. Typically, features get tacked on, along with bug fixes, and that’s where we end up with these long tails on releases. That’s not the best way to get features and fixes out the door fast.
  5. Let’s reconsider our microservices example With the containers and the kubernetes and al… there’s a lot here that is really infrastructure In solving our business problems, we care about agility, flexibility, robustness… so the separation of concerns and smaller units of code to deploy are good What if that’s all we cared about?
  6. Serverless is a further abstraction in the cloud With containers and kubernetes, we are decoupled from the host environment, and can abstract many host environments in a distributed mesh with ease With serverless, we abstract even that away, and focus only on our business logic
  7. There are many definitions, but these are the basic requirements (anyone know what this image is? …. A serverless data center. Haha.)
  8. How does it work? Upload your code and configuration Set up a trigger – HTTP or Event or Stream or Timer The platform runs your code in response to the trigger You only pay for compute resources used when your code is running, saving the otherwise idle time of containers or VM’s
  9. Serverless initially defined “client-rich apps” - heavily relied on third-party, cloud-hosted applications and services, to manage server-side logic and state Database, auth services, even frontend – all effectively vendored in This is sometimes known as BaaS – but “serverless” works too And this is still very much an active definition of serverless Another is FaaS, functions… where the backend is implemented in units of deployable functions… and this is what we are typically talking about with AWS Lambda, Azure Functions, Google Cloud Functions, and Oracle Functions
  10. Event source of all kinds fires functions, which then call into other services as needed
  11. Managed serverless platform integrated in OCI Based on open source engine, provides a fully managed means of managing and invoking functions at scale Pay per use, granular billing, fully autonomous
  12. Key features: Open Source FaaS Engine – based on Fn Project Container Native – Docker is a first class citizen. Packages and runs your functions in lightweight docker containers Function Development Kits – Additional set of libraries in Go, Node, Java, Ruby, Python to simplify function development Triggers – HTTP, Events (from Oracle Cloud services like storage, database, apps like RightNow, NetSuite, etc.), Streams (Kakfa, Event Hub Cloud Service), Timer (Cron) Pay per use – fine grained billing, pay for execution time, not for idle time Advanced diagnostics – Platform provides details metrics and execution logs Secure workload isolation Auto scale Highly available
  13. Sync – fronted by API gateway, typical backend / web app sort of thing Async – events drive these, this is an eventual invocation… image is uploaded, we need to run a handful of functions and maybe store some resulting data… nothing is blocking on it Streaming – messages coming in froma queue, each of which invoke a function o do something needed
  14. Async functions start for a reason – in a serverless architecture, that reason is codified and delievered to the platofmr, which in turn invokes your code This informs our patterns from the start… something working with imnages which are uploaded will be triggered on data store events, something monitioring infra restources will fire off of change in infra
  15. Serverless initially defined “client-rich apps” - heavily relied on third-party, cloud-hosted applications and services, to manage server-side logic and state Database, auth services, even frontend – all effectively vendored in This is sometimes known as BaaS – but “serverless” works too And this is still very much an active definition of serverless Another is FaaS, functions… where the backend is implemented in units of deployable functions… and this is what we are typically talking about with AWS Lambda, Azure Functions, Google Cloud Functions, and Oracle Functions
  16. Use cases: User sentiment analysis, Credit card fraud detection, Product recommendations, Crime detection, etc.
  17. Sometimes the choice is obvious – it’s an image archiving application, you’re working with storage events Less obvious is something like data processing – batch jobs, streaming? Execution context will inform the configuration – POC is important… sometimes less memory doesn’t mean less money spent…. More memory means you get more cmpute and network contriuved example, but something that takes 5s with 128MB might run in a half second with 1GB and cost nearly the same
  18. Try to avoid 3000 line “functions” Better to have 30 loosely coupled, functions than 3 fat ones handling it all Better performance in nearly all models with smaller, more discrete functions Boundaries are easy to trace, the less stuff happening between them the better
  19. Sometimes the choice is obvious – it’s an image archiving application, you’re working with storage events Less obvious is something like data processing – batch jobs, streaming? Execution context will inform the configuration – POC is important… sometimes less memory doesn’t mean less money spent Don’t conflate applications if you can help it – if overall you need to process events from a database and an object store, separate and simplify
  20. Cold starts are kind of an overwrought thing… typically, if you are getting run frequently enough, it’s not a problem, and if you are very infrequently getting hit, latency sensitivity is the only thing to worry about. There are tricks around that, but for the most part, do you really care about a few seconds startup if you’re only getting hit a few times a day? Lock-in however is real – the only people we hear claiming that this is a myth start with A and end with S and… that’s where the issue is. Data egress alone should be a consideration when selecting a platform. ** Also keep an eye on services you use and how you interact with them is it a standard, de facto or otherwise? is there an open API?