And So I am creating the spec for that user monitoring module for any social website. Wanted feedback on a great way to get this done.
Presently I've something similar to this: First the game table will get populated with ActivityID and UserID (Activity is just like footprint).
Then your ActivityDetails is stuffed with the game particulars that has:
ObjectID (the item the game happened on, for example Photo, Video, Status update, etc)
PageID (the page the consumer was on)
LocationID (optional, such as the put on the page - like around the comment box, user wall, ad box, etc.)
OwnerID (the consumer ID of who owns the item)
ActionID (The experience the consumer required for example "Share" "Publish" "Add", etc) UserID (the consumer the monitoring has been done on) For that above we're storing the kind of each from the reference table and also the unique ID from the actual entity.
The open problem is: First may be the above complete or perhaps is another thing missing? This can be a social site being developed, like facebook however for different reasons. Second factor is, from the understanding you will find two kinds of user activities possible:
A) Any action through the user itself
B) Any action others take relevant towards the user.
For Any, it needs to flow from the user session because clearly the consumer needs to be drenched directly into perform any pursuit on his account if it's to become monitored. For B, the consumer might be online as others might take actions like "View profile" "Send friend request" etc once the user is offline.
So for B, the above mentioned data looks fine. However for A, if session based then additional data must be recoded like the session particulars (Ip, MAC address, Geolocation, Session start/finish time, etc.) And So I am thinking possess a flag or reference occur the game table if it's by user or by others. If by user then link all of the activities using the parent session as all of the activities will share exactly the same session when they happened within that session. So 1 session might have multiple Activities.
Then there's user notices. Then when an "Action" is joined, it triggers a notification event to inform the consumer from the action. Notices on this website are sent via SMS, Email as well as on-site notices with respect to the user's preferences.
Is a legitimate design bearing in mind scalability and seeking to trace user activities in detailed? Additionally the customers will have the ability to view this monitored data, but for the privacy concerned folks - even remove it from system after X period of time.