OSCache
I started today implementing a layer above our DAO layer (for a client) to implement OSCache -- to reduce some of the load on the aging database (Informix 7.3). The goal is to be able to create an object cache of POJO's, and arrays (we have a fair number of those -- leftover from when Java's arrays were significantly faster than Java Collections), which are rarely, if ever, modified.So far, the implementation of OSCache has been minimally complicated. The new "groups" are not well documented in the API / JavaDocs. However, I think we can manage without the groups for now. Instead, we've abstracted an interface allowing the existing DAO's to decide whether or not they are inside an OSCache container (ie, in a web container, or a shell container), and if they are in a OSCache container, to utilize the cache.
Looks like we'll end up adding about 60 lines of code (including error checking) to each of our 20 DAO's, and one line of code to the actual web layer. Should be fun to look at some benchmarks once it's actually implemented.
0 Comments:
Post a Comment
<< Home