[Linux-aus] Assistance in starting a new Open Source project

Adam Nielsen a.nielsen at shikadi.net
Sun Nov 17 14:47:57 EST 2013

Hi Avi,

While this isn't something I am able to help with, here are some
thoughts that may help.

> 1. All media on a website is prefixed with a tracking URL, i.e. if
> the media is http://server.com/path/to/music.mp3 then the CMS would
> write that out as
> http://tracking-server.com/track/server.com/path/to/music.mp3

Where is the media stored?  If you are storing it on the tracking
server then generating URLs like this is a lot of extra work, as your
scripts have to handle the HTTP range requests themselves, partially
reading files and returning the bits the client requested.  It would be
easier to tell your web server to log requests for media files to a
MySQL database (since you mentioned you already have MySQL skills), and
then your problem becomes just a reporting one - how do you generate
reports from the MySQL data, to tell you what you want to know?

If the media is stored outside the tracking server, it's a bit more
complicated.  You won't be able to return a HTTP 302 redirect,
otherwise you'll lose future HTTP range requests as the client will
just go direct to the source.  You would likely have to set up a proxy
server, and again set it to log requests to MySQL so you can run reports
from there.  Of course this means your tracking server will use double
the bandwidth of the media server (since it has to download the data
from the source and upload it to the client) so that may be an issue for
larger sites.

While I haven't used any of them yet, there are a few open source
reporting systems available, so you could always see whether they are
able to provide the statistics you are after.  Presumably you could set
them to run your reports automatically at some interval and produce
HTML files, which you then control access to however you see fit.

If not, then I'm sure your PHP/MySQL skills could produce exactly what
you need from the database of HTTP requests.


More information about the linux-aus mailing list