On Fri, 28 Apr 2000, Adi wrote:
> "Jeffrey W. Baker" wrote:
> >
> > On Fri, 28 Apr 2000, Dan McCormick wrote:
> >
> > > "Jeffrey W. Baker" wrote:
> > > >
> > > > On my sites I use a central database for storing the session objects, and
> > > > all of the https servers access this central resource. Obviously if it
> > > > goes down, everything is toast, but the same can be said of the database
> > > > that stores all of the customer information, etc.
> > > >
> > > > -jwb
> > >
> > > Are you using Apache::ASP to generate sessions?
> > >
> > > Has anyone tried using Tie::DBI to store Apache::ASP sessions in a db?
> > > That might solve problems with NFS sharing issues, though it might also
> > > bog things down.
> >
> > No, I use Apache::Session - jwb
>
> Dan,
>
> I suggest you switch to Apache::Session. If you've got a site that gets
> heavy traffic (which sounds like is the case if you're thinking about load
> balancing), you definitely want a true DBMS handling your session data, not
> just a Berkeley DB_File.
I wouldn't buy that one on its own merits. I think that each site should
evaluate their performance situation and see what backing store works for
them. Sleepycat DB (nee Berkeley DB) 3.x, using balanced tree storage, is
a damn fast storage mechanism. If you only have a single web server, dbm
files are often the fastest blob storage mechanism. With that said,
remote DBMS storage scales best with more than a single web server. Much
better than NFS.
> I used to use Apache::ASP for session management but switched to
> Apache::Session for this reason. I think Apache::ASP is a great solution
> for low-traffic sites, but Apache::Session is a must for high-volume and/or
> load-balanced sites.
>
> Apache::Session incorporates its own Tie::DBI implementation to manage
> sessions. (is this correct, Jeffrey?) I don't know how successful you'd be
> taking a hash already tied to a DB_File (via Apache::ASP) and then trying to
> tie it to a DBMS via Tie::DBI. At best, you'd have two copies of your
> session data, but most likely it wouldn't work.
Apache::Session is similar to Tie::DBI in that it knows how to take your
perl structures, put them in a backing store, and get them back out. It
is unlike Tie::DBI in that it also knows how to put your data in flat
files, berkeley DBs, and whatever else you need.
"Apache::Session is a persistence framework"
-jwb