You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@turbine.apache.org by Edmund Urbani <em...@emu.no-ip.org> on 2004/03/05 16:50:21 UTC

Acl and TorqueSecurityService (Turbine 2.3)

Hi!

I was trying to speed up my webapp, so I let torque log all the sql 
queries (log level "debug") to identify the performance bottleneck(s). 
It seems I am getting a huge amount of queries on the TURBINE_ROLE, 
TURBINE_PERMISSION and TURBINE_GROUP tables for every single http 
request. I have lots of hasRole(..), hasPermission(..) calls to the 
AccessControllList which appear to be causing this. Is there a way to 
make the ACL/TorqueSecurityService keep/cache more data in memory?

I am going to look deeper into this. Maybe I will end up writing my own 
subclass of the TorqueSecurityService, that does have some options for 
caching... (or has anyone done that already?)

 Edmund

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


Re: Acl and TorqueSecurityService (Turbine 2.3)

Posted by Edmund Urbani <em...@emu.no-ip.org>.
Loïc Quéran wrote:

>Use Role, Permission and Group objects as parameters instead of String,
>and Turbine should be faster.
>
>Loïc
>
>
>  
>
I actually already considered that, but it does not make very much sense 
for my current project. Part of the "checking" is done within velocity 
templates, where I only have strings (unless I write some tool that or 
put Group/Permission objects into the context using the PullService or 
something...). Even for the checks in my java classes, I would have to 
keep a reference to those objects, which is not very convenient (unless 
done in one central place - the security service).

Eric Pugh wrote:

> Use the HibernateSecurityService in Fulcrum.  Hibernate has very
> comprehensive caching, and there is an adapter so you can use it with
> Turbine 2.3.  Check out the unit tests for Fulcrum Security for examples.
>
> Eric

The HibernateSecurityService certainly looks interesting.
Is there an example config, that shows how to set this thing up, so it 
uses the TURBINE_* tables? I looked at 
http://cvs.apache.org/viewcvs.cgi/jakarta-turbine-fulcrum/src/test/org/apache/fulcrum/security/, 
but the those tests have already been moved to the "Attic". I am not 
sure where to find those unit tests/example configs you mentioned?

Thanks,
 Edmund

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


Re: Acl and TorqueSecurityService (Turbine 2.3)

Posted by Loïc Quéran <lo...@gicm.fr>.
Use Role, Permission and Group objects as parameters instead of String,
and Turbine should be faster.

Loïc


On Fri, 2004-03-05 at 16:50, Edmund Urbani wrote:
> Hi!
> 
> I was trying to speed up my webapp, so I let torque log all the sql 
> queries (log level "debug") to identify the performance bottleneck(s). 
> It seems I am getting a huge amount of queries on the TURBINE_ROLE, 
> TURBINE_PERMISSION and TURBINE_GROUP tables for every single http 
> request. I have lots of hasRole(..), hasPermission(..) calls to the 
> AccessControllList which appear to be causing this. Is there a way to 
> make the ACL/TorqueSecurityService keep/cache more data in memory?
> 
> I am going to look deeper into this. Maybe I will end up writing my own 
> subclass of the TorqueSecurityService, that does have some options for 
> caching... (or has anyone done that already?)
> 
>  Edmund
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: turbine-user-help@jakarta.apache.org
> 


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


Re: Acl and TorqueSecurityService (Turbine 2.3)

Posted by Mike Manner <te...@oreka.com>.
Hi Eric,

What do you think of this (about fulcrum security objects mapped with 
hibernate) :

- using lazy instanciation for collections is a good choice
- but initializing every Set (GroupSet, UserSet, ...) in each 
SecurityEntity just after an entity is loaded (as this is done in User, 
Group and Role) seems to make the "lazy" configuration useless

don't you think it can lead to performance hits ? (just look at the 
number of sql queries generated)

Mike



Eric Pugh wrote:

>Use the HibernateSecurityService in Fulcrum.  Hibernate has very
>comprehensive caching, and there is an adapter so you can use it with
>Turbine 2.3.  Check out the unit tests for Fulcrum Security for examples.
>
>Eric
>
>  
>
>>-----Original Message-----
>>From: Edmund Urbani [mailto:emu@emu.no-ip.org]
>>Sent: Friday, March 05, 2004 3:50 PM
>>To: turbine-user@jakarta.apache.org
>>Subject: Acl and TorqueSecurityService (Turbine 2.3)
>>
>>
>>
>>Hi!
>>
>>I was trying to speed up my webapp, so I let torque log all the sql
>>queries (log level "debug") to identify the performance
>>bottleneck(s).
>>It seems I am getting a huge amount of queries on the TURBINE_ROLE,
>>TURBINE_PERMISSION and TURBINE_GROUP tables for every single http
>>request. I have lots of hasRole(..), hasPermission(..) calls to the
>>AccessControllList which appear to be causing this. Is there a way to
>>make the ACL/TorqueSecurityService keep/cache more data in memory?
>>
>>I am going to look deeper into this. Maybe I will end up
>>writing my own
>>subclass of the TorqueSecurityService, that does have some
>>options for
>>caching... (or has anyone done that already?)
>>
>> Edmund
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
>>For additional commands, e-mail: turbine-user-help@jakarta.apache.org
>>    
>>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: turbine-user-help@jakarta.apache.org
>
>
>  
>



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


RE: Acl and TorqueSecurityService (Turbine 2.3)

Posted by Eric Pugh <ep...@upstate.com>.
Use the HibernateSecurityService in Fulcrum.  Hibernate has very
comprehensive caching, and there is an adapter so you can use it with
Turbine 2.3.  Check out the unit tests for Fulcrum Security for examples.

Eric

> -----Original Message-----
> From: Edmund Urbani [mailto:emu@emu.no-ip.org]
> Sent: Friday, March 05, 2004 3:50 PM
> To: turbine-user@jakarta.apache.org
> Subject: Acl and TorqueSecurityService (Turbine 2.3)
>
>
>
> Hi!
>
> I was trying to speed up my webapp, so I let torque log all the sql
> queries (log level "debug") to identify the performance
> bottleneck(s).
> It seems I am getting a huge amount of queries on the TURBINE_ROLE,
> TURBINE_PERMISSION and TURBINE_GROUP tables for every single http
> request. I have lots of hasRole(..), hasPermission(..) calls to the
> AccessControllList which appear to be causing this. Is there a way to
> make the ACL/TorqueSecurityService keep/cache more data in memory?
>
> I am going to look deeper into this. Maybe I will end up
> writing my own
> subclass of the TorqueSecurityService, that does have some
> options for
> caching... (or has anyone done that already?)
>
>  Edmund
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: turbine-user-help@jakarta.apache.org


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