Hi Ben!

I'm using a homegrown session manager because I can't set the subdomain cookie 
scope on Tomcat's sessions (long story).  I create a session once and put it 
into the cache with putObject().  The key I use is a unique string generated 
from the request (url + subdomain + some other stuff). So on each request I 
retrieve the session using that key and the getObject() method.  The 
putObject() is not used on every request. 

One thing I've considered is that at least one property is updated on every 
request.  I have a property called UserSession.mostrecentactivity which I 
update every request so that I can expire sessions properly (sysadmins for our 
app can set the timeout via the web).  My hope was that because of AOP this 
property update wouldn't cause that much traffic across the wire.

Of course, the problem I'm seeing isn't network related.  It's the performance 
of the app itself.   I've done some testing and the performance degradation 
seems to relate to how many times I read a property from the object that was 
cached... even after I've retrieved the object from the cache into local memory.

For example, if I pull a UserSession from the cache and then use the getFoo() 
method to access the foo String 1000 times the app is a lot slower than if i 
had only accessed the foo String 10 times.  In other words, because of AOP the 
performance of simple property gets is degraded.  

Watching the profiler it seems that there is some jbosscache code that is 
called by AOP each time that I do a property get call.  This doesn't make sense 
to me. I understand that jbosscache needs to know about property puts/updates 
because it needs to replicate those changes across the cache.  But I don't 
understand why org.jboss.aop.joinpoint.FieldReadInvocation.invokeNext is called 
on gets.

Question: is there a way to tell AOP to not worry about property gets and only 
notify jbosscache of property puts/updates?

The good news is that TreeCacheAOP is working as advertised.  Now it's just a 
matter of tweaking the performance for my particular app.   I appreciate your 
help and look forward to running our cluster on TreeCacheAOP! (Looking forward 
to your training session on webapp clustering next week.)

Best,

Joe

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3925636#3925636

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3925636


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to