Saturday, September 11, 2010

Coherence cache: read-through, write-through....

http://wiki.tangosol.com/display/COH33UG/Read-Through,+Write-Through,+Refresh-Ahead+and+Write-Behind+Caching



the presentation is very complete but slightly complicated...

DS=datasource.

in simple words:

read-through: if hit -> return; if miss -> fetch from DS, put in cache and return


refresh-ahead
: tries to improve read performance by reloading from the DS the frequently requested data which are about to expire (better performance in reads)


write-through
: upon put, store in cache, store in datasource and only then return (bad performance)


write-behind: upon put, store in cache and return immediately; you will update the DS later
(better performance in updates)


I have the sensation that cache synchronization problems can become really nasty when one tries to optimize stuff in a frequently updated cache... this is why you need Coherence experts, you can't improvise.

No comments: