= MacPorts Port Statistics Ideas = This page is a collection of ideas that could be implemented to improve or make use of the MacPorts statistics server. Feel free to edit this page and add your own idea! [[PageOutline]] == Statistics Test Server == [[cal|Clemens]] has set up a test installation of the statistics server component at [[http://stats.macports.neverpanic.de|stats.macports.neverpanic.de]]. The server is written in Ruby on Rails, its sources currently live in browser:branches/gsoc11-statistics/stats-server. The statistics client requires MacPorts 2.3 (for `curl post`) and is currently not in the main ports tree for this reason. It's source is at browser:users/cal/ports/macports/mpstats and it can be installed in a single command using `port install https://neverpanic.de/documents/mpstats.tar` (this URL will be updated with the latest version on each update). == Ideas == === Move to stats.macports.org and get an SSL certificate === The stats server should be moved to a more official domain, such as stats.macports.org. It also should support SSL, especially for submitting data. A free email-validated StartCom SSL certificate is probably enough; deploying the main macports.org wildcard certificate on Clemens' server is something he doesn't want. === Inform users and explain opt-in === When a user upgrade to 2.3.0 (or installs MacPorts from scratch), it would be nice to show a short notice saying something like {{{ You are welcome to participate in anonymous collection of statistics of installed ports by running `sudo port install mpstats'. See http:// for more details. }}} so that every user would see the notice once for each major upgrade. (No notice if mpstats is already activated.) === Create a versioned API === Add a field stating the version of the data format. In case that the format changes in future, it would be nice to still be able to handle submissions from users running the older version of MacPorts. === Track the requested state === Add a field '"requested": true' for requested ports (even if the application isn't yet able to display any useful statistics related to that, it will be easier to change the app in the future than to convince everyone to apply the fix). === Submit variants as list rather than as string === Variants are currently submitted as a plain string: {{{ "variants": "biosig + python27 +"; }}} It would be a lot cleaner to use a list instead: {{{ "variants": ["biosig", "python27"] }}} === Track CommandLineTools version instead of GCC version === Remove "gcc_version" from submitted data, since GCC isn't a thing on recent versions of OS X anymore. === Port the server's dependencies to MacPorts === It would be nice if MacPorts would allow installing dependencies to allow running the app locally without much hassle. The app needs rails 3.2.