Changes between Version 6 and Version 7 of BadgesOld
- Timestamp:
- Nov 14, 2013, 7:49:07 AM (11 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
BadgesOld
v6 v7 80 80 || reassign_dt : timestamp || 81 81 82 83 84 82 We refrained from adding another relation for tags and de-normalised this attribute in favour of performance. We could use MySQL's SET type to support a bitmap of up to 64 pre-defined tags. However, that list would become part of the data model and would hence be very inflexible. Thus we propose to use JSON as textual representation that can be searched using regular LIKE statements and can be modified easily by available JSON support, e.g. in PHP. Upcoming versions of MySQL and MariaDB are going to include JSON support and will allow more optimised processing. XML would be far too heavy-weight for this purpose. 85 83 86 Badge assignments provide the means to expire old ones by filtering on the `create_dt` attribute. Sorting of badge assignments can be done based on the`reassign_dt`, e.g. newest-first.84 Badge assignments provide the means to expire old ones by filtering on the `create_dt` attribute. Sorting of badge assignments can be done based on the `reassign_dt`, e.g. newest-first. 87 85 88 86 === Badge assignment process === 89 87 * A script runs periodically (e.g. a project task) and updates all badge assignments 90 * The script iterates over all defined badges (`badge` 88 * The script iterates over all defined badges (`badge` table) and executes the respective SQL rules 91 89 * Each SQL rule (one per badge) returns a list if user IDs or team IDs (see next item) 92 * The attribute !badge:teamdefines a badge to be team or user assignable93 * Upsert (insert or update) the user/team IDs for the current badge ID into the `user_badge` and `team_badge`tables respectively94 * An update (only) resets the `reassign_dt`attribute to the current time90 * The attribute !badge:team defines a badge to be team or user assignable 91 * Upsert (insert or update) the user/team IDs for the current badge ID into the `user_badge` and `team_badge` tables respectively 92 * An update (only) resets the `reassign_dt` attribute to the current time 95 93 96 94 '''Open questions and challenges''' … … 102 100 * Part of scheduler request (length constraints!)? 103 101 * User-specific notices/RSS feed? 104 * Periodic web RPCs (e.g. extension of XML-formatted 102 * Periodic web RPCs (e.g. extension of XML-formatted `show_user.php`)? 105 103 * Need to obey networking-preferences 106 104 * Should updates (images and data) be incremental or always be a full snapshot (e.g. to support badge removal)?