Top Banner
www.exoplatform.com Copyright 2011 eXo Platform 1 Storage Caching Cracking Presenter: VU CONG THANH Duration: 1h
16
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Storage caching for_developers

www.exoplatform.com

Copyright 2011 eXo Platform1

Storage Caching Cracking

Presenter: VU CONG THANH

Duration: 1h

Page 2: Storage caching for_developers

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

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

4www.exoplatform.com

Copyright 2011 eXo Platform

CHALLENGES - REVIEWER

Page 5: Storage caching for_developers

5www.exoplatform.com

Copyright 2011 eXo Platform

ARCHITECTURE

Page 6: Storage caching for_developers

6www.exoplatform.com

Copyright 2011 eXo Platform

Architecture – Caching Data

Page 7: Storage caching for_developers

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

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

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

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

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

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

13www.exoplatform.com

Copyright 2011 eXo Platform

CASE STYDY: FindFooById

Page 14: Storage caching for_developers

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

15www.exoplatform.com

Copyright 2011 eXo Platform

DEMO CACHING STORAGE

Page 16: Storage caching for_developers

www.exoplatform.com

Copyright 2011 eXo Platform16

16

Q&A