You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Jay Strauss <me...@heyjay.com> on 2003/05/17 07:05:41 UTC
Apache::Session::Oracle storing values outside the hash
Hi,
Is there anyway to make Apache::Session::Oracle, store some of the session
information outside the A_Session column. That is, I'd like it to store
session variables (I define), like UserID, TimeCreated,
ModificationTimeStamp in plain database columns? Otherwise, me as the DBA
can't use sql to do analysis and maintenance on the session table, I have to
always use perl
Thanks
Jay
Re: Apache::Session::Oracle storing values outside the hash
Posted by Jay Strauss <me...@heyjay.com>.
Ok, thanks, and that answers my question. I'll do it myself into my own
tables.
jay
----- Original Message -----
From: "Perrin Harkins" <pe...@elem.com>
To: "Jay Strauss" <me...@heyjay.com>
Cc: <mo...@perl.apache.org>
Sent: Monday, May 19, 2003 11:42 AM
Subject: Re: Apache::Session::Oracle storing values outside the hash
> On Mon, 2003-05-19 at 09:39, Jay Strauss wrote:
> > > The short answer is that you have the source, so you can do anything
you
> > > want. The Apache::Session code is pretty short and easy to modify. I
> > > have done it before and had no problems.
> >
> > I stongly doubt I'm knowledgable enough yet to attempt that.
>
> The insert and update statements and code are in
> Apache::Session::Store::DBI. They are easy to change.
>
> > That is I want to hand out a ticket, token, lease to the people who
login
> > successfully, also log that in my DB (and a little other info). I
thought
> > I'd use the Apache::Session::Oracle to do the grunt work of DB
retrieval,
> > storage..
>
> That's fine, but as I said, sessions are for temporary storage of
> transient data, not for data you are interested in. Any significant
> data that needs to be queried, backed-up, etc. should be stored in
> custom tables with custom code.
>
> - Perrin
>
>
Re: Apache::Session::Oracle storing values outside the hash
Posted by Perrin Harkins <pe...@elem.com>.
On Mon, 2003-05-19 at 09:39, Jay Strauss wrote:
> > The short answer is that you have the source, so you can do anything you
> > want. The Apache::Session code is pretty short and easy to modify. I
> > have done it before and had no problems.
>
> I stongly doubt I'm knowledgable enough yet to attempt that.
The insert and update statements and code are in
Apache::Session::Store::DBI. They are easy to change.
> That is I want to hand out a ticket, token, lease to the people who login
> successfully, also log that in my DB (and a little other info). I thought
> I'd use the Apache::Session::Oracle to do the grunt work of DB retrieval,
> storage..
That's fine, but as I said, sessions are for temporary storage of
transient data, not for data you are interested in. Any significant
data that needs to be queried, backed-up, etc. should be stored in
custom tables with custom code.
- Perrin
Re: Apache::Session::Oracle storing values outside the hash
Posted by Jay Strauss <me...@heyjay.com>.
> The short answer is that you have the source, so you can do anything you
> want. The Apache::Session code is pretty short and easy to modify. I
> have done it before and had no problems.
I stongly doubt I'm knowledgable enough yet to attempt that.
> However, I would also say that asking this question means you may be
> using sessions incorrectly
That may be. I'm really trying to use the Ticket (eagle book) example and
Randal's "basic cookie management" as guides for my authorization scheme.
That is I want to hand out a ticket, token, lease to the people who login
successfully, also log that in my DB (and a little other info). I thought
I'd use the Apache::Session::Oracle to do the grunt work of DB retrieval,
storage..
Jay
Re: Apache::Session::Oracle storing values outside the hash
Posted by Perrin Harkins <pe...@elem.com>.
On Sat, 2003-05-17 at 01:05, Jay Strauss wrote:
> Is there anyway to make Apache::Session::Oracle, store some of the session
> information outside the A_Session column. That is, I'd like it to store
> session variables (I define), like UserID, TimeCreated,
> ModificationTimeStamp in plain database columns? Otherwise, me as the DBA
> can't use sql to do analysis and maintenance on the session table, I have to
> always use perl
The short answer is that you have the source, so you can do anything you
want. The Apache::Session code is pretty short and easy to modify. I
have done it before and had no problems.
However, I would also say that asking this question means you may be
using sessions incorrectly. Sessions are for storing transient data
that you aren't interested in querying or even keeping for very long.
Any more important data should be kept in normal database tables using
code that is specific to your application.
- Perrin