Upload
thanhc0110m
View
227
Download
0
Tags:
Embed Size (px)
Citation preview
www.exoplatform.com
Copyright 2011 eXo Platform1
Storage Caching Cracking
Presenter: VU CONG THANH
Duration: 1h
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)
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
7www.exoplatform.com
Copyright 2011 eXo Platform
CACHING FACTORY METHOD» Provide an Caching Factory creation of objects.(eXoCache, FutureETKCache)
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
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
10www.exoplatform.com
Copyright 2011 eXo Platform
VISITOR
»Adds the decorator the CachingLoader to the FutureExoCache.
»Invokes the ServiceContext.execute() method.
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
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
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