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

This seems like a difficult question in the context of a database. Although OpenACS defines objects as a row of data from one or more tables, new objects are created anytime you write a select that spans objects or is a subset of an object. So a file object may glue itself onto another object, together forming something new, at any time. This is no different in reusing an image on a web page. The page combines many objects into one. In order to really control this and be able to track usage, you would first need to control the process of building up objects so that you could always trace every 'potential' use. Once you can do this, you can then monitor the larger objects and do an accounting of the objects you are interested in.

I think it would still be largely pointless and impossible to monitor every usage, as you would still have to define what it means to access an object: is just grabbing the id count? Using the metadata in a where clause? Creating a page which references the object?

Although it seems like an interesting exercise to have a god-like monitor, this type of functionality is purely administrative. The point of a user interface is not to provide back doors into the object storage, but to combine objects into something more generally useful, and expose objects in combination. A few months back I commented on the installation on OpenACS.org of a package which sniffed around in administrative data and exposed connections which were otherwise hidden. The problem is that you have one large storage room and everyone has the same key: controlling what is exposed, how and to who is a difficult problem.