SlideShare ist ein Scribd-Unternehmen logo
1 von 28
Downloaden Sie, um offline zu lesen
Caching patterns
for lazy devs
for lazy loading
Luigi Fugaro
Solution Architect @Redis
More than 20 years of experience in IT.
I started my career in 1998 as a webmaster doing HTML, JavaScript,
Applets, and some graphics with Paint Shop Pro.
I then switched to Delphi, Clipper, Visual Basic, and then he finally started
working on real Java projects. I’ve been developing all kinds of web
applications, dealing with both backend and frontend frameworks.
Jumping from project to project, from company to company, in 2012 I
joined Red Hat as a consultant. An amazing experience lasted more than
7 years.
Next, I had the privilege to learn all about observability and monitoring
with Datadog working with all kind of companies.
In 2021 I received a call from Redis, a technology made in Italy, where
apps and data merge together and they enjoy it.
Luigi Fugaro
Solutions Architect
luigi.fugaro@redis.com
#VOXXEDTICINO 2
❖ Caching is everywhere
❖ Software Architecture
❖ Caching Patterns
❖ Demo
❖ Q&A
Agenda
#VOXXEDTICINO 3
Caching is everywhere
4
#VOXXEDTICINO 5
Caching is everywhere
❖ The first time I heard about cache,
it was about browser cache with
Netscape Navigator.
#VOXXEDTICINO 6
❖ The first time I heard about cache,
it was about browser cache with
Netscape Navigator.
❖ Second time for CPUs, L1&L2
Cache and Cache Mode
(Write-Back).
Caching is everywhere
#VOXXEDTICINO 7
❖ The first time I heard about cache,
it was about browser cache with
Netscape Navigator.
❖ Second time for CPUs, L1&L2 Cache
and Cache Mode (Write-Back).
❖ Third time for HTTP Server Cache
and CDN for “static-content”
(images/js/css/…).
Caching is everywhere
#VOXXEDTICINO 8
❖ The first time I heard about cache,
it was about browser cache with
Netscape Navigator.
❖ Second time for CPUs, L1&L2 Cache
and Cache Mode (Write-Back).
❖ Third time for HTTP Server Cache
and CDN for “static-content”
(images/js/css/…).
❖ Session management,
One-Time-Password, and so on…
Caching is everywhere
#VOXXEDTICINO 9
❖ The first time I heard about cache,
it was about browser cache with
Netscape Navigator.
❖ Second time for CPUs, L1&L2 Cache
and Cache Mode (Write-Back).
❖ Third time for HTTP Server Cache
and CDN for “static-content”
(images/js/css/…).
❖ Session management,
One-Time-Password, and so on…
❖ On backend, L1 Cache (session)
and L2 Cache with data access
framework such as Hibernate.
Caching is everywhere
10
Software Architecture
https://www.microservices.com/reference-architecture/
#VOXXEDTICINO 11
Software Architecture
https://martinfowler.com/articles/microservices/images/sketch.png
#VOXXEDTICINO 12
Software Architecture
https://martinfowler.com/articles/microservices/images/sketch.png
Colocated cache
#VOXXEDTICINO 13
Synching with source
Synching with source
Synching with source
Software Architecture
Colocated cache
Distributed cache
#VOXXEDTICINO 14
Synching with source
Software Architecture
15
Caching Patterns
#VOXXEDTICINO 16
Caching Patterns
❖ Cache-aside (Lazy-loading)
❖ Read-Through
❖ Write-Through
❖ Write-Behind (Write-Back)
❖ Refresh-Ahead
❖ Read-Replica
#VOXXEDTICINO 17
Caching Patterns
❖ Cache-aside (Lazy-loading)
❖ Read-Through
❖ Write-Through
❖ Write-Behind (Write-Back)
❖ Refresh-Ahead
❖ Read-Replica
#VOXXEDTICINO 18
Caching Patterns
❖ Cache-aside (Lazy-loading)
❖ Read-Through
❖ Write-Through
❖ Write-Behind (Write-Back)
❖ Refresh-Ahead
❖ Read-Replica
@Service
@CacheConfig(cacheNames={"person"})
public class PersonService {
private final PersonRepository repository;
public PersonService(PersonRepository repository) {
this.repository = repository;
}
@Cacheable(unless="#result == null")
public Optional<Person> findById(Long id) {
return repository.findById(id);
}
@Cacheable(unless="#result == null")
public List<Person> findAll() {
return repository.findAll();
}
@CachePut(key = "#result.id", unless = "#result == null")
public Person save(Person Person) {
return repository.save(Person);
}
@CacheEvict
public void deleteById(Long id) {
repository.deleteById(id);
}
@CacheEvict
public void deleteAll() {
repository.deleteAll();
}
}
#VOXXEDTICINO 19
Caching Patterns
❖ Cache-aside (Lazy-loading)
❖ Read-Through
❖ Write-Through
❖ Write-Behind (Write-Back)
❖ Refresh-Ahead
❖ Read-Replica
#VOXXEDTICINO 20
Caching Patterns
❖ Cache-aside (Lazy-loading)
❖ Read-Through
❖ Write-Through
❖ Write-Behind (Write-Back)
❖ Refresh-Ahead
❖ Read-Replica
#VOXXEDTICINO 21
Caching Patterns
❖ Cache-aside (Lazy-loading)
❖ Read-Through
❖ Write-Through
❖ Write-Behind (Write-Back)
❖ Refresh-Ahead
❖ Read-Replica
#VOXXEDTICINO 22
Caching Patterns
❖ Cache-aside (Lazy-loading)
❖ Read-Through
❖ Write-Through
❖ Write-Behind (Write-Back)
❖ Refresh-Ahead
❖ Read-Replica
#VOXXEDTICINO 23
Caching Patterns
❖ Cache-aside (Lazy-loading)
❖ Read-Through
❖ Write-Through
❖ Write-Behind (Write-Back)
❖ Refresh-Ahead
❖ Read-Replica
24
Demo
#VOXXEDTICINO 25
Demo
★ Cache Provider
redisGears
Implementation details…
❏ Serverless Engine
Q&A
#VOXXEDTICINO 27
Redis Enterprise Real-Time Data Platform
Hashes
Bitmaps
Strings
Bit field
Streams
Hyperloglog
Sorted Sets
Sets
Geospatial
Redis Core Redis Modules
Lists
Linear Scalability HA Geo-Distribution
Durability Backup & Restore Tiered-Memory Access Security
Multi-Tenant
Data Structures
BloomFilter
Search
Graph
TimeSeries
AI
JSON
Gears
Grazie!
l.fugaro@gmail.com
@foogaro
@foogaro
https:/
/www.linkedin.com/in/luigifugaro/

Weitere ähnliche Inhalte

Was ist angesagt?

Présentation de RMI Java
Présentation de RMI JavaPrésentation de RMI Java
Présentation de RMI Java
Zakaria Bouazza
 

Was ist angesagt? (20)

Confluent REST Proxy and Schema Registry (Concepts, Architecture, Features)
Confluent REST Proxy and Schema Registry (Concepts, Architecture, Features)Confluent REST Proxy and Schema Registry (Concepts, Architecture, Features)
Confluent REST Proxy and Schema Registry (Concepts, Architecture, Features)
 
Présentation de RMI Java
Présentation de RMI JavaPrésentation de RMI Java
Présentation de RMI Java
 
Introduction to TypeScript
Introduction to TypeScriptIntroduction to TypeScript
Introduction to TypeScript
 
What-is-Laravel-23-August-2017.pptx
What-is-Laravel-23-August-2017.pptxWhat-is-Laravel-23-August-2017.pptx
What-is-Laravel-23-August-2017.pptx
 
Tp1 - WS avec JAXWS
Tp1 - WS avec JAXWSTp1 - WS avec JAXWS
Tp1 - WS avec JAXWS
 
DVWA BruCON Workshop
DVWA BruCON WorkshopDVWA BruCON Workshop
DVWA BruCON Workshop
 
Pynvme introduction
Pynvme introductionPynvme introduction
Pynvme introduction
 
Domain Driven Design
Domain Driven Design Domain Driven Design
Domain Driven Design
 
Git
GitGit
Git
 
Model view controller (mvc)
Model view controller (mvc)Model view controller (mvc)
Model view controller (mvc)
 
Apache Camel v3, Camel K and Camel Quarkus
Apache Camel v3, Camel K and Camel QuarkusApache Camel v3, Camel K and Camel Quarkus
Apache Camel v3, Camel K and Camel Quarkus
 
Apache Flink Worst Practices
Apache Flink Worst PracticesApache Flink Worst Practices
Apache Flink Worst Practices
 
Java Servlets Tutorial | Introduction to Servlets | Java Certification Traini...
Java Servlets Tutorial | Introduction to Servlets | Java Certification Traini...Java Servlets Tutorial | Introduction to Servlets | Java Certification Traini...
Java Servlets Tutorial | Introduction to Servlets | Java Certification Traini...
 
WebLogic 12c & WebLogic Mgmt Pack
WebLogic 12c & WebLogic Mgmt PackWebLogic 12c & WebLogic Mgmt Pack
WebLogic 12c & WebLogic Mgmt Pack
 
Microservices and Deployment Methodologies
Microservices and Deployment MethodologiesMicroservices and Deployment Methodologies
Microservices and Deployment Methodologies
 
Android-Tp5 : web services
Android-Tp5 : web servicesAndroid-Tp5 : web services
Android-Tp5 : web services
 
Api pour les nuls
Api pour les nulsApi pour les nuls
Api pour les nuls
 
AngularJS for Beginners
AngularJS for BeginnersAngularJS for Beginners
AngularJS for Beginners
 
Apache tomcat
Apache tomcatApache tomcat
Apache tomcat
 
Intro To React Native
Intro To React NativeIntro To React Native
Intro To React Native
 

Ähnlich wie Caching Patterns for lazy devs for lazy loading - Luigi Fugaro VDTJAN23

Ähnlich wie Caching Patterns for lazy devs for lazy loading - Luigi Fugaro VDTJAN23 (20)

Machine learning in cybersecutiry
Machine learning in cybersecutiryMachine learning in cybersecutiry
Machine learning in cybersecutiry
 
Get the Exact Identity Solution You Need - In the Cloud - Overview
Get the Exact Identity Solution You Need - In the Cloud - OverviewGet the Exact Identity Solution You Need - In the Cloud - Overview
Get the Exact Identity Solution You Need - In the Cloud - Overview
 
Enjoying the full stack - Frontend 2010
Enjoying the full stack - Frontend 2010Enjoying the full stack - Frontend 2010
Enjoying the full stack - Frontend 2010
 
Mobile Web Application Development (An Insight)
Mobile Web Application Development (An Insight)Mobile Web Application Development (An Insight)
Mobile Web Application Development (An Insight)
 
Developer's Guide to JavaScript and Web Cryptography
Developer's Guide to JavaScript and Web CryptographyDeveloper's Guide to JavaScript and Web Cryptography
Developer's Guide to JavaScript and Web Cryptography
 
AstroLabs_Academy_Learning_to_Code-Coding_Bootcamp_Day1.pdf
AstroLabs_Academy_Learning_to_Code-Coding_Bootcamp_Day1.pdfAstroLabs_Academy_Learning_to_Code-Coding_Bootcamp_Day1.pdf
AstroLabs_Academy_Learning_to_Code-Coding_Bootcamp_Day1.pdf
 
DockerCon EU 2015: Day 1 General Session
DockerCon EU 2015: Day 1 General SessionDockerCon EU 2015: Day 1 General Session
DockerCon EU 2015: Day 1 General Session
 
Docker - Der Wal in der Kiste
Docker - Der Wal in der KisteDocker - Der Wal in der Kiste
Docker - Der Wal in der Kiste
 
Html5 workshop part 1
Html5 workshop part 1Html5 workshop part 1
Html5 workshop part 1
 
Cloud-Native .Net des applications containerisées .Net sur Linux, Windows e...
 Cloud-Native .Net des applications containerisées .Net sur Linux, Windows e... Cloud-Native .Net des applications containerisées .Net sur Linux, Windows e...
Cloud-Native .Net des applications containerisées .Net sur Linux, Windows e...
 
Web summit.pptx
Web summit.pptxWeb summit.pptx
Web summit.pptx
 
Apache Flex and the imperfect Web
Apache Flex and the imperfect WebApache Flex and the imperfect Web
Apache Flex and the imperfect Web
 
Docker in development (Story)
Docker in development (Story)Docker in development (Story)
Docker in development (Story)
 
DevCon5 (July 2014) - Acision SDK
DevCon5 (July 2014) - Acision SDKDevCon5 (July 2014) - Acision SDK
DevCon5 (July 2014) - Acision SDK
 
ITKonekt 2023: The Busy Platform Engineers Guide to API Gateways
ITKonekt 2023: The Busy Platform Engineers Guide to API GatewaysITKonekt 2023: The Busy Platform Engineers Guide to API Gateways
ITKonekt 2023: The Busy Platform Engineers Guide to API Gateways
 
susanta_resume
susanta_resumesusanta_resume
susanta_resume
 
resume
resumeresume
resume
 
TechDayConf Edition 1 - 2020
TechDayConf Edition 1 -  2020TechDayConf Edition 1 -  2020
TechDayConf Edition 1 - 2020
 
VUC 24-May-2013 - Crocodile
VUC 24-May-2013 - CrocodileVUC 24-May-2013 - Crocodile
VUC 24-May-2013 - Crocodile
 
Front End Development | Introduction
Front End Development | IntroductionFront End Development | Introduction
Front End Development | Introduction
 

Mehr von Luigi Fugaro

Mehr von Luigi Fugaro (10)

Ottimizzare le performance dell'API Server K8s come utilizzare cache e eventi...
Ottimizzare le performance dell'API Server K8s come utilizzare cache e eventi...Ottimizzare le performance dell'API Server K8s come utilizzare cache e eventi...
Ottimizzare le performance dell'API Server K8s come utilizzare cache e eventi...
 
Sharp Coding 2023 - Luigi Fugaro - ACRE.pdf
Sharp Coding 2023 - Luigi Fugaro - ACRE.pdfSharp Coding 2023 - Luigi Fugaro - ACRE.pdf
Sharp Coding 2023 - Luigi Fugaro - ACRE.pdf
 
Red Hat Summit Connect 2023 - Redis Enterprise, the engine of Generative AI
Red Hat Summit Connect 2023 - Redis Enterprise, the engine of Generative AIRed Hat Summit Connect 2023 - Redis Enterprise, the engine of Generative AI
Red Hat Summit Connect 2023 - Redis Enterprise, the engine of Generative AI
 
Unleashing the Power of Vector Search in .NET - DotNETConf2024.pdf
Unleashing the Power of Vector Search in .NET - DotNETConf2024.pdfUnleashing the Power of Vector Search in .NET - DotNETConf2024.pdf
Unleashing the Power of Vector Search in .NET - DotNETConf2024.pdf
 
Unleashing the Power of Vector Search in .NET - SharpCoding2024.pdf
Unleashing the Power of Vector Search in .NET - SharpCoding2024.pdfUnleashing the Power of Vector Search in .NET - SharpCoding2024.pdf
Unleashing the Power of Vector Search in .NET - SharpCoding2024.pdf
 
Codemotion Milan '22 - Real Time Data - No CRDTs, no party!
Codemotion Milan '22 - Real Time Data - No CRDTs, no party!Codemotion Milan '22 - Real Time Data - No CRDTs, no party!
Codemotion Milan '22 - Real Time Data - No CRDTs, no party!
 
OpenSlava 2018 - Cloud Native Applications with OpenShift
OpenSlava 2018 - Cloud Native Applications with OpenShiftOpenSlava 2018 - Cloud Native Applications with OpenShift
OpenSlava 2018 - Cloud Native Applications with OpenShift
 
Redis - Non solo cache
Redis - Non solo cacheRedis - Non solo cache
Redis - Non solo cache
 
JDV for Codemotion Rome 2017
JDV for Codemotion Rome 2017JDV for Codemotion Rome 2017
JDV for Codemotion Rome 2017
 
2.5tier Javaday (italian)
2.5tier Javaday (italian)2.5tier Javaday (italian)
2.5tier Javaday (italian)
 

Kürzlich hochgeladen

Simplify hybrid data integration at an enterprise scale. Integrate all your d...
Simplify hybrid data integration at an enterprise scale. Integrate all your d...Simplify hybrid data integration at an enterprise scale. Integrate all your d...
Simplify hybrid data integration at an enterprise scale. Integrate all your d...
varanasisatyanvesh
 
如何办理澳洲拉筹伯大学毕业证(LaTrobe毕业证书)成绩单原件一模一样
如何办理澳洲拉筹伯大学毕业证(LaTrobe毕业证书)成绩单原件一模一样如何办理澳洲拉筹伯大学毕业证(LaTrobe毕业证书)成绩单原件一模一样
如何办理澳洲拉筹伯大学毕业证(LaTrobe毕业证书)成绩单原件一模一样
wsppdmt
 
Abortion pills in Riyadh Saudi Arabia| +966572737505 | Get Cytotec, Unwanted Kit
Abortion pills in Riyadh Saudi Arabia| +966572737505 | Get Cytotec, Unwanted KitAbortion pills in Riyadh Saudi Arabia| +966572737505 | Get Cytotec, Unwanted Kit
Abortion pills in Riyadh Saudi Arabia| +966572737505 | Get Cytotec, Unwanted Kit
Abortion pills in Riyadh +966572737505 get cytotec
 
如何办理英国诺森比亚大学毕业证(NU毕业证书)成绩单原件一模一样
如何办理英国诺森比亚大学毕业证(NU毕业证书)成绩单原件一模一样如何办理英国诺森比亚大学毕业证(NU毕业证书)成绩单原件一模一样
如何办理英国诺森比亚大学毕业证(NU毕业证书)成绩单原件一模一样
wsppdmt
 
In Riyadh ((+919101817206)) Cytotec kit @ Abortion Pills Saudi Arabia
In Riyadh ((+919101817206)) Cytotec kit @ Abortion Pills Saudi ArabiaIn Riyadh ((+919101817206)) Cytotec kit @ Abortion Pills Saudi Arabia
In Riyadh ((+919101817206)) Cytotec kit @ Abortion Pills Saudi Arabia
ahmedjiabur940
 
Abortion pills in Riyadh Saudi Arabia (+966572737505 buy cytotec
Abortion pills in Riyadh Saudi Arabia (+966572737505 buy cytotecAbortion pills in Riyadh Saudi Arabia (+966572737505 buy cytotec
Abortion pills in Riyadh Saudi Arabia (+966572737505 buy cytotec
Abortion pills in Riyadh +966572737505 get cytotec
 
一比一原版(曼大毕业证书)曼尼托巴大学毕业证成绩单留信学历认证一手价格
一比一原版(曼大毕业证书)曼尼托巴大学毕业证成绩单留信学历认证一手价格一比一原版(曼大毕业证书)曼尼托巴大学毕业证成绩单留信学历认证一手价格
一比一原版(曼大毕业证书)曼尼托巴大学毕业证成绩单留信学历认证一手价格
q6pzkpark
 
sourabh vyas1222222222222222222244444444
sourabh vyas1222222222222222222244444444sourabh vyas1222222222222222222244444444
sourabh vyas1222222222222222222244444444
saurabvyas476
 
如何办理(WashU毕业证书)圣路易斯华盛顿大学毕业证成绩单本科硕士学位证留信学历认证
如何办理(WashU毕业证书)圣路易斯华盛顿大学毕业证成绩单本科硕士学位证留信学历认证如何办理(WashU毕业证书)圣路易斯华盛顿大学毕业证成绩单本科硕士学位证留信学历认证
如何办理(WashU毕业证书)圣路易斯华盛顿大学毕业证成绩单本科硕士学位证留信学历认证
acoha1
 
bams-3rd-case-presentation-scabies-12-05-2020.pptx
bams-3rd-case-presentation-scabies-12-05-2020.pptxbams-3rd-case-presentation-scabies-12-05-2020.pptx
bams-3rd-case-presentation-scabies-12-05-2020.pptx
JocylDuran
 
Abortion Clinic in Kempton Park +27791653574 WhatsApp Abortion Clinic Service...
Abortion Clinic in Kempton Park +27791653574 WhatsApp Abortion Clinic Service...Abortion Clinic in Kempton Park +27791653574 WhatsApp Abortion Clinic Service...
Abortion Clinic in Kempton Park +27791653574 WhatsApp Abortion Clinic Service...
mikehavy0
 

Kürzlich hochgeladen (20)

Simplify hybrid data integration at an enterprise scale. Integrate all your d...
Simplify hybrid data integration at an enterprise scale. Integrate all your d...Simplify hybrid data integration at an enterprise scale. Integrate all your d...
Simplify hybrid data integration at an enterprise scale. Integrate all your d...
 
DAA Assignment Solution.pdf is the best1
DAA Assignment Solution.pdf is the best1DAA Assignment Solution.pdf is the best1
DAA Assignment Solution.pdf is the best1
 
如何办理澳洲拉筹伯大学毕业证(LaTrobe毕业证书)成绩单原件一模一样
如何办理澳洲拉筹伯大学毕业证(LaTrobe毕业证书)成绩单原件一模一样如何办理澳洲拉筹伯大学毕业证(LaTrobe毕业证书)成绩单原件一模一样
如何办理澳洲拉筹伯大学毕业证(LaTrobe毕业证书)成绩单原件一模一样
 
Aggregations - The Elasticsearch "GROUP BY"
Aggregations - The Elasticsearch "GROUP BY"Aggregations - The Elasticsearch "GROUP BY"
Aggregations - The Elasticsearch "GROUP BY"
 
Abortion pills in Riyadh Saudi Arabia| +966572737505 | Get Cytotec, Unwanted Kit
Abortion pills in Riyadh Saudi Arabia| +966572737505 | Get Cytotec, Unwanted KitAbortion pills in Riyadh Saudi Arabia| +966572737505 | Get Cytotec, Unwanted Kit
Abortion pills in Riyadh Saudi Arabia| +966572737505 | Get Cytotec, Unwanted Kit
 
如何办理英国诺森比亚大学毕业证(NU毕业证书)成绩单原件一模一样
如何办理英国诺森比亚大学毕业证(NU毕业证书)成绩单原件一模一样如何办理英国诺森比亚大学毕业证(NU毕业证书)成绩单原件一模一样
如何办理英国诺森比亚大学毕业证(NU毕业证书)成绩单原件一模一样
 
In Riyadh ((+919101817206)) Cytotec kit @ Abortion Pills Saudi Arabia
In Riyadh ((+919101817206)) Cytotec kit @ Abortion Pills Saudi ArabiaIn Riyadh ((+919101817206)) Cytotec kit @ Abortion Pills Saudi Arabia
In Riyadh ((+919101817206)) Cytotec kit @ Abortion Pills Saudi Arabia
 
Unsatisfied Bhabhi ℂall Girls Vadodara Book Esha 7427069034 Top Class ℂall Gi...
Unsatisfied Bhabhi ℂall Girls Vadodara Book Esha 7427069034 Top Class ℂall Gi...Unsatisfied Bhabhi ℂall Girls Vadodara Book Esha 7427069034 Top Class ℂall Gi...
Unsatisfied Bhabhi ℂall Girls Vadodara Book Esha 7427069034 Top Class ℂall Gi...
 
Case Study 4 Where the cry of rebellion happen?
Case Study 4 Where the cry of rebellion happen?Case Study 4 Where the cry of rebellion happen?
Case Study 4 Where the cry of rebellion happen?
 
Abortion pills in Riyadh Saudi Arabia (+966572737505 buy cytotec
Abortion pills in Riyadh Saudi Arabia (+966572737505 buy cytotecAbortion pills in Riyadh Saudi Arabia (+966572737505 buy cytotec
Abortion pills in Riyadh Saudi Arabia (+966572737505 buy cytotec
 
Jual Obat Aborsi Bandung (Asli No.1) Wa 082134680322 Klinik Obat Penggugur Ka...
Jual Obat Aborsi Bandung (Asli No.1) Wa 082134680322 Klinik Obat Penggugur Ka...Jual Obat Aborsi Bandung (Asli No.1) Wa 082134680322 Klinik Obat Penggugur Ka...
Jual Obat Aborsi Bandung (Asli No.1) Wa 082134680322 Klinik Obat Penggugur Ka...
 
一比一原版(曼大毕业证书)曼尼托巴大学毕业证成绩单留信学历认证一手价格
一比一原版(曼大毕业证书)曼尼托巴大学毕业证成绩单留信学历认证一手价格一比一原版(曼大毕业证书)曼尼托巴大学毕业证成绩单留信学历认证一手价格
一比一原版(曼大毕业证书)曼尼托巴大学毕业证成绩单留信学历认证一手价格
 
DATA SUMMIT 24 Building Real-Time Pipelines With FLaNK
DATA SUMMIT 24  Building Real-Time Pipelines With FLaNKDATA SUMMIT 24  Building Real-Time Pipelines With FLaNK
DATA SUMMIT 24 Building Real-Time Pipelines With FLaNK
 
sourabh vyas1222222222222222222244444444
sourabh vyas1222222222222222222244444444sourabh vyas1222222222222222222244444444
sourabh vyas1222222222222222222244444444
 
如何办理(WashU毕业证书)圣路易斯华盛顿大学毕业证成绩单本科硕士学位证留信学历认证
如何办理(WashU毕业证书)圣路易斯华盛顿大学毕业证成绩单本科硕士学位证留信学历认证如何办理(WashU毕业证书)圣路易斯华盛顿大学毕业证成绩单本科硕士学位证留信学历认证
如何办理(WashU毕业证书)圣路易斯华盛顿大学毕业证成绩单本科硕士学位证留信学历认证
 
bams-3rd-case-presentation-scabies-12-05-2020.pptx
bams-3rd-case-presentation-scabies-12-05-2020.pptxbams-3rd-case-presentation-scabies-12-05-2020.pptx
bams-3rd-case-presentation-scabies-12-05-2020.pptx
 
How to Transform Clinical Trial Management with Advanced Data Analytics
How to Transform Clinical Trial Management with Advanced Data AnalyticsHow to Transform Clinical Trial Management with Advanced Data Analytics
How to Transform Clinical Trial Management with Advanced Data Analytics
 
Ranking and Scoring Exercises for Research
Ranking and Scoring Exercises for ResearchRanking and Scoring Exercises for Research
Ranking and Scoring Exercises for Research
 
Abortion Clinic in Kempton Park +27791653574 WhatsApp Abortion Clinic Service...
Abortion Clinic in Kempton Park +27791653574 WhatsApp Abortion Clinic Service...Abortion Clinic in Kempton Park +27791653574 WhatsApp Abortion Clinic Service...
Abortion Clinic in Kempton Park +27791653574 WhatsApp Abortion Clinic Service...
 
RESEARCH-FINAL-DEFENSE-PPT-TEMPLATE.pptx
RESEARCH-FINAL-DEFENSE-PPT-TEMPLATE.pptxRESEARCH-FINAL-DEFENSE-PPT-TEMPLATE.pptx
RESEARCH-FINAL-DEFENSE-PPT-TEMPLATE.pptx
 

Caching Patterns for lazy devs for lazy loading - Luigi Fugaro VDTJAN23

  • 1. Caching patterns for lazy devs for lazy loading Luigi Fugaro Solution Architect @Redis
  • 2. More than 20 years of experience in IT. I started my career in 1998 as a webmaster doing HTML, JavaScript, Applets, and some graphics with Paint Shop Pro. I then switched to Delphi, Clipper, Visual Basic, and then he finally started working on real Java projects. I’ve been developing all kinds of web applications, dealing with both backend and frontend frameworks. Jumping from project to project, from company to company, in 2012 I joined Red Hat as a consultant. An amazing experience lasted more than 7 years. Next, I had the privilege to learn all about observability and monitoring with Datadog working with all kind of companies. In 2021 I received a call from Redis, a technology made in Italy, where apps and data merge together and they enjoy it. Luigi Fugaro Solutions Architect luigi.fugaro@redis.com #VOXXEDTICINO 2
  • 3. ❖ Caching is everywhere ❖ Software Architecture ❖ Caching Patterns ❖ Demo ❖ Q&A Agenda #VOXXEDTICINO 3
  • 5. #VOXXEDTICINO 5 Caching is everywhere ❖ The first time I heard about cache, it was about browser cache with Netscape Navigator.
  • 6. #VOXXEDTICINO 6 ❖ The first time I heard about cache, it was about browser cache with Netscape Navigator. ❖ Second time for CPUs, L1&L2 Cache and Cache Mode (Write-Back). Caching is everywhere
  • 7. #VOXXEDTICINO 7 ❖ The first time I heard about cache, it was about browser cache with Netscape Navigator. ❖ Second time for CPUs, L1&L2 Cache and Cache Mode (Write-Back). ❖ Third time for HTTP Server Cache and CDN for “static-content” (images/js/css/…). Caching is everywhere
  • 8. #VOXXEDTICINO 8 ❖ The first time I heard about cache, it was about browser cache with Netscape Navigator. ❖ Second time for CPUs, L1&L2 Cache and Cache Mode (Write-Back). ❖ Third time for HTTP Server Cache and CDN for “static-content” (images/js/css/…). ❖ Session management, One-Time-Password, and so on… Caching is everywhere
  • 9. #VOXXEDTICINO 9 ❖ The first time I heard about cache, it was about browser cache with Netscape Navigator. ❖ Second time for CPUs, L1&L2 Cache and Cache Mode (Write-Back). ❖ Third time for HTTP Server Cache and CDN for “static-content” (images/js/css/…). ❖ Session management, One-Time-Password, and so on… ❖ On backend, L1 Cache (session) and L2 Cache with data access framework such as Hibernate. Caching is everywhere
  • 13. Colocated cache #VOXXEDTICINO 13 Synching with source Synching with source Synching with source Software Architecture
  • 14. Colocated cache Distributed cache #VOXXEDTICINO 14 Synching with source Software Architecture
  • 16. #VOXXEDTICINO 16 Caching Patterns ❖ Cache-aside (Lazy-loading) ❖ Read-Through ❖ Write-Through ❖ Write-Behind (Write-Back) ❖ Refresh-Ahead ❖ Read-Replica
  • 17. #VOXXEDTICINO 17 Caching Patterns ❖ Cache-aside (Lazy-loading) ❖ Read-Through ❖ Write-Through ❖ Write-Behind (Write-Back) ❖ Refresh-Ahead ❖ Read-Replica
  • 18. #VOXXEDTICINO 18 Caching Patterns ❖ Cache-aside (Lazy-loading) ❖ Read-Through ❖ Write-Through ❖ Write-Behind (Write-Back) ❖ Refresh-Ahead ❖ Read-Replica @Service @CacheConfig(cacheNames={"person"}) public class PersonService { private final PersonRepository repository; public PersonService(PersonRepository repository) { this.repository = repository; } @Cacheable(unless="#result == null") public Optional<Person> findById(Long id) { return repository.findById(id); } @Cacheable(unless="#result == null") public List<Person> findAll() { return repository.findAll(); } @CachePut(key = "#result.id", unless = "#result == null") public Person save(Person Person) { return repository.save(Person); } @CacheEvict public void deleteById(Long id) { repository.deleteById(id); } @CacheEvict public void deleteAll() { repository.deleteAll(); } }
  • 19. #VOXXEDTICINO 19 Caching Patterns ❖ Cache-aside (Lazy-loading) ❖ Read-Through ❖ Write-Through ❖ Write-Behind (Write-Back) ❖ Refresh-Ahead ❖ Read-Replica
  • 20. #VOXXEDTICINO 20 Caching Patterns ❖ Cache-aside (Lazy-loading) ❖ Read-Through ❖ Write-Through ❖ Write-Behind (Write-Back) ❖ Refresh-Ahead ❖ Read-Replica
  • 21. #VOXXEDTICINO 21 Caching Patterns ❖ Cache-aside (Lazy-loading) ❖ Read-Through ❖ Write-Through ❖ Write-Behind (Write-Back) ❖ Refresh-Ahead ❖ Read-Replica
  • 22. #VOXXEDTICINO 22 Caching Patterns ❖ Cache-aside (Lazy-loading) ❖ Read-Through ❖ Write-Through ❖ Write-Behind (Write-Back) ❖ Refresh-Ahead ❖ Read-Replica
  • 23. #VOXXEDTICINO 23 Caching Patterns ❖ Cache-aside (Lazy-loading) ❖ Read-Through ❖ Write-Through ❖ Write-Behind (Write-Back) ❖ Refresh-Ahead ❖ Read-Replica
  • 25. #VOXXEDTICINO 25 Demo ★ Cache Provider redisGears Implementation details… ❏ Serverless Engine
  • 26. Q&A
  • 27. #VOXXEDTICINO 27 Redis Enterprise Real-Time Data Platform Hashes Bitmaps Strings Bit field Streams Hyperloglog Sorted Sets Sets Geospatial Redis Core Redis Modules Lists Linear Scalability HA Geo-Distribution Durability Backup & Restore Tiered-Memory Access Security Multi-Tenant Data Structures BloomFilter Search Graph TimeSeries AI JSON Gears