le cache - principes avancés - devoxx
Post on 23-Jun-2015
199 Views
Preview:
DESCRIPTION
TRANSCRIPT
9h30- 12h30 - Salle XX
Le cache – Principes avancés
27 au 29 mars 2013
Pratiques de caching avancées
Aurélien BroszniowskiMathile Lemée
Ingénieurs R&D – Software AG
@AurBroszniowski@MathildeLemee
Aurélien Broszniowski
•Ingénieur lead @ Terracotta
•Tester Terracotta/Ehcache/Quartz
•Tester un système distribué… Comment faire?
•www.takeon.me
•CEO, CTO, CFO, Marketing, Architecte, Développeur, Testeur…
Mathilde Lemée
•Ehcache/Terracotta
•DuchessFR
•FluentLenium, wrapper autour de Selenium
•Aetys, studio mobile
Le cache
TODO desc caching
Le cache
TODO desc caching
Cacher…Pourquoi?Comment?
HOTSET+ PROXIMITE
…OF YOUR CACHE
Chacun dans son coin…
…partager c’est mieux!
Parallélismeetdistribution
Pourquoi le caching?- Hotset- Proximité- Partage- Distribution
- Vitesse!!!!
Cache Aside
"Par ma foi ! Il y a plus de quarante ans que je dis de la prose sans que j'en susse rien. " Molière ; Le
Bourgeois gentilhomme
Cache aside
Database
Application
CacheCache
DAODAO
Get AGet B
Read B
Put BGet B
Cache as a System of Record
Cache as a s-o-r : read through
Database
Application
EhcacheEhcache
Persistence layerPersistence layer
Get AGet B
Read B
Put BGet B
Cache as a s-o-r : Write through
Database
Application
EhcacheEhcache
Persistence layerPersistence layer
Write A
Put A
Cache as a s-o-r : Write-behind
Database
Application
EhcacheEhcache
Persistence layerPersistence layer
Put A
Write-behind thread
Write-behind thread
Put BPut CPut D
Get A B C D
Write A B C D
Write Through – Temps de réponses
Write Behind – Temps de réponses
Write Through – Database load
Write Behind – Database load
Refresh Ahead
Cache Aside vs Read/Write Through
Refresh Ahead vs Read Through
Write Behind vs Write Through
Partie 2 – Fonctionnalités avançées
Search
Search
Results results = cache.createQuery().includeValues()
.addCriteria(age.eq(32).and(gender.eq("male")))
.execute();
Du cache au data store
Recharge le cache en cas d’arrêt…
…ou de crash.
Choisir où stocker ses données…
Allocation de la mémoire
Allocation de la mémoire
Par unité
Allocation de la mémoire
Par espace mémoire
Allocation de la mémoire
Automatique
Partie 3 – La Scalabilité
Verticale
SCALABILITE
Tant que ca marche…
Scalabilité Scalabilité
Scalabilité
Scalabilité
Scalabilité
Scalabilité
Scalabilité
Scalabilité
Scalabilité
Scalabilité
Scalabilité
Scalabilité
Horizontale
Offheap
Near Cache
Partie 4 – Réplication WAN
WAN 3
Solutions
solutions des bonus
Automatic Resource Controlhttp://jsoftbiz.wordpress.com/2011/08/01/ehcache-2-5-goes-beta-explanation-included/Etudes de cas Write Behind / Write Through :
http://www.infoq.com/articles/write-behind-cachinghttp://ehcache.org/documentation/recipes/wan
top related