Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: Looking for general pointers on Apache::Session

by Anonymous Monk
on Nov 17, 2017 at 02:21 UTC ( [id://1203642]=note: print w/replies, xml ) Need Help??


in reply to Looking for general pointers on Apache::Session

1) What's the fastest way to store session data? In the DB? In a file? What are the advantages/disadvantages of the different methods?

Generally (you know this), RAM is faster than disk ...

The only way to know for sure is to benchmark

Most people don't base their decision on speed alone

2) If I use a DB, do I have to set up the DB table for storing session data ahead of time or prep the DB in any way?

Of course, it depends, see Apache::Session::Store::MySQL for details (or ::Oracle or ... )

3) There is a module called Apache::SessionManager. Not sure if that is the direction to take or not. It looks like it might do the same thing as Apache::Session but is built specifically for mod_perl. Is that right?

Ignore that its old , less generic, hasn't been updated since 2004...

Any other useful guidance or general pointers is appreciated. Thank you very much for your time.

Remember to remind yourself Apache::Session is generic and not apache specific, you can use it from Dancer or Mojolicious or Catalyst or ...

However, it is old, the fallback random id generator isn't as good/modern/best practice as what the frameworks use

When one of the mojo(?) users discovered a better/proper sessionid/rand generator, he updated the Dancer and Catalyst guys on the issue -- there is a lot of overlap between the mojo/dancer/catalyst guys -- they don't keep up with Apache::Session -- i dont think anybody does -- the CGI::Session guys do seem to keep up ...

However

If you're aware of these things, and you like to learn, go for it, the frameworks aren't that different from "best" practices (cgi101)

All the frameworks give you a request object

All the frameworks want you to give them a response object

If you're using CGI.pm and following CGI to mod_perl Porting. mod_perl Coding guidelines you're 98% modern , only 2% away from using any "modern frameworks" which have a response object

cgi101

  • Comment on Re: Looking for general pointers on Apache::Session

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1203642]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others contemplating the Monastery: (4)
As of 2024-04-16 19:11 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found