You are on page 1of 5

Dynacache:

Static caching: File Serving Enabler is a component of the application server's Web container, which listens for HTTP re !ests that appear to be file re !ests Sample 1. plugin-cfg.xml entry with file serving enabled
<Uri Name="/pts/*"/>

The File Serving Enabler can be t!rne" off by !nchec#ing this option for the Web mo"!le in the $pplication Server Tool#it %$ST&', or changing the ibm-web-ext.xmi file( Sample 2. plugin-cfg.xml entry with file serving disabled
<Uri <Uri <Uri <Uri <Uri Name="/pts/PTSMainServlet"/> Name="/pts/*.jsp"/> Name="/pts/*.jsv"/> Name="/pts/*.jsw"/> Name="/pts/j_se !rit"_ #e $"/>

WebSphere Application Server dynamic caching architecture

compare the performance of WebSphere e)treme Scale to a local hash map an" comment that it's slower( Try caching *++,- in the local hash map on every ./0 re !iring a cache1 Wrong( WebSphere 2ommerce Server( 3t can cache HT04 page fragments in a local map %Dynacache' an" in e5treme scale also $n e5treme scale cache is remote( This article intro"!ces the presentation6level caching feat!res of "ynacache( These feat!res are:

2ache ob7ect Description Servlet8.SP res!lts: Dyna2ache can cache any e5isting whole page or fragment generate" by a servlet or .SP( Dyna2ache matches "ata fo!n" in the HTTP re !est hea"er with the cache r!les specifie" in the )04 config!ration file, name" cachespec(5ml( 2omman" cache %Web Services, P9.9s an" E.-s': :se" to cache "ynamic "ata before it is transforme" into a presentable format %that is, HT04'( These incl!"e E.- an" Web service responses( $ cacheable comman" ob7ect m!st inherit from the class com(ibm(websphere(comman"(cachable2omman"3mpl for it to wor# with Dyna2ache( ;eplication s!pport: Enables cache sharing an" replication in a cl!stere" environment( 3nvali"ation s!pport: 3ncl!"es r!les6base", time6base", gro!p6base", an" programmatic cache invali"ation techni !es to ens!re the freshness, consistency, an" acc!racy of the content( E"ge of networ# caching s!pport: E5ten"s the WebSphere< $pplication Server caches into networ#6base" caches, thro!gh the implementation of e5ternal cache control an" "istrib!te"6 fragment caching an" assembly s!pport( .S;=*>: compliant portlets Dyna2ache can cache any e5isting whole page or fragment generate" by a servlet, .SP or a .S; =*> compliant Portlet=( Dyna2ache matches "ata fo!n" in the HTTP re !est hea"er with the cache r!les specifie" in the )04 config!ration file, name" cachespec(5ml( 2ache monitor: 2ache" res!lts can be viewe" an" manage" !sing a cache monitor .?EE application( The cache monitor provi"es a ,:3 interface to change the cache" "ata man!ally( @o! have to install the application man!ally with the 2ache0onitor(ear file %locate" in the AW$SBH90EC8installableapps "irectory' !sing the W$S $"min ,:3( This installable Web application provi"es a real6time view of the state of the Dyna2ache( The only way to e5ternally manip!late the "ata in the cache is by !sing the cache monitor( $fter installation, the cache monitor can be accesse" as: http:88yo!r hostBname:yo!r portBn!mber8cachemonitor( Caching Dynamic Content The #ey iss!es for caching "ynamic content involve "etermining what sho!l" be cache", where caching sho!l" ta#e place, an" how to invali"ate cache" "ata(

What Should Be ached! 2ontent or "ata that is changing an" that at the same time m!st be stable over a long eno!gh time for meaningf!l re!se to occ!r is a can"i"ate for "ynamic content caching ( 3n a m!ltitier e6b!siness environment, "ynacache can be activate" at the b!siness logic an"8or presentation layer( 3n a m!ltitier e6b!siness environment, "ynacache can be activate" at the b!siness logic an"8or presentation layer( Dynacache provi"es invali"ation techni !es that are r!les6base", time6base", gro!p6base", an" programmatic( 3t can also invali"ate the remote caches that were config!re" as its e5ternal caches( Dynacache !ses a facility calle" the Data ;eplication Service, which is a .0S6base" facility, to replicate cache" "ata an" propagate invali"ate events within a WebSphere cl!ster( minimiDe memory cons!mption, the caching service !tiliDes a mo"ifie" 4;: %least recently !se"' 3n its simplest form, "ynacache can be tho!ght of as a highly f!nctional Hashtable( 9ne of its primary p!rposes is to store %p!t' an" retrieve %get' .ava ob7ects from memory( Entries in the cache are manage" by a policy base" on the class of entry %e(g(, servlet8.SP, E.-, comman", etc('( The policy is e5presse" as an )04 file calle" cachespec(5ml Dynacache provi"es a "is# overflow capability, #nown as Hash Table on Dis# %HT9D', that is an optimiDe" file store for serialiDe" .ava ob7ects( The HT9D ta#es the form of a single logical "is# file %which can e5pan" to m!ltiple physical =,- files'( 4everaging "ynacache an" HT9D allows for rob!st an" centraliDe" memory management an" provi"es the potential to leverage networ#e" file systems via E$S %networ# attache" storage' an" S$Es %storage area networ#s' for high availability(
%a #eable%&mman'(mpl

2aching can be performe" at several places( Some of the most notable caching locations are: $t the Web client an" browser( $t the 3nternet Service Provi"er %$#amai is an e5ample'( 3n a caching pro5y server locate" in front of the application server( 3n the HTTP Web server %for e5ample, static content an" e"ge si"e incl!"es'( $t the application server in Dyna2ache( 3n the bac#6en" "atabase caching b!ffer pools( "hin# of $yna ache as a sophisticated %ava &ashtable. 2aching r!les are store" in a config!ration file calle" cachespec(5ml( 2aches are store" in the ./0 heap memory an" Dyna2ache s!pports overflow to "is# if enable" an" when re !ire"( Dyna2ache also calls a least recently !se" %4;:' algorithm Dis# offloa" of cache entries Eote: 9n server start!p Dyna2ache "oes not loa" the entire "is# cache into memory( The process of removing these items is calle" invali"ation( Dyna2ache is s!pporte" in WebSphere< cl!stere" environments !sing the Distrib!te" ;eplication Service %D;S'( $istributed 'ap and $istributed(b)ect ache interfaces are simple interfaces for the

$yna ache. The "efa!lt Dyna2ache instance is create" if the Dyna2ache service is enable" in the $"ministrative 2onsole( This "efa!lt instance is bo!n" to the global .ava Eaming an" Directory 3nterfaceF %.ED3' namespace !sing the name services8cache8"istrib!te"map(

You might also like