OT: Detecting if client is idle in SL

OT: Detecting if client is idle in SL

Old forum URL: forums.lhotka.net/forums/t/7376.aspx


Jack posted on Friday, July 31, 2009

Any ideas on how to easily do that?  I can't find any reference/sample to this on google etc.

I want to do a couple of things:

1) Refresh the UI to show background loaded data

2) Force a re-login if idle for too long (like a screen saver).

The users' just realized that my application can site open overnight and pick up right where it left off :-)

sergeyb replied on Friday, July 31, 2009

I have been thinking about the whole idle time.  Here is my suggestion.  If your client is fine with saying that lack of server interaction constitutes idle time and you have custom compressed proxy, you can probably add a field to LocalContext, and have your proxy stamp that field every time it hits the server.  You can also have a time running on your main form (root visual) that can monitor this field and log the person out at the appropriate time.

 

Sergey Barskiy

Principal Consultant

office: 678.405.0687 | mobile: 404.388.1899

cid:_2_0648EA840648E85C001BBCB886257279
Microsoft Worldwide Partner of the Year | Custom Development Solutions, Technical Innovation

 

From: Jack [mailto:cslanet@lhotka.net]
Sent: Friday, July 31, 2009 1:51 PM
To: Sergey Barskiy
Subject: [CSLA .NET] OT: Detecting if client is idle in SL

 

Any ideas on how to easily do that?  I can't find any reference/sample to this on google etc.

I want to do a couple of things:

1) Refresh the UI to show background loaded data

2) Force a re-login if idle for too long (like a screen saver).

The users' just realized that my application can site open overnight and pick up right where it left off :-)


Jack replied on Friday, July 31, 2009

Sergey,

 

Thank you for the suggestion.  I will certainly take your idea under consideration - my first thought is that the users can do a lot on long running tasks (entering data) before committing the change to the database and I'm really trying to limit the server hits from some sites due to their lousy bandwidth.  I'm loading data in the background and caching as much data client side as I can.  It would likely be a fine solution for some users but not others but it would work with a long timeout (1hr plus).

 

The client that is most concerned however has a current implementation with I believe 15min timeout.

 

I do plan to implement some auto-saving at some point but right now the complexity to restore it and deal with it doesn't fit into my timeframe.  I could probably stick some 'fake server' calls in to various spots like navigation or page changes that updates the proxy stamp locally.

 

I'm a little surprised there isn't a SL solution out of the box.  Maybe there is some way to tie into the UI thread to reset the timer everytime some UI action kicks off and then monitor that timer from a background thread or something.

 

thanks

 

jack

 

From: Sergey Barskiy [mailto:cslanet@lhotka.net]
Sent: July-31-09 3:38 PM
To: jaddington@alexandergracie.com
Subject: RE: [CSLA .NET] OT: Detecting if client is idle in SL

 

I have been thinking about the whole idle time.  Here is my suggestion.  If your client is fine with saying that lack of server interaction constitutes idle time and you have custom compressed proxy, you can probably add a field to LocalContext, and have your proxy stamp that field every time it hits the server.  You can also have a time running on your main form (root visual) that can monitor this field and log the person out at the appropriate time.

 

Sergey Barskiy

Principal Consultant

office: 678.405.0687 | mobile: 404.388.1899

cid:_2_0648EA840648E85C001BBCB886257279
Microsoft Worldwide Partner of the Year | Custom Development Solutions, Technical Innovation

 

From: Jack [mailto:cslanet@lhotka.net]
Sent: Friday, July 31, 2009 1:51 PM
To: Sergey Barskiy
Subject: [CSLA .NET] OT: Detecting if client is idle in SL

 

Any ideas on how to easily do that?  I can't find any reference/sample to this on google etc.

I want to do a couple of things:

1) Refresh the UI to show background loaded data

2) Force a re-login if idle for too long (like a screen saver).

The users' just realized that my application can site open overnight and pick up right where it left off :-)



Copyright (c) Marimer LLC