Usage reporting for autopackage is a critical item. So far we have a very vague idea of the projects reach and spread. Vague mainly because no previous information was recorded for the downloads of the support code. The project is currently gaining 200-300 downloads on a typical day. Vague additionally because the reporting does not determine first time installation or updates of the support code.

Requirements (Completed)

  • Counts for success/failures for a particular rootname and software/interface version
  • Counts for success/failures for a particular rootname and dependency check with version
  • Counts for initial support code installations

Additional Planned Features (Completed)

  • Dependency check will record parent rootname and software/interface version
  • Dependency check will record method (require/recommend) and type (interface/exact/atleast)
  • Database data will be rolled-up to daily entries for all tables
  • Simple reporting for the community per rootname and software/interface version

Future Possible Features

  • Integrate rootname table with packages table to use package search and rootname management services
  • Complex and trend reporting for the community per rootname and software/interface version
  • Definition of core versus 3rd party software measured through the rootname dependency reporting

Database specifics

CREATE TABLE `dependency` (
  `rootname_version_id` int(12) NOT NULL default '0',
  `date` date NOT NULL default '0000-00-00',
  `pass` int(12) NOT NULL default '0',
  `fail` int(12) NOT NULL default '0',
  `rootname_version_parent_id` int(12) default NULL,
  `require` int(12) NOT NULL default '0',
  `recommend` int(12) NOT NULL default '0',
  `interface` int(12) NOT NULL default '0',
  `exact` int(12) NOT NULL default '0',
  `atleast` int(12) NOT NULL default '0',
  UNIQUE KEY `rootname_version_id` (`rootname_version_id`,`date`,`rootname_version_parent_id`)
) TYPE=MyISAM;

CREATE TABLE `installation` (
  `rootname_version_id` int(12) NOT NULL default '0',
  `date` date NOT NULL default '0000-00-00',
  `pass` int(12) NOT NULL default '0',
  `fail` int(12) NOT NULL default '0',
  `firsttime` int(12) NOT NULL default '0',
  UNIQUE KEY `rootname_id` (`rootname_version_id`,`date`)
) TYPE=MyISAM;

CREATE TABLE `rootname` (
  `id` int(12) NOT NULL auto_increment,
  `rootname` varchar(64) NOT NULL default '',
  `shortname` varchar(64) NOT NULL default '',
  `displayname` varchar(64) NOT NULL default '',
  `datecreation` datetime NOT NULL default '0000-00-00 00:00:00',
  `ip` varchar(64) NOT NULL default '',
  `packager` varchar(64) NOT NULL default '',
  `email_primary` varchar(64) NOT NULL default '',
  `email_secondary` varchar(64) NOT NULL default '',
  `password` varchar(64) NOT NULL default '',
  `datetime` datetime NOT NULL default '0000-00-00 00:00:00',
  `type` char(1) NOT NULL default 'l',
  `active` char(1) NOT NULL default 'y',
  `description` text NOT NULL,
  `url_homepage` varchar(100) NOT NULL default '',
  `url_package` varchar(100) NOT NULL default '',
  `url_repository` varchar(100) NOT NULL default '',
  `currentversion` varchar(20) NOT NULL default '',
  PRIMARY KEY  (`id`),
  UNIQUE KEY `rootname` (`rootname`,`shortname`)
) TYPE=MyISAM;

CREATE TABLE `version` (
  `id` int(12) NOT NULL auto_increment,
  `rootname_id` int(12) NOT NULL default '0',
  `datetime` datetime default NULL,
  `softwareversion` varchar(32) NOT NULL default '0.0',
  `interfaceversion` varchar(12) NOT NULL default '0.0',
  `active` char(1) NOT NULL default 'y',
  PRIMARY KEY  (`id`),
  UNIQUE KEY `rootname_id` (`rootname_id`,`softwareversion`,`interfaceversion`)
) TYPE=MyISAM;    

The PHP scripts used to present the data is available through anonymous CVS and can be viewed online: http://cvs.sunsite.dk/viewcvs.cgi/*checkout*/autopackage/site/statistics/

Mechanics

The support code executes a series of dependency checks on its way to install a package. At the point which a dependency check finishes, its status is determined along with its requirements still in session. A crafted post data string is echoed to a file at the working directory root level which represents the check. Each check will be added to the file as well as the overall success of the installation session. Before the end of the session, a wget --post-string="..." http://reporting.autopackage.org/statistics/ would be called by which a php script would receive this post data and process it depending on the data it contains. I think routing it by DNS would be helpful ... we will have to see. For a package with 5 preparations checks, the support code would do 6 wget calls to the reporting server ( 6 = 5 checks + 1 package ). This reporting will respond to an environment variable and configuration file setting to stop anonymous reporting.