Forum OpenACS Development: Re: Tracking downloads of files or how to attach methods to objects

Tom excellent points.

The original idea for the views package was to pass a property called "displayed_object_id" to a master template that had code to record a view if that property was set.

So in your applicaiton code, you decide which object is important and what activity counts as a view.

I think this makes the most sense.

In this specific applicaiton Malte is discussing there isn;t any master template since you are downloading an image or file. Its pretty clear that viewing an image or downloading a file counts as a "view" for recording.

Assuming that you don't care about blocking access, couldn't you register a trace filter (1 or more) and decode the url/user/etc.?
This is, what the xotcl request monitor does (including blocking). The basic units of investigation are URL paths (not acs objects), since one wants to monitor access on pages as well, which have no acs-objects associated. You probably do not wan't to have database operations in such a monitor, since it can easily become a performance bottleneck in busy applications. It would certainly be possible to support lazy (or asynchronous) database operations (at least, pgtcl 1.5 supports it) for recording, but in general, a streaming database would be the better approach on such bulk data.

Concerning the "installation on OpenACS.org of a package which sniffed around in administrative data and exposed connections which were otherwise hidden". All this includelet does is to present information available to users in a different way (in particular, the revisions information of editing pages). It is not so much different to clicking on a user's name in the forums.

Can I use xotcl request monitor without xotcl?