Technorama

An omnibus of tech posts by a Futurologist on software development primarily.

Sunday, 25 November 2007

 

Expiring web sessions

I do a *lot* of online shopping these days, the high-street is so far away, and then I have to find parking too. (Even then, when I get back to my car I may find dents in the doors from the adjacent car because the greedy car park company only allows a tiny space for each car!)

So, back to my point. Why do web-sessions expire? Visit confused.com and you'll often get:

We are sorry but your interactive session has expired.

So we have to go back and fill in all the forms again. The reason we have these web applications which don't work is because there isn't a professional UI/widget layout development system like we have on GNU-Linux with Qt and Qt Designer etc. So every programmer tries to do his/her best, redeveloping the wheel. Which leaves things like even the "Exit Confused Site" button not working.

Once we get a better web-server configuration which fits with a standard web application UI/widget these problems will go away, so for the moment we still have to suffer when using websites like confused.com.. oh well, things will improve eventually.

Labels:


Comments:
I'm interested to hear what your alternative solution would be. I lot of the sites expire for efficiency (closing uncompleted database transactions) and security (not storing data on the web server that is no longer active).

I've seen suggestions for adding OpenID to improve persistence of sessions (using a login on sites I use a lot does work for me), and there's a chance that writing for Firefox 3.0's new offline functionality may solve this (if the offline mode is triggered automatically), but do you have any other ideas?
 
The first change has to be eliminating the timeouts. Increase it to 24hrs since last activity. My HTTPS GMail or forum login doesn't expire, so web shopfronts don't need to either.

As you say, persistence is key. Where a local application would store the data conventionally there needs to be a secure online repository (or offline via the Firefox 3.0 offline functionality you also mention). I'd personally prefer an OpenID online system, but I expect someone like Google will get the first working solution out. GMail-google-gears? I posted about the tabbed browsing problem which is related BTW.

Have you got any ideas yourself? This area is definitely going to be key in the next five years, and the first group to get it right with a widely adopted solution will be in a great place.
 
I think at the moment there are only 3 ways to persist data for shop fronts: Authenticated logins, cookies, or storing state in the URL.

The third has far too many security holes to be useful in this case (change the URL, get someone else's account) and any cookie-based solution will need to store state on the server, unless you want to send pricing and quantity information to and from and un-trusted client.

So we either use an id saved in a cookie or an authenticated login, which will behave in very similar ways as far as the web app is concerned: Pick up the unique identifier, retrieve the current session, generate the web page.

Cookies expire, it's part of their contract, and they can be deleted. Also, a large number of users (according to a survey earlier this year - reporting in The Register IIRC), will populate their cart, find the delivery price and decide to go elsewhere, but that session has to be stored as if they don't go elsewhere. What happens if, say, that session contains a Wii, which is then either out of stock when the customer next visits the site, or is held reserved in that order waiting for the customer to buy or cancel?

I think the problem is that for something like a forum or mail, a single form submission is an atomic transaction, so the server can store a complete state, but with shopping, each form submission updates the state of an ongoing transaction, and the longer that transaction goes on, the further out of sync it gets with the database (anyone who's used branching in source control will appreciate this I'm sure), so the problem is not only how to persist a transaction that cannot be committed, but updating that transaction to reflect the current system state. I see that as non-trivial.

For your insurance example, where I know quotes themselves expire after 30 days, the only solution I can really think of would be:

(1) Store your important details (i.e. name, address, type of car etc.) as one set of persistent information

(2) Store completed quotes with references to your details

(3) Automatically populate new quotes with your details and generate them just in time.

(4) Make sure that user interaction (logout buttons for example) never expires and always returns a valid state.
 
Post a Comment

Subscribe to Post Comments [Atom]





<< Home

Archives

February 2003   March 2003   April 2003   August 2004   September 2004   December 2004   May 2005   June 2005   December 2006   January 2007   February 2007   March 2007   April 2007   July 2007   August 2007   September 2007   October 2007   November 2007   December 2007   January 2008   February 2008   March 2008   April 2008   May 2008   June 2008   July 2008   August 2008   September 2008   October 2008   November 2008   December 2008   January 2009   February 2009   March 2009   April 2009   September 2009   November 2009   December 2009   January 2010   April 2010   September 2010   October 2010   November 2010   December 2010   January 2011   February 2011   March 2011   April 2011   May 2011   June 2011   July 2011   August 2011   September 2011   October 2011   November 2011   December 2011   January 2012   February 2012   March 2012   April 2012   May 2012   June 2012   July 2012   October 2012   December 2012   March 2013   May 2013   August 2013   September 2013   October 2013   November 2013   March 2014   May 2014   June 2014   July 2014   September 2014   October 2014   December 2014   January 2015   February 2015   March 2015   April 2015   May 2015   June 2015   July 2015   August 2015   September 2015   October 2015   November 2015   December 2015   March 2016   April 2016   May 2016   July 2016   August 2016   September 2016   October 2016   November 2016   December 2016   January 2017   February 2017   March 2017   April 2017   May 2017   June 2017   July 2017   August 2017   September 2017   November 2017   March 2018   April 2018   May 2018   June 2018   August 2018   October 2018   December 2018   January 2019   March 2019   May 2019   August 2019   September 2019   March 2020   April 2020   May 2020   September 2020   October 2020   February 2022   June 2022   July 2022   October 2022   December 2022   February 2023   April 2023   September 2023   October 2023   May 2024   June 2024   July 2024  

This page is powered by Blogger. Isn't yours?

Subscribe to Posts [Atom]