Changes between Version 6 and Version 7 of BadgesOld


Ignore:
Timestamp:
Nov 14, 2013, 7:49:07 AM (10 years ago)
Author:
brevilo
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • BadgesOld

    v6 v7  
    8080|| reassign_dt : timestamp ||
    8181
    82 
    83 
    8482We 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.
    8583
    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.
     84Badge 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.
    8785
    8886=== Badge assignment process ===
    8987 * A script runs periodically (e.g. a project task) and updates all badge assignments
    90  * The script iterates over all defined badges (`badge` table) and executes the respective SQL rules
     88 * The script iterates over all defined badges (`badge` table) and executes the respective SQL rules
    9189   * Each SQL rule (one per badge) returns a list if user IDs or team IDs (see next item)
    92    * The attribute !badge:team defines a badge to be team or user assignable
    93    * Upsert (insert or update) the user/team IDs for the current badge ID into the `user_badge` and `team_badge` tables respectively
    94      * An update (only) resets the `reassign_dt` attribute to the current time
     90   * 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
    9593
    9694'''Open questions and challenges'''
     
    102100   * Part of scheduler request (length constraints!)?
    103101   * User-specific notices/RSS feed?
    104    * Periodic web RPCs (e.g. extension of XML-formatted `show_user.php`)?
     102   * Periodic web RPCs (e.g. extension of XML-formatted `show_user.php`)?
    105103   * Need to obey networking-preferences
    106104 * Should updates (images and data) be incremental or always be a full snapshot (e.g. to support badge removal)?