You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Adam Gent <ap...@hat-technologies.ltd.uk> on 2003/04/20 01:00:24 UTC

Apache::Session

Hi All,

I am looking at using Apache::Session::MySQL with mod_perl and was wondering
how well it worked with mod_perl.

I will be using the URL interface to carry the session id around as I do not
like to use cookies.

I have found  Apache::SessionManager which says that it is a mod perl
extension which is built around Apache::Session but I am not sure how easy
it will be to use with the URL interface it does not also seem to be very
widely used.

The only advantage that it does have over Apache::Session is that it allows
for session expiration, although this is not a major problem as I already
have a set of scripts that add in time expiration I just need to convert
them into a perl mod.

So my main question is which will be better to use with mod_perl,
Apache::Session, bearing in mind I have my own perl wrapper around it or
Apache::SessionManager.

I am mainly looking at performance issues.

Any ideas?

Thanks,

Adam


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.474 / Virus Database: 272 - Release Date: 19/04/2003


Re: Apache::Session

Posted by Perrin Harkins <pe...@elem.com>.
On Saturday 19 April 2003 7:00 pm, Adam Gent wrote:
> I am looking at using Apache::Session::MySQL with mod_perl and was
> wondering how well it worked with mod_perl.

It works fine with mod_perl, although it doesn't really have anything to do 
with mod_perl directly.  All it does is provide a persistent shared hash for 
you to put data into.  Tracking users with cookies or URLs is left up to you.

> I have found  Apache::SessionManager which says that it is a mod perl
> extension which is built around Apache::Session but I am not sure how easy
> it will be to use with the URL interface it does not also seem to be very
> widely used.

It maintains session IDs over cookies or URLs and ties them to a persistent 
hash handled by Apache::Session.  You could also look at 
Apache::AuthCookieURL for this, although you will have to write more glue 
code with that one.

> The only advantage that it does have over Apache::Session is that it allows
> for session expiration

It also handles tracking users, which Apache::Session does not.

> So my main question is which will be better to use with mod_perl,
> Apache::Session, bearing in mind I have my own perl wrapper around it or
> Apache::SessionManager.

If Apache::SessionManager or another similar module does what you need, you 
may as well use it.  It will save you time.

> I am mainly looking at performance issues.

It's unlikely that this sort of module would be a performace problem, but if 
you do some profiling and discover that it is slow, you have the source and 
you can fix it.

- Perrin