At the internet site where I used to work we maintained this type of
information in the database and then periodically updated the values in our
webservers via some background threads. Then the servlets just used the
values in memory. Really most people don't care if the download #'s and top
5 are real time, you could easily poll for them every few minutes or longer.
Depending on how many unique items there are, keeping the counts with the
items can serve to reduce locking on the count information, so you don't
keep a single row with the total count as that would be a hotspot, just
rollup the count using SUM(...) in the SQL every refresh interval.
Cheers
Jay Walters
-----Original Message-----
From: Reeves, Paul [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 25, 2001 5:05 AM
To: [EMAIL PROTECTED]
Subject: How to gather & manage web usage statistics??
Hi all,
How are people are generally going about solving the following problem.
All feedback is welcomed (sorry its a bit long).
Problem:
We have a website portal that provides various upload and download
facilities and we wish to display some statistics such as total
downloads, total uploads, "Top 5" downloads etc.
Solutions:
As i see it we can either store this info in an entity bean and access
through a session bean or we can let the servlet control it and write out
the data to a flat file stored where the webserver is (global access).
Hazards:
1. Effectively needing a singleton ejb approach which isn't what
ejb is about ? But how can this be achieved and maintained i.e
ensuring that only one bean is present??
2. If another VM is introduced alongside the current (websphere) then
we have to gain access to the statistics - write IIOP or SOAP interfaces?
3. Servlet approach is easier but keeps the data away from that in the
database. Also what happens when the server fails??
4. Maintaining a "Top 5" list means maintaining a long list of all items
together with download numbers - how efficient is this? Otherwise collect
all data from various objects?? - again how efficient is this??
Many thanks,
Paul
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".