Edited wiki page through web user interface.

git-svn-id: http://soc.googlecode.com/svn/wiki@3160 5fae56a1-394a-0410-ba46-5107137fd53f
diff --git a/StatisticsModule.wiki b/StatisticsModule.wiki
index a3df45f..98d389f 100644
--- a/StatisticsModule.wiki
+++ b/StatisticsModule.wiki
@@ -14,13 +14,18 @@
 
 = Gathering Data =
 
-We have 10 cron jobs calling the same URL every 1 minute.  This URL calls code that fetches a "job" to be done and then executes it. Therefore 1 url can do all kinds off jobs
+It would be very inefficient (and probably impossible because of GAE restrictions) to count all statistics every request. Instead of doing that, the all necessary data will be gathered periodically from the Melange data model, stats will be counted based on this data and they will be cached as [http://www.json.org JSON] objects in a new stats model. When a frontend component needs to display some statistics, it will be delivered a particular JSON object from the stats model.
+
+Additionally, JSON objects in the stat model will be also cached in Melange memcache so as to improve effectiveness.
+
+In order to gather data from the model Melange will be using [http://code.google.com/appengine/docs/python/config/cron.html Cron Jobs] which is a support for scheduled tasks provided by Google Application Enginge. There will be probably one Job for each statistic, but there is also a limitation that one application may have up to 20 scheduled tasks. Anyway (as Lennie suggested), we will avoid any troubles by using a single job which will fetch another url containing code for a particular statistic.
 
 == Job Control Panel ==
  * *Job Control Panel* Where you can define what stats you want to collect in what interval.
 
-_Daniel: What needs to be on this panel? (Details)_
+There are two possible ways to execute the gathering data jobs: they may be triggered by application engine in certain time intervals by setting in corn.yaml configuration page) or they may be executed by an administrator. The second option seems to be better, as it will allow the admin to start gathering data and making computations only for selected statistics which is important, because many of them do not change for most of the time.
 
+Job Control Panel will be a new view that will allow an admin to pick the stats that need to be recalculated. There will be a table with all stats and next to each stat there will be a checkbox indicating whether this particular stat should be computed or not. After picking over the stat kinds, the admin will start the Job by pressing a button.
 
 
 === Initial Goals ===
@@ -36,11 +41,19 @@
 
 === Stats ===
 
-  * Students per country
-  * Students per school
+  * Students per country/continent
+  * Students per school/continent
   * Mentors per country
   * Amount of mentors/students/org admins
   * Server activity (e.g. big spike near deadlines).
+  * Organizations per program
+  * Application per organization / program
+  * Students, mentors and organization admins ages
+  * Connections between students and their mentors
+  * Dependencies between the fact that a student fails to complete his project and the distance between the student and his mentor
+  * Dependencies between a number of slots per organization and completion rate for this organization
+  * Dependencies between projects completion rate and student ages (or academic years)
+  * Standard statistc values (arithmetic mean, median, quadrille, etc)
 
 = Displaying Stats =