tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joseph Dane <...@hotu.com>
Subject Re: Global caching hack?
Date Fri, 16 Jun 2000 19:45:52 GMT
>>>>> "Jonathan" == Jonathan Reichhold <reichhold@singingfish.com> writes:

    Jonathan> What about an RMI object that can be accessed from each servlet/JSP? This
    Jonathan> way you have one cache which is available from multiple JVM's and contexts
    Jonathan> and you can keep the pool to a single instance?  Not sure of the symantics
    Jonathan> of the JSP page (may need to use a bean), but why not try it?  Does anyone
    Jonathan> have any experience that would show that this would be a bad thing to do?
    Jonathan> It seems to me that this is a really powerful technique which isn't used
    Jonathan> nearly enough.  Thoughts?

I use something like this, and it works quite well.  The RMI
communication is done on a very fast LAN, so speed has not (yet) been
a problem.  You can have a single cache, shared by multiple servlet
JVMs, or replicated caches if the data is read-only, which are round
robined to the servlet JVMs.  The RMI setup is handled by a servlet
loaded at startup, and after that beans are used to hide the
communication from the JSP and even the servlets.  The downside: RMI
can be a pain at first, but once you figure out the tricks there are
few surprises.

-- 

joe

Mime
View raw message