[Opensymphony-oscache] Cache per server or Cache per data set?
Cork2005 <[email protected]> Thu, 12 May 2005 03:00:09 CDT
| Newsgroups | gmane.comp.java.open-symphony.os-cache |
|---|---|
| Message-ID | <27218016.1115884839688.JavaMail.os-j2ee@opensymphony01.contegix.com> |
thanks for the info dres :) Just to clarify the problem. I have a single server at the moment and in a few months time will switch to 2 servers. Thats why I'd like to use a cache now that can later be used clustered. At the moment I won't use the cluster feature. So I'm not sure why I would have 40 threads in the example we discussed, I can't see anywhere that OSCache is creating a thread per cache, or did I miss that bit of code? The reason I need different cache configurations is that I have different data sets that need caching differently. For example: Currencies and other small data sets I can quite happily load completely into an unlimited cache. But then I also have a data set that has 400,000 DB records and I only want 4000 in the cache at any one time. Likewise I have another data set that has 2000 DB records but I only need 50 of these in an LRU cache. And so on... If I can't configure them separately then the memory requirements will be too large... And that's before I start worrying about which caches can't serve stale data and need to be configured for blocking... Thinking some more about this, if I had the 40 caches we mentioned, do they each have a seperate JGroups with configuration? Is that were the 40 threads come from? If so then when I switch to clustering I could always just pair up the same caches across the cluster. eg CurrencyCache would only be configured via JGroups to talk to the other CurrencyCahce on the other server. That way the network traffic should be more contained. Or if the JGroups is configurable per cache then in theory I could just use the same configuration for all the cache instances? Is the JGroups configuration configurable per cache? seems like its just driven from the single properties file at the moment with no way to change it programmatically? The region stuff that you mention sounds like the better solution. Kind Regards Peter --------------------------------------------------------------------- Posted via Jive Forums http://forums.opensymphony.com/thread.jspa?threadID=2130&messageID=6418#6418