portals-jetspeed-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Siofra <siofra.one...@fmr.com>
Subject Re: Caching in Jetspeed 2.1.2
Date Fri, 01 Aug 2008 07:36:29 GMT


David Sean Taylor wrote:
> 
> 
> On Jul 31, 2008, at 5:45 AM, Siofra wrote:
> 
>>
>> Hello,
>>
>> Our Jetspeed portal application is running on 2 servers, A & B.  
>> Application
>> requests over HTTP are load-balanced between the 2 servers.
>>
>> We have noticed unusual behavior if multiple browser sessions are  
>> opened for
>> our application URL.
>>
>> For example, if I open 6 browser sessions and I am the only user in  
>> the
>> system, I will invariably get 3 sessions running from server A and 3  
>> running
>> from server B. When I make portal changes in a browser that's  
>> running on
>> server A, the changes are visible when I refresh the other 2 browser
>> sessions running on server A. However, the changes are not visible in
>> browsers running on the other server B even after refresh. Both these
>> application server instances share the same Jetspeed database, so I  
>> suspect
>> that caching on the Jetspeed level is responsible for the discrepancy
>> between the 2 servers.
>>
>> If I leave the system for a day or so, the 2 servers become  
>> synchronized
>> again and changes made previously on server A are propagated over to  
>> the
>> instance on server B. This is not ideal because a delay in showing  
>> updated
>> portal preferences would impact user experience.
>>
>> If it is a caching issue, how long before the cache expires by  
>> default? Can
>> I reduce the lifetime of the cache or force a refresh?	
> 
> Is it an absolute requirement that the same user will login from  
> different locations and share session state? We've had this question  
> asked before and it seems to open up a can of worms.
> Jetspeed relies on the servlet container to create sessions. If a user  
> logs in on server A from web-client B, then the same user logs in on  
> server A from web-client B, they will get different sessions, even  
> though they are the same user.
> If you use Tomcat's clustering features it will handle the typical  
> scenario of web-client A hits the cluster, gets routed to server A,  
> next time web-client A hits the cluster, gets routing to server B, and  
> having the same seamless session attribute available.
> See more here:
> 
> http://tomcat.apache.org/tomcat-5.5-doc/cluster-howto.html
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
> For additional commands, e-mail: jetspeed-user-help@portals.apache.org
> 
> 
> 


Hello,

Thanks for your reply. It is a requirement that the same user will login
from different locations and share session state. However, I think I can
make the user-experience better by decreasing the cache expiry value.
Currently, Jetspeed caching is performed as per the configuration in
db-page-manager.xml. 

Here are my settings:

  <bean id="org.apache.jetspeed.page.PageManagerImpl" 
        name="pageManagerImpl"
        init-method="init"
        class="org.apache.jetspeed.page.impl.DatabasePageManager">
      <!-- OJB configuration file resource path -->
      <constructor-arg
index="0"><value>JETSPEED-INF/ojb/page-manager-repository.xml</value></constructor-arg>
      
      <!-- folder/page/link cache size, default=128, min=128 -->
      <constructor-arg index="1"><value>5000</value></constructor-arg>
      <!-- folder/page/link cache expires seconds, default=-1, infinite=0,
min=30 -->
      <!--                                         (default is 150 seconds)
-->
      <constructor-arg index="2"><value>72000</value></constructor-arg>
      <!-- permissions security enabled flag, default=false -->
      <constructor-arg index="3"><value>false</value></constructor-arg>
      <!-- constraints security enabled flag, default=true -->
      <constructor-arg index="4"><value>true</value></constructor-arg>
  </bean>

Constructor-arg index 2 is set to 7200, or 2 hours. Can you confirm that
this corresponds to the cache timeout/expiry period? If I reduce this to a
couple of minutes or some other lower value it should decrease the time for
which there will be a difference between the content on both servers, right?

Thanks Again,
Siofra
-- 
View this message in context: http://www.nabble.com/Caching-in-Jetspeed-2.1.2-tp18753770p18769618.html
Sent from the Jetspeed - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-user-help@portals.apache.org


Mime
View raw message