View Issue Details
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0002737||Composr||points||public||2016-07-19 13:00||2019-06-27 18:13|
|Reporter||Chris Graham||Assigned To|
|Target Version||Fixed in Version|
|Summary||0002737: Rewrite leader-board functionality|
|Description||The current leader-board functionality won't scale past its current design limitations.|
There are 3 key issues:
1) It only looks at the points of the top 300 forum posters as an optimisation in calculating the leader-board. This is because calculating the points of all members in real-time as the week switches over is not realistic, it could take minutes for large sites.
2) We aren't able to generate leader-boards showing new points within the past week (or any timer period). It has to be from site start.
3) Our database structure or archived results can only store one result set, so we can't have multiple blocks with their own different result configuration.
We need to essentially tear out all the leader-board calculation code, and redesign the database structure, and change how it is all configured.
a) We need to be able to have leader-board data stored for multiple result-sets. Database structure change.
b) We need to generate data in the background using a CRON hook (unless CRON is not set up). The block would just show the latest data set there is rather than deciding whether to initiate a new calculation or not (unless CRON is not set up).
c) We need to add in an administrative interface for configuring what the leader-board result-sets calculated will be. This will include some existing options in the block, but also configurability for time period based display.
d) We need to make the leader-board block configuration simply select a result set, rather than specifying the options itself (a block is just for display, so block options wouldn't make sense for defining what is calculated by CRON and also shown in a leader-board module).
d) We need to adjust the leader-board module so that it has an index where you can select which result-set to view the archive of. The block will link right into the right result-set. If there's only one result set the system should simplify down and not include the index.
|Time estimation (hours)||8|
As of v10 the points system does actually allow calculating results within a range, so the problem of calculating "points earned in week" isn't serious, it's actually the issues around storage, configuration, and display, that are the problem.
The way v10 does it is it does a (good) estimate of the points earned at a certain point in time by looking at the tallies and then subtracting what it knows wouldn't be in those tallies at a particular further point back in time (as it does have that data logged in different tables indirectly).