SlideShare uma empresa Scribd logo
1 de 17
-Hariharan Anantharaman
Architect,Cognizant Technology Solutions
Founder, Hobbyshopindia.com
Hariharan.anantharaman@gmail.com
 Get/Access the resource or Data once, use
multiple times
 Frequently used strategy to improve
performance
 Approach is language independent
 Architecture and Design decision.
 Multiple options available at multiple layers
JUG-Chennai 2
JUG-Chennai 3
 Serializable Java Objects
 Stored In-Memory or File based
 Key – Value Pairs
 Scale of the Application determines the
solution
JUG-Chennai 4
 Static Data
◦ State List
◦ Countries List
 Pseudo Static Data
◦ Catalog Data
◦ Exchange Rate
 Context Specific Data
◦ User Profile Data
◦ Session Specific Data
◦ Data From external Systems
Different Needs, Different
Solutions
JUG-Chennai 5
Determining Factors
• TTL (Time to Live)
• Frequency of Access
• Frequency of Update
• Deployment Architecture
• Scalability of the systems
• Object Size
• Heap Memory Availability
JUG-Chennai 6
 HashMaps
 Session Objects
 Localized On-Memory Cache
 Intra cluster Distributed Cache (Replicated Cache)
 Global Distributed Cache
 JSR 107 has been conceptualized and released on 18 March
2014 replicated cache
JUG-Chennai 7
Things to be Considered
• Clustered Environments
• Session Replication
• Distributed Servers
• Failover Scenarios
• Object Replication, Garbage Collection
• Effective Memory Utilization
 ICacheManager
 CaCheManagerImpl
 put(Key ,Value)
 get(Key )
 replace(Key ,Value)
 delete(Key )
JUG-Chennai 8
 Number of parallel sessions
 Available Heap memory
 Average Session Duration
 Number of Global objects to be stored in
Cache
 Number of transaction specific objects to be
stored in Cache
 Size of objects to be stored in Cache
JUG-Chennai 9
 Profiler Tool
 Java.lang.instrument.Instrumentation
Cache Population Strategies
 Eager Fetch
 Lazy Load
JUG-Chennai 10
Open Source/Free
 EhCache
 JCS
 JBossCache
 MemaCache
JUG-Chennai 11
Commercial/Properiatery Solutions
• TerraCotta BigMemorys
• IBM Dynacache(Shipped with Websphere)
• IBM Extreme Scale
 Maximum Memory
 Purge Strategy
 Reload
 Scheduled Cache Expiry
 Algorithm for removing item from
Cache(LRU,FIFO),MRU,Last Access Time etc
 Object size based cache Removal
JUG-Chennai 12
 High performance Distributed memory object caching system
 Memacache consists of two parts
◦ Memacache Server. Separate process running in same
machine as server or running in different machine
◦ Memacache Client. Used by Client applications. Langauage
specific client jars are available to work with Memacache
JUG-Chennai 13
JUG-Chennai 14
 Predominantly based on Memacache
 Available with all major cloud providers
 Provides easy scalability, recovery etc
JUG-Chennai 15
 Based Upon Memache or
Redis
 Cache clusters consists of
multiple cache nodes.
 Configured from AWS
mgmt console or tools
 Redis-
◦ A popular open-source
in-memory key-value
store that supports data
structures such as sorted
sets and lists.
◦ ElastiCache supports
Redis master / slave
replication which can be
used to achieve cross AZ
redundancy.
JUG-Chennai 16
 Provides Two Types of Cache
◦ In-Context Cache
 Available only for the duration of single HTTP Request
 Data is present in memory
◦ Memacache
 Default and Enabled for All applications
 Faster than datastore, slower than In-context cache
 By default, a nontransactional context caches all entities in
memcache.
 Memcache does not support transactions
 When DB is updated, it needs to be updated explicitly in
Memacache
JUG-Chennai 17

Mais conteúdo relacionado

Mais procurados

AWS 기반의 마이크로 서비스 아키텍쳐 구현 방안 :: 김필중 :: AWS Summit Seoul 20
AWS 기반의 마이크로 서비스 아키텍쳐 구현 방안 :: 김필중 :: AWS Summit Seoul 20AWS 기반의 마이크로 서비스 아키텍쳐 구현 방안 :: 김필중 :: AWS Summit Seoul 20
AWS 기반의 마이크로 서비스 아키텍쳐 구현 방안 :: 김필중 :: AWS Summit Seoul 20Amazon Web Services Korea
 
AWS load balancers deep dive-AWSKRUG
AWS load balancers deep dive-AWSKRUGAWS load balancers deep dive-AWSKRUG
AWS load balancers deep dive-AWSKRUGha suyoung
 
AWS CloudFront 가속 및 DDoS 방어
AWS CloudFront 가속 및 DDoS 방어AWS CloudFront 가속 및 DDoS 방어
AWS CloudFront 가속 및 DDoS 방어Kyle(KY) Yang
 
devops 2년차 이직 성공기.pptx
devops 2년차 이직 성공기.pptxdevops 2년차 이직 성공기.pptx
devops 2년차 이직 성공기.pptxByungho Lee
 
[오픈소스컨설팅] jira service desk 201908
[오픈소스컨설팅] jira service desk 201908[오픈소스컨설팅] jira service desk 201908
[오픈소스컨설팅] jira service desk 201908Open Source Consulting
 
Best Practice-React
Best Practice-ReactBest Practice-React
Best Practice-ReactYang Yang
 
Microservices, Node, Dapr and more - Part One (Fontys Hogeschool, Spring 2022)
Microservices, Node, Dapr and more - Part One (Fontys Hogeschool, Spring 2022)Microservices, Node, Dapr and more - Part One (Fontys Hogeschool, Spring 2022)
Microservices, Node, Dapr and more - Part One (Fontys Hogeschool, Spring 2022)Lucas Jellema
 
AWS와 함께 하는 클라우드 컴퓨팅 - 홍민우 AWS 매니저
AWS와 함께 하는 클라우드 컴퓨팅 - 홍민우 AWS 매니저AWS와 함께 하는 클라우드 컴퓨팅 - 홍민우 AWS 매니저
AWS와 함께 하는 클라우드 컴퓨팅 - 홍민우 AWS 매니저Amazon Web Services Korea
 
Entity Framework Core
Entity Framework CoreEntity Framework Core
Entity Framework CoreKiran Shahi
 
AWS Fargate와 Amazon ECS를 활용한 CI/CD 모범사례 - 유재석, AWS 솔루션즈 아키텍트 :: AWS Game Mast...
AWS Fargate와 Amazon ECS를 활용한 CI/CD 모범사례 - 유재석, AWS 솔루션즈 아키텍트 :: AWS Game Mast...AWS Fargate와 Amazon ECS를 활용한 CI/CD 모범사례 - 유재석, AWS 솔루션즈 아키텍트 :: AWS Game Mast...
AWS Fargate와 Amazon ECS를 활용한 CI/CD 모범사례 - 유재석, AWS 솔루션즈 아키텍트 :: AWS Game Mast...Amazon Web Services Korea
 
[Pgday.Seoul 2021] 1. 예제로 살펴보는 포스트그레스큐엘의 독특한 SQL
[Pgday.Seoul 2021] 1. 예제로 살펴보는 포스트그레스큐엘의 독특한 SQL[Pgday.Seoul 2021] 1. 예제로 살펴보는 포스트그레스큐엘의 독특한 SQL
[Pgday.Seoul 2021] 1. 예제로 살펴보는 포스트그레스큐엘의 독특한 SQLPgDay.Seoul
 
Understanding MicroSERVICE Architecture with Java & Spring Boot
Understanding MicroSERVICE Architecture with Java & Spring BootUnderstanding MicroSERVICE Architecture with Java & Spring Boot
Understanding MicroSERVICE Architecture with Java & Spring BootKashif Ali Siddiqui
 
Amazon ECS를 통한 도커 기반 콘테이너 서비스 구축하기 - AWS Summit Seoul 2017
Amazon ECS를 통한 도커 기반 콘테이너 서비스 구축하기 - AWS Summit Seoul 2017Amazon ECS를 통한 도커 기반 콘테이너 서비스 구축하기 - AWS Summit Seoul 2017
Amazon ECS를 통한 도커 기반 콘테이너 서비스 구축하기 - AWS Summit Seoul 2017Amazon Web Services Korea
 
Dependency injection presentation
Dependency injection presentationDependency injection presentation
Dependency injection presentationAhasanul Kalam Akib
 
MongoDB performance
MongoDB performanceMongoDB performance
MongoDB performanceMydbops
 
AWS 에서 DevOps 시작하기 – 정영준, AWS 솔루션즈 아키텍트:: AWS Builders Online Series
AWS 에서 DevOps 시작하기 – 정영준, AWS 솔루션즈 아키텍트:: AWS Builders Online Series AWS 에서 DevOps 시작하기 – 정영준, AWS 솔루션즈 아키텍트:: AWS Builders Online Series
AWS 에서 DevOps 시작하기 – 정영준, AWS 솔루션즈 아키텍트:: AWS Builders Online Series Amazon Web Services Korea
 
서버리스 앱 배포 자동화 (김필중, AWS 솔루션즈 아키텍트) :: AWS DevDay2018
서버리스 앱 배포 자동화 (김필중, AWS 솔루션즈 아키텍트) :: AWS DevDay2018서버리스 앱 배포 자동화 (김필중, AWS 솔루션즈 아키텍트) :: AWS DevDay2018
서버리스 앱 배포 자동화 (김필중, AWS 솔루션즈 아키텍트) :: AWS DevDay2018Amazon Web Services Korea
 

Mais procurados (20)

AWS 기반의 마이크로 서비스 아키텍쳐 구현 방안 :: 김필중 :: AWS Summit Seoul 20
AWS 기반의 마이크로 서비스 아키텍쳐 구현 방안 :: 김필중 :: AWS Summit Seoul 20AWS 기반의 마이크로 서비스 아키텍쳐 구현 방안 :: 김필중 :: AWS Summit Seoul 20
AWS 기반의 마이크로 서비스 아키텍쳐 구현 방안 :: 김필중 :: AWS Summit Seoul 20
 
AWS load balancers deep dive-AWSKRUG
AWS load balancers deep dive-AWSKRUGAWS load balancers deep dive-AWSKRUG
AWS load balancers deep dive-AWSKRUG
 
AWS CloudFront 가속 및 DDoS 방어
AWS CloudFront 가속 및 DDoS 방어AWS CloudFront 가속 및 DDoS 방어
AWS CloudFront 가속 및 DDoS 방어
 
devops 2년차 이직 성공기.pptx
devops 2년차 이직 성공기.pptxdevops 2년차 이직 성공기.pptx
devops 2년차 이직 성공기.pptx
 
[오픈소스컨설팅] jira service desk 201908
[오픈소스컨설팅] jira service desk 201908[오픈소스컨설팅] jira service desk 201908
[오픈소스컨설팅] jira service desk 201908
 
Oracle on AWS RDS Migration - 성기명
Oracle on AWS RDS Migration - 성기명Oracle on AWS RDS Migration - 성기명
Oracle on AWS RDS Migration - 성기명
 
Best Practice-React
Best Practice-ReactBest Practice-React
Best Practice-React
 
Microservices, Node, Dapr and more - Part One (Fontys Hogeschool, Spring 2022)
Microservices, Node, Dapr and more - Part One (Fontys Hogeschool, Spring 2022)Microservices, Node, Dapr and more - Part One (Fontys Hogeschool, Spring 2022)
Microservices, Node, Dapr and more - Part One (Fontys Hogeschool, Spring 2022)
 
AWS와 함께 하는 클라우드 컴퓨팅 - 홍민우 AWS 매니저
AWS와 함께 하는 클라우드 컴퓨팅 - 홍민우 AWS 매니저AWS와 함께 하는 클라우드 컴퓨팅 - 홍민우 AWS 매니저
AWS와 함께 하는 클라우드 컴퓨팅 - 홍민우 AWS 매니저
 
Entity Framework Core
Entity Framework CoreEntity Framework Core
Entity Framework Core
 
AWS Fargate on EKS 실전 사용하기
AWS Fargate on EKS 실전 사용하기AWS Fargate on EKS 실전 사용하기
AWS Fargate on EKS 실전 사용하기
 
AWS Fargate와 Amazon ECS를 활용한 CI/CD 모범사례 - 유재석, AWS 솔루션즈 아키텍트 :: AWS Game Mast...
AWS Fargate와 Amazon ECS를 활용한 CI/CD 모범사례 - 유재석, AWS 솔루션즈 아키텍트 :: AWS Game Mast...AWS Fargate와 Amazon ECS를 활용한 CI/CD 모범사례 - 유재석, AWS 솔루션즈 아키텍트 :: AWS Game Mast...
AWS Fargate와 Amazon ECS를 활용한 CI/CD 모범사례 - 유재석, AWS 솔루션즈 아키텍트 :: AWS Game Mast...
 
[Pgday.Seoul 2021] 1. 예제로 살펴보는 포스트그레스큐엘의 독특한 SQL
[Pgday.Seoul 2021] 1. 예제로 살펴보는 포스트그레스큐엘의 독특한 SQL[Pgday.Seoul 2021] 1. 예제로 살펴보는 포스트그레스큐엘의 독특한 SQL
[Pgday.Seoul 2021] 1. 예제로 살펴보는 포스트그레스큐엘의 독특한 SQL
 
Understanding MicroSERVICE Architecture with Java & Spring Boot
Understanding MicroSERVICE Architecture with Java & Spring BootUnderstanding MicroSERVICE Architecture with Java & Spring Boot
Understanding MicroSERVICE Architecture with Java & Spring Boot
 
Amazon ECS를 통한 도커 기반 콘테이너 서비스 구축하기 - AWS Summit Seoul 2017
Amazon ECS를 통한 도커 기반 콘테이너 서비스 구축하기 - AWS Summit Seoul 2017Amazon ECS를 통한 도커 기반 콘테이너 서비스 구축하기 - AWS Summit Seoul 2017
Amazon ECS를 통한 도커 기반 콘테이너 서비스 구축하기 - AWS Summit Seoul 2017
 
Dependency injection presentation
Dependency injection presentationDependency injection presentation
Dependency injection presentation
 
MongoDB performance
MongoDB performanceMongoDB performance
MongoDB performance
 
Introduction to AWS Glue
Introduction to AWS Glue Introduction to AWS Glue
Introduction to AWS Glue
 
AWS 에서 DevOps 시작하기 – 정영준, AWS 솔루션즈 아키텍트:: AWS Builders Online Series
AWS 에서 DevOps 시작하기 – 정영준, AWS 솔루션즈 아키텍트:: AWS Builders Online Series AWS 에서 DevOps 시작하기 – 정영준, AWS 솔루션즈 아키텍트:: AWS Builders Online Series
AWS 에서 DevOps 시작하기 – 정영준, AWS 솔루션즈 아키텍트:: AWS Builders Online Series
 
서버리스 앱 배포 자동화 (김필중, AWS 솔루션즈 아키텍트) :: AWS DevDay2018
서버리스 앱 배포 자동화 (김필중, AWS 솔루션즈 아키텍트) :: AWS DevDay2018서버리스 앱 배포 자동화 (김필중, AWS 솔루션즈 아키텍트) :: AWS DevDay2018
서버리스 앱 배포 자동화 (김필중, AWS 솔루션즈 아키텍트) :: AWS DevDay2018
 

Semelhante a Caching In Java- Best Practises and Pitfalls

Caching technology comparison
Caching technology comparisonCaching technology comparison
Caching technology comparisonRohit Kelapure
 
Overview of the ehcache
Overview of the ehcacheOverview of the ehcache
Overview of the ehcacheHyeonSeok Choi
 
Caching principles-solutions
Caching principles-solutionsCaching principles-solutions
Caching principles-solutionspmanvi
 
Caching Data in OutSystems: A Tale of Gains Without Pain
Caching Data in OutSystems: A Tale of Gains Without PainCaching Data in OutSystems: A Tale of Gains Without Pain
Caching Data in OutSystems: A Tale of Gains Without PainCatarinaPereira64715
 
GEN-Z: An Overview and Use Cases
GEN-Z: An Overview and Use CasesGEN-Z: An Overview and Use Cases
GEN-Z: An Overview and Use Casesinside-BigData.com
 
Caching and JCache with Greg Luck 18.02.16
Caching and JCache with Greg Luck 18.02.16Caching and JCache with Greg Luck 18.02.16
Caching and JCache with Greg Luck 18.02.16Comsysto Reply GmbH
 
Running Java Applications inside Kubernetes with Nested Container Architectur...
Running Java Applications inside Kubernetes with Nested Container Architectur...Running Java Applications inside Kubernetes with Nested Container Architectur...
Running Java Applications inside Kubernetes with Nested Container Architectur...Jelastic Multi-Cloud PaaS
 
Caching technology comparison
Caching technology comparisonCaching technology comparison
Caching technology comparisonRohit Kelapure
 
From cache to in-memory data grid. Introduction to Hazelcast.
From cache to in-memory data grid. Introduction to Hazelcast.From cache to in-memory data grid. Introduction to Hazelcast.
From cache to in-memory data grid. Introduction to Hazelcast.Taras Matyashovsky
 
Inter connect2016 yss1841-cloud-storage-options-v4
Inter connect2016 yss1841-cloud-storage-options-v4Inter connect2016 yss1841-cloud-storage-options-v4
Inter connect2016 yss1841-cloud-storage-options-v4Tony Pearson
 
Choose the Right Container Storage for Kubernetes
Choose the Right Container Storage for KubernetesChoose the Right Container Storage for Kubernetes
Choose the Right Container Storage for KubernetesYusuf Hadiwinata Sutandar
 
Developing High Performance and Scalable ColdFusion Application Using Terraco...
Developing High Performance and Scalable ColdFusion Application Using Terraco...Developing High Performance and Scalable ColdFusion Application Using Terraco...
Developing High Performance and Scalable ColdFusion Application Using Terraco...ColdFusionConference
 
Developing High Performance and Scalable ColdFusion Applications Using Terrac...
Developing High Performance and Scalable ColdFusion Applications Using Terrac...Developing High Performance and Scalable ColdFusion Applications Using Terrac...
Developing High Performance and Scalable ColdFusion Applications Using Terrac...Shailendra Prasad
 
Distributed caching-computing v3.8
Distributed caching-computing v3.8Distributed caching-computing v3.8
Distributed caching-computing v3.8Rahul Gupta
 
Genomics Deployments - How to Get Right with Software Defined Storage
 Genomics Deployments -  How to Get Right with Software Defined Storage Genomics Deployments -  How to Get Right with Software Defined Storage
Genomics Deployments - How to Get Right with Software Defined StorageSandeep Patil
 

Semelhante a Caching In Java- Best Practises and Pitfalls (20)

Mini-Training: To cache or not to cache
Mini-Training: To cache or not to cacheMini-Training: To cache or not to cache
Mini-Training: To cache or not to cache
 
Noha mega store
Noha mega storeNoha mega store
Noha mega store
 
JCache Using JCache
JCache Using JCacheJCache Using JCache
JCache Using JCache
 
Caching technology comparison
Caching technology comparisonCaching technology comparison
Caching technology comparison
 
Overview of the ehcache
Overview of the ehcacheOverview of the ehcache
Overview of the ehcache
 
Caching principles-solutions
Caching principles-solutionsCaching principles-solutions
Caching principles-solutions
 
Caching Data in OutSystems: A Tale of Gains Without Pain
Caching Data in OutSystems: A Tale of Gains Without PainCaching Data in OutSystems: A Tale of Gains Without Pain
Caching Data in OutSystems: A Tale of Gains Without Pain
 
Painless Cache Allocation in Cloud
Painless Cache Allocation in CloudPainless Cache Allocation in Cloud
Painless Cache Allocation in Cloud
 
GEN-Z: An Overview and Use Cases
GEN-Z: An Overview and Use CasesGEN-Z: An Overview and Use Cases
GEN-Z: An Overview and Use Cases
 
Caching and JCache with Greg Luck 18.02.16
Caching and JCache with Greg Luck 18.02.16Caching and JCache with Greg Luck 18.02.16
Caching and JCache with Greg Luck 18.02.16
 
Running Java Applications inside Kubernetes with Nested Container Architectur...
Running Java Applications inside Kubernetes with Nested Container Architectur...Running Java Applications inside Kubernetes with Nested Container Architectur...
Running Java Applications inside Kubernetes with Nested Container Architectur...
 
Caching technology comparison
Caching technology comparisonCaching technology comparison
Caching technology comparison
 
From cache to in-memory data grid. Introduction to Hazelcast.
From cache to in-memory data grid. Introduction to Hazelcast.From cache to in-memory data grid. Introduction to Hazelcast.
From cache to in-memory data grid. Introduction to Hazelcast.
 
Inter connect2016 yss1841-cloud-storage-options-v4
Inter connect2016 yss1841-cloud-storage-options-v4Inter connect2016 yss1841-cloud-storage-options-v4
Inter connect2016 yss1841-cloud-storage-options-v4
 
AppFabric Velocity
AppFabric VelocityAppFabric Velocity
AppFabric Velocity
 
Choose the Right Container Storage for Kubernetes
Choose the Right Container Storage for KubernetesChoose the Right Container Storage for Kubernetes
Choose the Right Container Storage for Kubernetes
 
Developing High Performance and Scalable ColdFusion Application Using Terraco...
Developing High Performance and Scalable ColdFusion Application Using Terraco...Developing High Performance and Scalable ColdFusion Application Using Terraco...
Developing High Performance and Scalable ColdFusion Application Using Terraco...
 
Developing High Performance and Scalable ColdFusion Applications Using Terrac...
Developing High Performance and Scalable ColdFusion Applications Using Terrac...Developing High Performance and Scalable ColdFusion Applications Using Terrac...
Developing High Performance and Scalable ColdFusion Applications Using Terrac...
 
Distributed caching-computing v3.8
Distributed caching-computing v3.8Distributed caching-computing v3.8
Distributed caching-computing v3.8
 
Genomics Deployments - How to Get Right with Software Defined Storage
 Genomics Deployments -  How to Get Right with Software Defined Storage Genomics Deployments -  How to Get Right with Software Defined Storage
Genomics Deployments - How to Get Right with Software Defined Storage
 

Último

04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsRoshan Dwivedi
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
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 Processorsdebabhi2
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...gurkirankumar98700
 
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...Martijn de Jong
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 

Último (20)

04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
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
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
 
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...
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 

Caching In Java- Best Practises and Pitfalls

  • 1. -Hariharan Anantharaman Architect,Cognizant Technology Solutions Founder, Hobbyshopindia.com Hariharan.anantharaman@gmail.com
  • 2.  Get/Access the resource or Data once, use multiple times  Frequently used strategy to improve performance  Approach is language independent  Architecture and Design decision.  Multiple options available at multiple layers JUG-Chennai 2
  • 4.  Serializable Java Objects  Stored In-Memory or File based  Key – Value Pairs  Scale of the Application determines the solution JUG-Chennai 4
  • 5.  Static Data ◦ State List ◦ Countries List  Pseudo Static Data ◦ Catalog Data ◦ Exchange Rate  Context Specific Data ◦ User Profile Data ◦ Session Specific Data ◦ Data From external Systems Different Needs, Different Solutions JUG-Chennai 5 Determining Factors • TTL (Time to Live) • Frequency of Access • Frequency of Update • Deployment Architecture • Scalability of the systems • Object Size • Heap Memory Availability
  • 7.  HashMaps  Session Objects  Localized On-Memory Cache  Intra cluster Distributed Cache (Replicated Cache)  Global Distributed Cache  JSR 107 has been conceptualized and released on 18 March 2014 replicated cache JUG-Chennai 7 Things to be Considered • Clustered Environments • Session Replication • Distributed Servers • Failover Scenarios • Object Replication, Garbage Collection • Effective Memory Utilization
  • 8.  ICacheManager  CaCheManagerImpl  put(Key ,Value)  get(Key )  replace(Key ,Value)  delete(Key ) JUG-Chennai 8
  • 9.  Number of parallel sessions  Available Heap memory  Average Session Duration  Number of Global objects to be stored in Cache  Number of transaction specific objects to be stored in Cache  Size of objects to be stored in Cache JUG-Chennai 9
  • 10.  Profiler Tool  Java.lang.instrument.Instrumentation Cache Population Strategies  Eager Fetch  Lazy Load JUG-Chennai 10
  • 11. Open Source/Free  EhCache  JCS  JBossCache  MemaCache JUG-Chennai 11 Commercial/Properiatery Solutions • TerraCotta BigMemorys • IBM Dynacache(Shipped with Websphere) • IBM Extreme Scale
  • 12.  Maximum Memory  Purge Strategy  Reload  Scheduled Cache Expiry  Algorithm for removing item from Cache(LRU,FIFO),MRU,Last Access Time etc  Object size based cache Removal JUG-Chennai 12
  • 13.  High performance Distributed memory object caching system  Memacache consists of two parts ◦ Memacache Server. Separate process running in same machine as server or running in different machine ◦ Memacache Client. Used by Client applications. Langauage specific client jars are available to work with Memacache JUG-Chennai 13
  • 15.  Predominantly based on Memacache  Available with all major cloud providers  Provides easy scalability, recovery etc JUG-Chennai 15
  • 16.  Based Upon Memache or Redis  Cache clusters consists of multiple cache nodes.  Configured from AWS mgmt console or tools  Redis- ◦ A popular open-source in-memory key-value store that supports data structures such as sorted sets and lists. ◦ ElastiCache supports Redis master / slave replication which can be used to achieve cross AZ redundancy. JUG-Chennai 16
  • 17.  Provides Two Types of Cache ◦ In-Context Cache  Available only for the duration of single HTTP Request  Data is present in memory ◦ Memacache  Default and Enabled for All applications  Faster than datastore, slower than In-context cache  By default, a nontransactional context caches all entities in memcache.  Memcache does not support transactions  When DB is updated, it needs to be updated explicitly in Memacache JUG-Chennai 17