Changes between Version 11 and Version 12 of BossaReference


Ignore:
Timestamp:
Jul 30, 2008, 10:14:08 AM (16 years ago)
Author:
davea
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • BossaReference

    v11 v12  
    44 * A Bossa project has one or more '''applications'''.
    55 * A application has a dynamic set of '''jobs'''.
    6  * An application has a dynamic set of '''batches''', which are used to group jobs.
    7  * Each job has a set of '''job instances''', in progress or completed.
     6 * An application has a dynamic set of '''batches''' (groups of jobs).
     7 * Each job has a set of '''job instances'''.
    88 * A '''user''' is a person who volunteers to perform jobs.
    99
    10 Each of these is represented by a table in a MySQL database.
     10Each has a corresponding table in a MySQL database.
    1111
    12 Each application has an associated "time estimate" - shown to user - and
    13 "time limit"; if an instance is not completed within the time limit,
     12Each application has an associated "time estimate" and "time limit";
     13if an instance is not completed within the time limit,
    1414is is considered "timed out".
    1515
     
    1717These are jobs for which the answer is known in advance;
    1818their purpose is to estimate the accuracy of each user.
    19 Each application has a '''calibration job fraction''';
    20 this is the probability with which calibration jobs are assigned.
     19Each application has a '''calibration job fraction''':
     20the probability with which calibration jobs are assigned.
    2121
    2222Each job has a '''state''', one of:
     
    3434Jobs are assigned to users in order of decreasing priority.
    3535
    36 Each job, job instance, and user has an associated '''app data''' - a PHP structure
     36Each job, job instance, and user has associated '''opaque data''' - a PHP structure
    3737whose contents are determined by the project, not by Bossa.
    3838These structures are stored in the database.
    3939
    40 For jobs, the app data typically contains the information needed to display
     40For jobs, the opaque data typically contains the information needed to display
    4141the job to a user - e.g., the name of an image file.
    4242For calibration jobs, it would also contain the correct answer.
    4343
    44 For instances, the app data typically contains the user's response to the job.
     44For instances, the opaque data typically contains the user's response to the job.
    4545
    46 For users, the app data typically contains a representation of the
     46For users, the opaque data typically contains a representation of the
    4747user's "skill", possibly including:
    4848
     
    5151 * their performance based on validation
    5252
    53 If a project has multiple applications, it should keep separate
    54 data for each applications.
     53If a project has multiple applications, it could contain separate
     54data for each application.
    5555
    56 For some applications it is desirable to group users into discrete '''levels''',
    57 with each level performing a variant of the job.
    58 The level of a user is represented as an integer in a fixed range.
     56For some applications it is desirable to group users into '''levels''' (0, 1, ...).
     57For example, level 0 might be average users, and level 1, expert users.
    5958
    60 When levels are used, each job has not a single priority,
    61 but rather a vector of priorities, one per level.
     59When levels are used, each job has a vector of priorities, one per level.
    6260Jobs are assigned to a particular user in order of decreasing
    6361priority for that user's level.
    6462
    65 == API for job creation ==
     63== Job creation API ==
    6664
    6765{{{
     
    8280Returns true on success.
    8381
    84 == Application functions ==
     82== Callback functions ==
    8583
    8684Each application must define a set of functions, listed below.
     
    129127}}}
    130128
    131 Return a string summarizing the app data for an instance.
     129Return a string summarizing the opaque data for an instance.
    132130
    133131{{{
     
    135133}}}
    136134
    137 Return a string summarizing the app data for a user.
     135Return a string summarizing the opaque data for a user.
    138136
    139 == API for application functions ==
     137== Bossa API ==
    140138
    141139The interface of "job" objects is
    142140
    143141{{{
    144 mixed get_info()
     142mixed get_opaque_data()
    145143array get_instances()
     144   // return array of all instances
    146145array get_finished_instances()
     146   // return array of finished instances
    147147bool set_priority(float $priority [int $level]}
    148 bool update_state(int $state)
     148   // set priority for the given level (default level is zero)
     149bool set_state(int $state)
    149150}}}
    150151
     
    152153
    153154{{{
    154 bool set_priority(float $priority)
    155 bool update_info(mixed $app_data)
     155bool set_opaque_data(mixed $data)
     156mixed get_opaque_data()
     157object get_user()
     158   // return user to whom this instance was issued
    156159}}}
    157160
     
    160163
    161164{{{
    162 mixed get_info()
    163 bool update_info(mixed $app_data)
     165mixed get_opaque_data()
     166bool set_opaque_data(mixed $data)
    164167bool set_level(int $level)
    165168}}}