Re: Multiple levels of Session Persistence

Discussion in 'ASP .Net' started by Edwin Kusters, Jul 14, 2003.

  1. Phil,

    Stupid note perhaps but you do realize that doing this method of storing
    does not guarantee that all session are kept?
    - The memory version won't work in a webfarm scenario (guess you don't have
    that)
    - Memory only session data will get lost on for instance hardware/power
    failure.
    - Changes to the configuration files can also stop/start your app removing
    memory sessions

    This can all be perfectly acceptable but wanted to mention it anyway.

    Regards,
    Edwin Kusters
    Hot ITem Informatica

    "Phil S" <> wrote in message
    news:...
    > I think that's what I'm going to end up doing, assuming there's no
    > configuration setting that will do it for me.
    >
    > "Victor Garcia Aprea [MVP]" <> wrote in message
    > news:#...
    > > Hi Phil,
    > >
    > > I've written a "PersistentStorage" type for one of my clients. It works
    > > exactly like session but persist the data to a provided storage. It has

    a
    > > data provider model so you could add different storage targets where to
    > > persist the data. Currently I've only written a MSSQL provider but its
    > > working great. Basically its a type implementing IHttpModule that based

    on
    > > the current user id retrieves his/her previous session-data when a

    request
    > > comes in and saves the session-data (only if it was modified) when a

    > request
    > > ends.
    > >
    > > --
    > > Victor Garcia Aprea
    > > Microsoft MVP | ASP.NET
    > > Looking for insights on ASP.NET? Read my blog:
    > > http://obies.com/vga/blog.aspx
    > > To contact me remove 'NOSPAM'. Please post all questions to the

    newsgroup
    > > and not by private mail.
    > >
    > > "Phil S" <> wrote in message
    > > news:%23WnHqk%...
    > > > I know it's possible to set the config file to keep sessions either in
    > > > process or persist them.
    > > >
    > > > How would one go about implementing multiple layers of Session

    > > availability;
    > > > e.g.: Keep sessions in memory for X minutes, then maintain them out of
    > > > process for Y days, then abandon them.
    > > >
    > > > The ultimate goal here is that sessions never expire, but active

    > sessions
    > > > are kept on the stove, and old zombie sessions are put in the freezer.

    > > The
    > > > configuration file seems to allow for the stove or the freezer, but

    not
    > > > both.
    > > >
    > > > Any help is appreciated.
    > > >
    > > >

    > >
    > >

    >
    >
    Edwin Kusters, Jul 14, 2003
    #1
    1. Advertising

  2. Edwin Kusters

    Phil S Guest

    Thanks for the heads up..
    Actually, I had thought of this, but for the present, we are merely
    concerned with not having people time out in normal usage, such as taking a
    potty break in the middle of using the site. We'll probably end up with
    some kind of session server to handle short-term state management.


    "Edwin Kusters" <> wrote in message
    news:uM##...
    > Phil,
    >
    > Stupid note perhaps but you do realize that doing this method of storing
    > does not guarantee that all session are kept?
    > - The memory version won't work in a webfarm scenario (guess you don't

    have
    > that)
    > - Memory only session data will get lost on for instance hardware/power
    > failure.
    > - Changes to the configuration files can also stop/start your app removing
    > memory sessions
    >
    > This can all be perfectly acceptable but wanted to mention it anyway.
    >
    > Regards,
    > Edwin Kusters
    > Hot ITem Informatica
    >
    > "Phil S" <> wrote in message
    > news:...
    > > I think that's what I'm going to end up doing, assuming there's no
    > > configuration setting that will do it for me.
    > >
    > > "Victor Garcia Aprea [MVP]" <> wrote in message
    > > news:#...
    > > > Hi Phil,
    > > >
    > > > I've written a "PersistentStorage" type for one of my clients. It

    works
    > > > exactly like session but persist the data to a provided storage. It

    has
    > a
    > > > data provider model so you could add different storage targets where

    to
    > > > persist the data. Currently I've only written a MSSQL provider but its
    > > > working great. Basically its a type implementing IHttpModule that

    based
    > on
    > > > the current user id retrieves his/her previous session-data when a

    > request
    > > > comes in and saves the session-data (only if it was modified) when a

    > > request
    > > > ends.
    > > >
    > > > --
    > > > Victor Garcia Aprea
    > > > Microsoft MVP | ASP.NET
    > > > Looking for insights on ASP.NET? Read my blog:
    > > > http://obies.com/vga/blog.aspx
    > > > To contact me remove 'NOSPAM'. Please post all questions to the

    > newsgroup
    > > > and not by private mail.
    > > >
    > > > "Phil S" <> wrote in

    message
    > > > news:%23WnHqk%...
    > > > > I know it's possible to set the config file to keep sessions either

    in
    > > > > process or persist them.
    > > > >
    > > > > How would one go about implementing multiple layers of Session
    > > > availability;
    > > > > e.g.: Keep sessions in memory for X minutes, then maintain them out

    of
    > > > > process for Y days, then abandon them.
    > > > >
    > > > > The ultimate goal here is that sessions never expire, but active

    > > sessions
    > > > > are kept on the stove, and old zombie sessions are put in the

    freezer.
    > > > The
    > > > > configuration file seems to allow for the stove or the freezer, but

    > not
    > > > > both.
    > > > >
    > > > > Any help is appreciated.
    > > > >
    > > > >
    > > >
    > > >

    > >
    > >

    >
    >
    Phil S, Jul 15, 2003
    #2
    1. Advertising

  3. Why not just make the session timeout longer?

    --
    John Saunders
    Internet Engineer



    "Phil S" <> wrote in message
    news:...
    > Thanks for the heads up..
    > Actually, I had thought of this, but for the present, we are merely
    > concerned with not having people time out in normal usage, such as taking

    a
    > potty break in the middle of using the site. We'll probably end up with
    > some kind of session server to handle short-term state management.
    >
    >
    > "Edwin Kusters" <> wrote in message
    > news:uM##...
    > > Phil,
    > >
    > > Stupid note perhaps but you do realize that doing this method of storing
    > > does not guarantee that all session are kept?
    > > - The memory version won't work in a webfarm scenario (guess you don't

    > have
    > > that)
    > > - Memory only session data will get lost on for instance hardware/power
    > > failure.
    > > - Changes to the configuration files can also stop/start your app

    removing
    > > memory sessions
    > >
    > > This can all be perfectly acceptable but wanted to mention it anyway.
    > >
    > > Regards,
    > > Edwin Kusters
    > > Hot ITem Informatica
    > >
    > > "Phil S" <> wrote in message
    > > news:...
    > > > I think that's what I'm going to end up doing, assuming there's no
    > > > configuration setting that will do it for me.
    > > >
    > > > "Victor Garcia Aprea [MVP]" <> wrote in message
    > > > news:#...
    > > > > Hi Phil,
    > > > >
    > > > > I've written a "PersistentStorage" type for one of my clients. It

    > works
    > > > > exactly like session but persist the data to a provided storage. It

    > has
    > > a
    > > > > data provider model so you could add different storage targets where

    > to
    > > > > persist the data. Currently I've only written a MSSQL provider but

    its
    > > > > working great. Basically its a type implementing IHttpModule that

    > based
    > > on
    > > > > the current user id retrieves his/her previous session-data when a

    > > request
    > > > > comes in and saves the session-data (only if it was modified) when a
    > > > request
    > > > > ends.
    > > > >
    > > > > --
    > > > > Victor Garcia Aprea
    > > > > Microsoft MVP | ASP.NET
    > > > > Looking for insights on ASP.NET? Read my blog:
    > > > > http://obies.com/vga/blog.aspx
    > > > > To contact me remove 'NOSPAM'. Please post all questions to the

    > > newsgroup
    > > > > and not by private mail.
    > > > >
    > > > > "Phil S" <> wrote in

    > message
    > > > > news:%23WnHqk%...
    > > > > > I know it's possible to set the config file to keep sessions

    either
    > in
    > > > > > process or persist them.
    > > > > >
    > > > > > How would one go about implementing multiple layers of Session
    > > > > availability;
    > > > > > e.g.: Keep sessions in memory for X minutes, then maintain them

    out
    > of
    > > > > > process for Y days, then abandon them.
    > > > > >
    > > > > > The ultimate goal here is that sessions never expire, but active
    > > > sessions
    > > > > > are kept on the stove, and old zombie sessions are put in the

    > freezer.
    > > > > The
    > > > > > configuration file seems to allow for the stove or the freezer,

    but
    > > not
    > > > > > both.
    > > > > >
    > > > > > Any help is appreciated.
    > > > > >
    > > > > >
    > > > >
    > > > >
    > > >
    > > >

    > >
    > >

    >
    >
    John Saunders, Jul 22, 2003
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Chris Rathman

    Session persistence

    Chris Rathman, Jan 2, 2006, in forum: ASP .Net
    Replies:
    3
    Views:
    3,276
    Chris Rathman
    Jan 3, 2006
  2. javaguy44
    Replies:
    10
    Views:
    978
    Michael Berg
    May 18, 2004
  3. reclusive monkey
    Replies:
    2
    Views:
    1,394
    reclusive monkey
    Aug 10, 2005
  4. Jeppe Jespersen

    (2.0) Multiple horizontal menu levels

    Jeppe Jespersen, Jun 14, 2006, in forum: ASP .Net
    Replies:
    3
    Views:
    504
    Bruno Alexandre
    Jun 14, 2006
  5. Kenneth P. Turvey

    Java Persistence API and persistence.xml

    Kenneth P. Turvey, Mar 15, 2008, in forum: Java
    Replies:
    2
    Views:
    17,309
    Kenneth P. Turvey
    Mar 16, 2008
Loading...

Share This Page