aspose file tools*
The moose likes Other Application Frameworks and the fly likes Log and persist all user activity on the website? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Other Application Frameworks
Bookmark "Log and persist all user activity on the website?" Watch "Log and persist all user activity on the website?" New topic
Author

Log and persist all user activity on the website?

tapeshwar sharma
Ranch Hand

Joined: Mar 10, 2006
Posts: 245
My manager has asked me to find a solution to log "every" single activity and put it into the Database.
Like from the time the users access the website, their IP address, what all links they clicked, what search parameters were given and also log any exception that were encountered and put that log into the database.
Also, the code should be non-intrusive.
I fail to understand the need and the feasibility of doing this.
I tried to ask, but he left in a hurry and said that he's expecting me to propose a solution when he gets back.
Anybody knows if there's a framework to do that ?
First of all why would we require to log all activities of all the users?
To my knowledge even if we are auditing, we don't sniff the links that a user might click.And why would we want to store that in a database?
Jason Nesbitt
Greenhorn

Joined: Aug 16, 2004
Posts: 16
Prashant

What you are trying to do can likely be better accomplished with web analytics software such as Webtrends (commercial and expensive) or AWStats (open source and free).

If you decide to roll your own solution, you can find most of the information that you want in the HttpServletRequest object. The proper place to record this information would be in a servlet filter.
Jason Nesbitt
Greenhorn

Joined: Aug 16, 2004
Posts: 16
.. and the reasoning for collecting this information is usually for marketing and/or usability data. Sometimes for security too.
tapeshwar sharma
Ranch Hand

Joined: Mar 10, 2006
Posts: 245
Filter is what came to my mind as well, but wouldn't it be bad for the application's performance if every action of every user is persisted?
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18992
    
    8

Bad? It might be. And then again it might not be. It all depends on your application and how you implement this logging and what your response time goals are and so on.
tapeshwar sharma
Ranch Hand

Joined: Mar 10, 2006
Posts: 245
It is a high transaction application. There are 4 appservers clustered together.Right now, the response time is short.Basically, I am not sure about whether it is a usual practice for high transaction applications to log user activities like that.
WebTrends is a good product for that, but it doesn't require changing much inside the application, and I would be surprised if it logs the application errors.It seems the application is trying to do too many things.
Does the explanation make it easier to answer the question?
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18992
    
    8

Originally posted by prashant bhardwaj:
WebTrends is a good product for that, but it doesn't require changing much inside the application, and I would be surprised if it logs the application errors.
Don't assume you have to have a single solution to address all of those requirements. I wouldn't think it's a bad thing to log application errors to a different place than where you log all of the incoming transactions. In fact if you did that, they would just get lost in the noise.
tapeshwar sharma
Ranch Hand

Joined: Mar 10, 2006
Posts: 245
Thanks everyone for their inputs.
My Boss realized how complex it is getting and now we are left with a much leaner task.
In short, this is a mimic of WebTrends.
May be the company didn't have the money to spare for that product.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Log and persist all user activity on the website?