Re: Persisting data across authenticate <-> authorize ?

[prev] [thread] [next] [Date index for 2004/12/13]

From: Perrin Harkins
Subject: Re: Persisting data across authenticate <-> authorize ?
Date: 06:10 on 13 Dec 2004
On Fri, 2004-12-10 at 15:43 -0700, Tim Pushor wrote:
> >Put it in $r->pnotes() and it will be available in later phases.
> >
> >  
> >
> 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 recommend avoiding IPC::Shareable for anything.  Cache::FastMmap is a
> >lot faster.
> >
> >  
> >
> Why avoid? Strictly for performance sake?

Yes, and because people often get into trouble with running out of
shared memory segments or clearing them out when the program dies.

> 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.

> 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.

- Perrin


        -- 
        Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html

(message missing)

Re: Persisting data across authenticate <-> authorize ?
Perrin Harkins 06:10 on 13 Dec 2004

Generated at 11:26 on 21 Dec 2004 by mariachi v0.52