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 does not need to be exact, more of a guestimate will work.
So my thought is 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 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 am 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 is not a high traffic application, as it was developed for a customer of ours, maybe 100 users at most.
There are various methods implemented to monitor and manage user activity such as: Video recordings of sessions. Log collection and analysis. Network packet inspection.
User Activity Monitoring is a type of proactive surveillance that helps to prevent misuse of access privileges.
CloudTrail is a service that is used to track user activity and API usage in AWS cloud. It enables auditing and governance of the AWS account. With it, you can monitor what is happening in your AWS account and continuously monitor them. It provides event history which tracks resource changes.
To track the logged in users on your site, you need to go to the WP Activity Log » Logged In Users page. From here you will see all the users who are logged into your site. You can view all the activity of a certain user, or force someone to log out by clicking on the Terminate Session button.
Our solution is to maintain a "Transaction" table (which follows what was done), in addition to our "Session" table (which follows who was here). UPDATE, INSERT and DELETE instructions are all managed through a "Transaction" object and each of these SQL instruction is stored in the "Transaction" table once it has been successfully executed on the database (depending on tables updated: we have the possibility to specifically follow some tables and ignore others). This "Transaction" table has other fields such as transactiontType (I for INSERT, D for DELETE, U for UPDATE), transactionDateTime, etc, and a foreign key "sessionId", telling us finally who sent the instruction. It is even possible, through some code, to identify who did what and when (Gus created the record on monday, Tim changed the Unit Price on tuesday, Liz added an extra discount on thursday, etc).
Pros for this solution are:
Cons are
Our choice: all records older than 90 days are automatically deleted every morning
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With