[RC5] Stats RSS Feed?

Jim C. Nasby decibel at distributed.net
Fri Jan 7 17:04:58 EST 2005

On Thu, Jan 06, 2005 at 08:38:49AM -0500, Christopher Hicks wrote:
> On Wed, 5 Jan 2005, Jim C. Nasby wrote:
> >We would also like to offer XML versions of all stats pages, and any
> >help on that would be much appreciated. The eventual idea is:
> >
> >database --(PHP? Java?)--> XML --(XSLT)--> .html
> >
> >That way, most (if not all) stats pages would be available in XML as
> >well as .html. We should also be able to offer .csv and other formats
> >easily.
> I totally agree with your ultimate goal here, but I think your idea of 
> using the XML to generate the HTML breaks down on a few levels:
> (1) How do you generate the CSV and other formats?  If XSLT isn't going to 
> help you do that then the procedural code is going to have to generate it 
> somehow so just let it generate all the resultant formats.  While I can 
> certainly see situations where XSLT might be useful (and I have actually 
> written XSLT) I certainly wouldn't go out of my way to force myself to 
> write tons of code in it.

Generating CSV or any other format with XSLT would be trivial. The code
to do this would also be highly portable from one page to another.

> (2) It seems more effective conceiving of this as an MVC where the model 
> is the database, the procedural code is the controller, and the views are 
> the different formats you want to generate.  The easier you make it for 
> people to add new views the more views that will utimately exist which 
> should also exclude XSLT since its not widely known.

> (3) I do this sort of thing regularly for Intranets.  In these cases the 
> targest end up being PDF, Excel, and HTML.  I've found Perl with 
> Apache::ASP and Spreadsheet::WriteExcel and a handful of other modules
> makes the actual coding that has to be done pretty painless, but the same 
> thing should be able to be accomplished in any decent language the person 
> with time actually knows.  Since non-strange Excel is easily opened with 
> OpenOffice this makes using the resulting software under Linux easy too.

With the (probable) expection of Excel, it is easy to generate all those
formats using a small amount of XSLT.

> Is the database schema and sample data easily available if somebody wanted 
> to take a whack at this?

There isn't a test dataset, but the code is available it
http://cvs.distributed.net. I've also done some work on allowing the
stats-code to run against pproxy logs, in which case you'd need
stats-proc, stats-sql, and stats-html.
Jim C. Nasby, Database Consultant           decibel at distributed.net
Give your computer some brain candy! www.distributed.net Team #1828

Windows: "Where do you want to go today?"
Linux: "Where do you want to go tomorrow?"
FreeBSD: "Are you guys coming, or what?"

More information about the rc5 mailing list