29.01.2013 Views

WebSphere Application Server V7.0: Concepts ... - IBM Redbooks

WebSphere Application Server V7.0: Concepts ... - IBM Redbooks

WebSphere Application Server V7.0: Concepts ... - IBM Redbooks

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Database data caching<br />

To minimize direct reads from the database, database systems usually offer one<br />

or more of the following options:<br />

► Fetch ahead constructs attempt to anticipate that additional pages from that<br />

table are required and then pre-loads those pages into memory pools.<br />

► Buffer pools offer the ability to keep the data loaded into memory, assuming<br />

that it is likely the same data will be requested again.<br />

Both of these constructs reduce disk access, opting instead for reading the data<br />

from the memory, increasing performance. These facilities assume that the data<br />

is predominately read only. If the data has been written, the copy in memory can<br />

be stale, depending on the write implementation of the database. Also, memory<br />

buffers can be used to store data pages, reducing disk access. The key is to<br />

make sure that the system has enough memory to provide to the database.<br />

<strong>Application</strong> data caching<br />

Another option is to cache some of the database or Web page data inside an<br />

application by creating objects that are instantiated when the application server is<br />

started. Those objects pull the necessary information in memory, improving<br />

performance as the query is against an object in memory. The key is to make<br />

sure there is some kind of synchronous or asynchronous mechanism (or both) to<br />

update this cache on a timely basis according to the system requirements. This<br />

approach, however, can create additional memory requirements, especially if a<br />

dynamic cache that might grow over time is implemented.<br />

EJB persistence implies loading the data into an EJB after a call to the data<br />

provider. This is similar to database caching, except that caching takes place in<br />

the application space, not the database server memory. The EJB has an access<br />

intent, which indicates the rules used to determine the currency of the data in the<br />

bean. From a performance standpoint, avoiding a call to an external database in<br />

favor of a local bean creates significant gains.<br />

Chapter 7. Performance, scalability, and high availability 259

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!