I’m experimenting with a couple of components provided by the open-source initiative at opensymphony.com.
I’m particularly pleased with the caching solution they provide called OSCache: this allows a developer to layer a caching structure over their servlet/JSP Java web-application. For general caching at the URL level (i.e. for caching all pages which match defined URL patterns), a Filter is provided. Using the filter allows caching to be applied to the web app without touching the application code at all - it just needs the necessary jar file to be included on the application’s classpath and a simple entry to be added to the web.xml file. Caching can be done in memory, persisted to disk, or both. The functionality can be extended by the developer to allow caching to other media (e.g. to a database). Caching can be applied to application or session scope.
This approach is simple, and it seems to work well. For more flexibility (but requiring some development of the application), a tag library is also supplied which allows the developer options to cache entire JSP pages, or subsections of pages. This is where this solution gets really powerful - the ability to cache just certain parts of the application is really useful.
With good documentation, and a clean implementation, I have been able to apply a reasonably sophisticated level of caching to a major web-application in an afternoon - I hope to roll this out for production use in the next day or two after a little more testing.
Opensymphony provide other components as well. I’m particularly interested in Clickstream, a filter/listener solution which will log a detailed audit of users’ activities on an application.
This was previously published at http://blog.sockdrawer.org and was retrieved from the Internet Archive
comments powered by Disqus