OpenStats
So you're working on a web application, but you need a flexible way to log and compute statistics. Well, maybe this project will provide the solutiou you're looking for - it's based on PostgreSQL (but it shouldn't be very difficult to port it to a different database engine.
This project is hosted on sourceforge.net, on http://openstats.sf.net (or more precisely at http://apps.sourceforge.net/trac/openstats/).
An introduction to OpenStats
OpenStats is a quite simple project - it has the following parts:
- database structure - This is the place where all the data are stored. It's well described and quite universal so you may log all the data you need.
- logging library - A simple library with a single purpose to store all the data. It does no analysis, no time-consuming operations - it just logs all the data it receives. In PHP, it's a single 10kB file containing a single class, and it's quite simple to port it to a different language (Java, for example).
- analysis library - A library processing data stored by the logging library, so that it's possible to display them later in the GUI provided. This library is not used in your application code, it's included and executed only from (cron) scripts.
- reporting library - A library reading data built by the analysis library. This is used solely in the report GUI, but you may use it directly (and display some of the data in a different application).
- report GUI - Used to display reports using the data built by analysis library and returned by reporting library.
Currently, only a PHP version of the package is available - I developed a Java version of the logging library but it's too tightly tight to the particular web application, so it does not make sense to present it here.




