You use the phase "user logs out" so I assume people have accounts on this service. There are a number of ideas on the table already with regards to sessioning, storing only session IDs on client cookies and using server storage for the lists.

I have always tried to associate the 'timeout' for each persion (session) separately and base it off of the inter-message delay. So, anyone who is working on a list will lose the list if they leave it unfinished for a day (e.g.). Depending on the nature of these lists, you might also want to use a 'list' key in addition to a session key, allowing the same visitor to manage multiple lists.

Another thing we found when building sites for clients is that even within six months the traffic patterns on their sites would change (often increase) and hence it was highly adviseable to link that 'timeout' to an actual resource parameter.

For example, the 'timeout' would vary b/w 1 hour, 6 hours, 12 hours, 24 hours; based on a function that took into consideration the disk space available, the number of new lists being created over the past three hours, the 'authority' level of the user, and the calculated decay rate of information (how many disk space will be freed up in the next three hours). Once a time out is assigned, and the user is told about it, it shouldn't change.

If you have a large number of users hitting the site, specially if users can sign on automatically, this measure is a semi-decent measure against running out of resources because of heavy use (or malicious use).

And of course, move any finished lists to a separate dedicated data storage.

-- termix


In reply to Re: A CGI chained-event theory question by termix
in thread A CGI chained-event theory question by JPaul

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.