perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tim Pushor <>
Subject Re: Persisting data across authenticate <-> authorize ?
Date Mon, 13 Dec 2004 19:58:15 GMT

Perrin Harkins wrote:


>>Could I not just set a global variable in my authentication handler that 
>>the authorization handler can then access?
>Yes, but it will persist between requests.  If you put it in pnotes, it
>will get cleared automatically, even if your code dies while processing
>a request.
I'll have to think about this - not sure if that is an issue or not.

>Yes, and because people often get into trouble with running out of
>shared memory segments or clearing them out when the program dies.
Running out of segments is my primary concern as well.

>>Cache::FastMmap looks 
>>promising, but I need something where I have more control over when the 
>>cache entries are expired.
>What sort of control are you looking for?  There are other things I
>would recommend, like BerkeleyDB (not DB_File!), or even a simple MySQL
>setup, which is faster than most of the other caching modules on CPAN.
Well, I probably used the work cache to describe what I was looking for, 
when in fact I am probably looking more for a persistence framework that 
I can manage the addition and expiry of entries.

For example, what I need to do (at a high level) is be able to add 
entries to the cache with a minimum TTL, and be able to have the ability 
to reset the TTL on individual entries as need be.

Now that you have introduced me to the Cache::* modules, I see a huge 
potential for other pieces of my app, but I don't think it will do for  
my current problem :(

>>Personally, I am not crazy about using shared 
>>memory as well, but in my C module I used an array of berkeley DB's, and 
>>while it worked and performace was fine for my application - I fear that 
>>it wouldn't scale well.
>In what way?  BerkeleyDB can handle tremendous amounts of data, and the
>locking is more efficient than what IPC::Shareable uses.
Perhaps - I just think that there has to be a more efficient way of 
sharing data between processes than writing it to disk. The module I 
wrote was for a busy community type site where all access was 
authenticated, so I spread the data across multiple db's to reduce lock 
contention. To really be honest, I have never really used shared memory 
much (in any programming language) so I don't really understand the main 
issues - but I thought locking (in the perl module) was done with 


Report problems:
Mail list info:
List etiquette:

View raw message