storage caching for_developers
TRANSCRIPT
![Page 1: Storage caching for_developers](https://reader035.vdocuments.mx/reader035/viewer/2022062711/55c5a6c7bb61eb162a8b477d/html5/thumbnails/1.jpg)
www.exoplatform.com
Copyright 2011 eXo Platform1
Storage Caching Cracking
Presenter: VU CONG THANH
Duration: 1h
![Page 2: Storage caching for_developers](https://reader035.vdocuments.mx/reader035/viewer/2022062711/55c5a6c7bb61eb162a8b477d/html5/thumbnails/2.jpg)
2www.exoplatform.com
Copyright 2011 eXo Platform
Agenda
»Introduction (5minutes)
»Architecture (15 minutes)
»Caching Factory (10 minutes)
»Caching HashMap (10 minutes)
»Demo (15 minutes)
»Q&A (5 minutes)
![Page 3: Storage caching for_developers](https://reader035.vdocuments.mx/reader035/viewer/2022062711/55c5a6c7bb61eb162a8b477d/html5/thumbnails/3.jpg)
3www.exoplatform.com
Copyright 2011 eXo Platform
»Data Caching: Defines the Key, Value
»Context Caching: Caching the ServiceContext (FindById, Count, and Filter)
»Caching Loader: Mechanism which injects to FutureCache
SOC-1892 Cache for storage layer.
INTRODUCTION
![Page 4: Storage caching for_developers](https://reader035.vdocuments.mx/reader035/viewer/2022062711/55c5a6c7bb61eb162a8b477d/html5/thumbnails/4.jpg)
4www.exoplatform.com
Copyright 2011 eXo Platform
CHALLENGES - REVIEWER
![Page 5: Storage caching for_developers](https://reader035.vdocuments.mx/reader035/viewer/2022062711/55c5a6c7bb61eb162a8b477d/html5/thumbnails/5.jpg)
5www.exoplatform.com
Copyright 2011 eXo Platform
ARCHITECTURE
![Page 6: Storage caching for_developers](https://reader035.vdocuments.mx/reader035/viewer/2022062711/55c5a6c7bb61eb162a8b477d/html5/thumbnails/6.jpg)
6www.exoplatform.com
Copyright 2011 eXo Platform
Architecture – Caching Data
![Page 7: Storage caching for_developers](https://reader035.vdocuments.mx/reader035/viewer/2022062711/55c5a6c7bb61eb162a8b477d/html5/thumbnails/7.jpg)
7www.exoplatform.com
Copyright 2011 eXo Platform
CACHING FACTORY METHOD» Provide an Caching Factory creation of objects.(eXoCache, FutureETKCache)
![Page 8: Storage caching for_developers](https://reader035.vdocuments.mx/reader035/viewer/2022062711/55c5a6c7bb61eb162a8b477d/html5/thumbnails/8.jpg)
8www.exoplatform.com
Copyright 2011 eXo Platform
CACHING FACTORY METHOD(Cont)» Using the CacheService to create the Caching region.
Caching region
Caching Map
Caching Service management
![Page 9: Storage caching for_developers](https://reader035.vdocuments.mx/reader035/viewer/2022062711/55c5a6c7bb61eb162a8b477d/html5/thumbnails/9.jpg)
9www.exoplatform.com
Copyright 2011 eXo Platform
CACHING FACTORY METHOD(Cont)» Using to create the FutureExoCaching.
new FutureETKCache<K, V, ServiceContext<V>>(new CacheLoaderVisitor<K, V>(), cache)
CacheLoader
FooFutureCaching
CacheFooStorage
ExoCache
![Page 10: Storage caching for_developers](https://reader035.vdocuments.mx/reader035/viewer/2022062711/55c5a6c7bb61eb162a8b477d/html5/thumbnails/10.jpg)
10www.exoplatform.com
Copyright 2011 eXo Platform
VISITOR
»Adds the decorator the CachingLoader to the FutureExoCache.
»Invokes the ServiceContext.execute() method.
![Page 11: Storage caching for_developers](https://reader035.vdocuments.mx/reader035/viewer/2022062711/55c5a6c7bb61eb162a8b477d/html5/thumbnails/11.jpg)
11www.exoplatform.com
Copyright 2011 eXo Platform
VISITOR
» 1. FooCache.get(context, fooKey)
» 2. Loader.accept(context, fooKey)
» 3. fooStorageImpl.findFooById(fooId)
FindFooById scenario
»CachedFooStorage class
![Page 12: Storage caching for_developers](https://reader035.vdocuments.mx/reader035/viewer/2022062711/55c5a6c7bb61eb162a8b477d/html5/thumbnails/12.jpg)
12www.exoplatform.com
Copyright 2011 eXo Platform
CACHING HASHMAP
Define Key.Value pair in eXoCache
- CacheKey: Define the key in ExoCache
- CacheData: Define the data in ExoCahe
![Page 13: Storage caching for_developers](https://reader035.vdocuments.mx/reader035/viewer/2022062711/55c5a6c7bb61eb162a8b477d/html5/thumbnails/13.jpg)
13www.exoplatform.com
Copyright 2011 eXo Platform
CASE STYDY: FindFooById
![Page 14: Storage caching for_developers](https://reader035.vdocuments.mx/reader035/viewer/2022062711/55c5a6c7bb61eb162a8b477d/html5/thumbnails/14.jpg)
14www.exoplatform.com
Copyright 2011 eXo Platform
CACHING HASHMAP
Define Key.Value pair in eXoCache
- CacheKey: Define the key in ExoCache
- CacheData: Define the data in ExoCahe
![Page 15: Storage caching for_developers](https://reader035.vdocuments.mx/reader035/viewer/2022062711/55c5a6c7bb61eb162a8b477d/html5/thumbnails/15.jpg)
15www.exoplatform.com
Copyright 2011 eXo Platform
DEMO CACHING STORAGE
![Page 16: Storage caching for_developers](https://reader035.vdocuments.mx/reader035/viewer/2022062711/55c5a6c7bb61eb162a8b477d/html5/thumbnails/16.jpg)
www.exoplatform.com
Copyright 2011 eXo Platform16
16
Q&A