Re: Apache::Session::Pg & blob support?

2000-05-27 Thread Jeffrey W. Baker

On Sat, 27 May 2000, Gunther Birznieks wrote:

> At 03:08 PM 5/26/00 -0400, Richard Dice wrote:
> >Hello there...
> >
> >I was wondering, with the new Pg-specific support you've got going with
> >Apache::Session, does it handle Pg blobs transparently?
> >
> >The regular limit on the size of a tuple in Pg is 8k, which can be a
> >problem if I'm trying to put more than that into my Apache::Session
> >tied hash.  (Yes, I do that sometimes.  It's a handy place to hide
> >stuff, those sessions...)
> 
> Well, they are handy at that. But on the other hand, I tend to question the 
> use of storing a LOT of data in sessions.
> 
> At the point that the data reaches a critical mass, then it is likely that 
> the data is getting more crucial to the application. If the data is crucial 
> to the application, that also tends to mean that it would be best served 
> (ultimately) by having an appropriate data structure where the session ID 
> happens to be a key.

While my persistent objects tend to be under 1K, I don't intend to enforce
policy on users of Apache::Session.  If we can remove a size limitation
without introducing other problems, I say let's do it.

-jwb

> 
> eg I may make a file based session for just storing sundry things, but I 
> would rarely want to store a shopping cart for a web store inside a 
> session.  A shopping cart is a data structure that has potential links to 
> other information such as inventory tables. Now, the cart should be tied to 
> the session id anyway, but whether the data should be stored as one big 
> blob is another issue.
> 
> Another thing about huge sessions is that depending on your locking and 
> concurrency considerations, one big blob can become suboptimal for 
> performance if you are not careful.
> 
> Anyway, I guess this is just a philosophical issue with me. I know others 
> like to store everything in their sessions. :)
> 
> Later,
> Gunther
> 
> __
> Gunther Birznieks ([EMAIL PROTECTED])
> Extropia - The Web Technology Company
> http://www.extropia.com/
> 
> 




Re: Apache::Session::Pg & blob support?

2000-05-26 Thread Gunther Birznieks

At 03:08 PM 5/26/00 -0400, Richard Dice wrote:
>Hello there...
>
>I was wondering, with the new Pg-specific support you've got going with
>Apache::Session, does it handle Pg blobs transparently?
>
>The regular limit on the size of a tuple in Pg is 8k, which can be a
>problem if I'm trying to put more than that into my Apache::Session
>tied hash.  (Yes, I do that sometimes.  It's a handy place to hide
>stuff, those sessions...)

Well, they are handy at that. But on the other hand, I tend to question the 
use of storing a LOT of data in sessions.

At the point that the data reaches a critical mass, then it is likely that 
the data is getting more crucial to the application. If the data is crucial 
to the application, that also tends to mean that it would be best served 
(ultimately) by having an appropriate data structure where the session ID 
happens to be a key.

eg I may make a file based session for just storing sundry things, but I 
would rarely want to store a shopping cart for a web store inside a 
session.  A shopping cart is a data structure that has potential links to 
other information such as inventory tables. Now, the cart should be tied to 
the session id anyway, but whether the data should be stored as one big 
blob is another issue.

Another thing about huge sessions is that depending on your locking and 
concurrency considerations, one big blob can become suboptimal for 
performance if you are not careful.

Anyway, I guess this is just a philosophical issue with me. I know others 
like to store everything in their sessions. :)

Later,
Gunther

__
Gunther Birznieks ([EMAIL PROTECTED])
Extropia - The Web Technology Company
http://www.extropia.com/




Re: Apache::Session::Pg & blob support?

2000-05-26 Thread Michael Schout

On Fri, May 26, 2000 at 12:25:39PM -0700, Jeffrey W. Baker wrote:
> Yes it would be great to break the 8K (actually slightly less) limit, if
> it doesn't hamper performance too much.  I read the docs on the Postgres
> web site, but I didn't find anything interesting about blob support.

I'm working on such a package.  I will send it to you when I have it working to
my liking :).

Mike



Re: Apache::Session::Pg & blob support?

2000-05-26 Thread Jeffrey W. Baker

On Fri, 26 May 2000, Richard Dice wrote:

> Hello there...
> 
> I was wondering, with the new Pg-specific support you've got going with
> Apache::Session, does it handle Pg blobs transparently?
> 
> The regular limit on the size of a tuple in Pg is 8k, which can be a
> problem if I'm trying to put more than that into my Apache::Session
> tied hash.  (Yes, I do that sometimes.  It's a handy place to hide
> stuff, those sessions...)
> 
> If that's not part of the new release, probably me and/or another guy
> I'm working with is going to code that up.  We talked about it a few
> days ago but wanted to wait until the new release to see what the status
> of this would be.

Yes it would be great to break the 8K (actually slightly less) limit, if
it doesn't hamper performance too much.  I read the docs on the Postgres
web site, but I didn't find anything interesting about blob support.

I would welcome a patch.  Are you trying to stuff GIFs into the session
hash? ;)

Regards,
Jeffrey




Apache::Session::Pg & blob support?

2000-05-26 Thread Richard Dice

Hello there...

I was wondering, with the new Pg-specific support you've got going with
Apache::Session, does it handle Pg blobs transparently?

The regular limit on the size of a tuple in Pg is 8k, which can be a
problem if I'm trying to put more than that into my Apache::Session
tied hash.  (Yes, I do that sometimes.  It's a handy place to hide
stuff, those sessions...)

If that's not part of the new release, probably me and/or another guy
I'm working with is going to code that up.  We talked about it a few
days ago but wanted to wait until the new release to see what the status
of this would be.

Cheers,
Richard


 Richard Dice * Personal 514 816 9568 * Fax 514 816 9569
 ShadNet Creator * http://shadnet.shad.ca/ * [EMAIL PROTECTED]
 Occasional Writer, HotWired * http://www.hotwired.com/webmonkey/
 "squeeze the world 'til it's small enough to join us heel to toe"
 - jesus jones