Our customer would like to know who is online and currently using the custom application we wrote for them. I discussed it with them and this doesn't need to be exact, more of a guestimate will work.
So my thought were maybe a 15 minute time interval to determine user activity. Some ideas I have for doing this are as follows:
Stamp their user record with a date and time of their last activity every time they do something that hits the database, or requests a web page ... this though could be quite database intensive.
Send out a "who is online request" from our software, looking for responses, this could be done at a scheduled interval, and then stamp the user record with the current date and time for each response I received.
What are your thoughts? And how would you handle this situation?
Clarification
I would like to use the same architecture for both Windows or the Web. If, it's possible. I have a single business logic layer that multiple user interfaces interact with, could be Windows or the Web.
By Windows I would mean client-server.
Clarification
I'm using an n-tier architecture ... so my business objects handle all the interaction with the presentation layer. That presentation layer could be feeding a client-server Windows application, Web application, Web Service and so on.
It's not a high traffic application, as it was developed for a customer of ours, maybe 100 users at most.