jakarta-jcs-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Joe Reger, Jr." <reg...@gmail.com>
Subject Re: Access to Cache Keys, Groups Performance Questions
Date Sun, 09 Oct 2005 23:59:42 GMT
Hi Aaron!

Thanks for the feedback. I'm using JCS to distribute user session data
across web servers. In the main usage scenario I'm certainly not requesting
keys from the cache. A cookie holds the key and I simply request the session
data I need from the cache when I need it.

However, there's a back-end sysadmin screen that lists out the active
sessions, who's logged-in, what they're looking at, etc. To build that
screen I need to get a list of sessions in the cache dynamically. It's not a
mission-critical screen, but one that sysadmins appreciate greatly. I
currently have everything working the way I want it to with the
getFromGroup() and putToGroup() methods... I'm just wondering if there's an
easier way to do it without the performance overhead of the group... which
I'm not really using for any level of indexing, per se.

Let me know if this makes sense. I appreciate your help!

You mention that in the remote distribution model, the local caches don't
have a clue what all the keys are in the system. My hope is that I can use
JCS to distribute session data so that I don't have to implement sticky
sessions at the network level. Is this a valid use case for JCS, or is the
lateral/remote distribution too slow for web apps?



On 10/9/05, Aaron Smuts <asmuts@yahoo.com> wrote:
> You should try to avoid having to get the keys if
> possible. There are some ways to do it. You can get
> the memory cache from the composite cache (a region).
> you can get the composite cache fromteh
> compositecachemanager. The JCS class is just a
> wrapper around cacheAccess which uses the composite
> cache to do all the real work. The memory cache will
> give you access to the keys, but only the keys in
> memory.
> In the remote distribution model, the local caches
> don't have a clue what all the keys are in the system.
> They only know about what they have . . .
> The grouping functionality used to be a little more
> useful for getting keys, but it was more complex.
> Tell me what you are trying to do, and I can probably
> come up with some solution. Start with telling me why
> you need the keys.
> Aaron
> --- "Joe Reger, Jr." <regerj@gmail.com> wrote:
> > Hi all!
> >
> > I'm just moving things over to JCS from a couple
> > other caching mechanisms,
> > mainly because of the distributed put features. I
> > have a couple questions:
> >
> > 1) Without using JCS.putInGroup() and
> > JCS.getFromGroup(), is there any way
> > to ket the keys for all objects in the cache? I've
> > seen JCS.getGroupKeys()
> > which works with a group, but I haven't been able to
> > find a similar function
> > that works when I get/put with the plain old
> > JCS.get() and JCS.put(). I've
> > tried JCS.getGroupKeys() with group names of null
> > and blank string, but
> > neither brings back the keys I'm looking for.
> >
> > 2) Is there any performance impact when using
> > JCS.getFromGroup() instead of
> > JCS.get()? Seems like there might be a small cost
> > and since in at least one
> > situation I don't need the group functionality but
> > do need to retrieve keys
> > I thought I'd ask.
> >
> > Keep up the great work!
> >
> > Best,
> >
> > Joe
> >
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jcs-users-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jcs-users-help@jakarta.apache.org

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message