You are viewing a plain text version of this content. The canonical link for it is here.
Posted to websh-dev@tcl.apache.org by "David N. Welton" <da...@dedasys.com> on 2002/03/21 15:22:43 UTC

session timeouts

>From my notes:

session::load

if [ we are ageing sessions ] {
   if [ timestamp in the url ] {
       if [ it's too old ] {
           new session 
       } else {
           update timestamp
       }
   } else {
       new session
   }
} 

Does that sum things up accurately?

-- 
David N. Welton
   Consulting: http://www.dedasys.com/
     Personal: http://www.dedasys.com/davidw/
Free Software: http://www.dedasys.com/freesoftware/
   Apache Tcl: http://tcl.apache.org/

---------------------------------------------------------------------
To unsubscribe, e-mail: websh-dev-unsubscribe@tcl.apache.org
For additional commands, e-mail: websh-dev-help@tcl.apache.org


Re: session timeouts

Posted by "David N. Welton" <da...@dedasys.com>.
Ronnie Brunner <ro...@netcetera.ch> writes:

[ Sorry for the late reply... I am feeling a bit ill and I fell asleep
this afternoon. ]

> Unfortunately I'm not up-to-date on that discussion, but my
> understanding is, that there are different approaches to handle
> timeouts (with some ad- and disadvantages):

The discussion I'm referring to was a quick back-and-forth between
Andrej and Simon when we were discussing the code.  I wanted to check
my understanding against what was discussed, to be sure of what I'm
doing.

> URL timestamp
> + independent of any sessions context (files or other states)
> + could enforce click tracks (only timestamps newer that the last
>   request are allowed: needs serverside state info) 
> - timestamp can be turned off (so it wouldn't work), but this is under
>   the control of the developer -> not a big issue 
> - doesn't properly handle back button issues (use an old link from the
>   browser history but be in a very "current" session)

> Absolute TTL of a session
> + independent of URL
> - usually not very usefull
> - needs a session start reference (i.e. cookie or server side context)

> Timeout on server session
> + keeps track of last access (request) and timeouts after some time of
>   inactivity
> + independent of URL timestamp -> no problems with back button
> - needs a last access reference (i.e. cookie or server side context)

> So my question is: which approach do you try to model with your
> "flow chart" code sample? Which case is the one that is most
> needed/helpful?

I'll be honest: I don't have the experience you guys do with sessions.
You are the developers who have actually used this code and therefore
are the ones who best know what would be helpful.  Simon?

> > session::load

> > if [ we are ageing sessions ] {
> >    if [ timestamp in the url ] {
> >        if [ it's too old ] {
> >            new session 
> >        } else {
> >            update timestamp
> >        }
> >    } else {
> >        new session
> >    }
> > } 

-- 
David N. Welton
   Consulting: http://www.dedasys.com/
     Personal: http://www.dedasys.com/davidw/
Free Software: http://www.dedasys.com/freesoftware/
   Apache Tcl: http://tcl.apache.org/

---------------------------------------------------------------------
To unsubscribe, e-mail: websh-dev-unsubscribe@tcl.apache.org
For additional commands, e-mail: websh-dev-help@tcl.apache.org


Re: session timeouts

Posted by Ronnie Brunner <ro...@netcetera.ch>.
Unfortunately I'm not up-to-date on that discussion, but my understanding
is, that there are different approaches to handle timeouts (with some ad-
and disadvantages): 

URL timestamp
+ independent of any sessions context (files or other states)
+ could enforce click tracks (only timestamps newer that the last
  request are allowed: needs serverside state info) 
- timestamp can be turned off (so it wouldn't work), but this is under
  the control of the developer -> not a big issue 
- doesn't properly handle back button issues (use an old link from the
  browser history but be in a very "current" session)

Absolute TTL of a session
+ independent of URL
- usually not very usefull
- needs a session start reference (i.e. cookie or server side context)

Timeout on server session
+ keeps track of last access (request) and timeouts after some time of
  inactivity
+ independent of URL timestamp -> no problems with back button
- needs a last access reference (i.e. cookie or server side context)

So my question is: which approach do you try to model with your "flow
chart" code sample? Which case is the one that is most needed/helpful?

> session::load
> 
> if [ we are ageing sessions ] {
>    if [ timestamp in the url ] {
>        if [ it's too old ] {
>            new session 
>        } else {
>            update timestamp
>        }
>    } else {
>        new session
>    }
> } 
> 
> Does that sum things up accurately?

------------------------------------------------------------------------
Ronnie Brunner                               ronnie.brunner@netcetera.ch
Netcetera AG, 8040 Zuerich    phone +41 1 247 79 79 Fax: +41 1 247 70 75

---------------------------------------------------------------------
To unsubscribe, e-mail: websh-dev-unsubscribe@tcl.apache.org
For additional commands, e-mail: websh-dev-help@tcl.apache.org