[Zope] Using "Session" to store per-session data.

Alexander Staubo alex@mop.no
Tue, 14 Sep 1999 15:56:43 +0200


In my opinion it's getting increasingly obvious that the ZODB badly
needs cheap, non-undoable, "transient" transactions.

Counters, sessions, often-refreshed internal state tables -- lots of
applications need it, and moving this stuff outside the ZODB breaks with
the object-oriented design.

How it's actually implemented is irrelevant, be it in-memory or
file-based, but in its simplest form it should not be difficult to do.

-- 
Alexander Staubo             http://www.mop.no/~alex/
"`Ford, you're turning into a penguin. Stop it.'"
--Douglas Adams, _The Hitchhiker's Guide to the Galaxy_

> -----Original Message-----
> From: Anthony Baxter [mailto:anthony@interlink.com.au]
> Sent: 14. september 1999 10:57
> To: Paul Everitt
> Cc: Tony McDonald; zope@zope.org
> Subject: Re: [Zope] Using "Session" to store per-session data. 
> 
> 
> >>> Paul Everitt wrote
> > I wonder why you think the ZODB isn't the place to do this?
> > If it is because of the versioning issue:
> 
> It is indeed because of the versioning issue.
> 
> > 1) You can create a special datastructure that doesn't 
> version on every
> > commit, but instead perhaps every minute.  Think of it as halfway
> > between volatile and persistent.
> 
> That's still going to be an awfully large number of objects in the DB.
> And it'll blow the undo log to hell...
> 
> > 2) One of these days we'll come out with a non-versioning 
> Storage class,
> > plus allow people to mix Storages in the same process.
> 
> At that point, I think it would be useful to reconsider storing things
> like webcounters and sessions in the ZODB.
> 
> > 3) Then again, perhaps people could live with the 20 byte 
> or so growth
> > on each Session commit.
> 
> not really. If you look at a different way - committing once a minute
> means that it's one commit per minute, per current user of 
> the web site.
> More importantly, if you do have to bounce Zope for some reason,
> then all active users will suddenly find their web sessions rewinding
> backwards by up to a minute. One of the main things I'm using this for
> is for multi-page forms - having the session suddenly rewind would be
> very confusing for a user...
> 
> _______________________________________________
> Zope maillist  -  Zope@zope.org
> http://www.zope.org/mailman/listinfo/zope
> 
> (To receive general Zope announcements, see:
> http://www.zope.org/mailman/listinfo/zope-announce
> 
> For developer-specific issues, zope-dev@zope.org -
> http://www.zope.org/mailman/listinfo/zope-dev )
>