Changes between Version 4 and Version 5 of BossaExampleTwo


Ignore:
Timestamp:
Jul 30, 2008, 11:01:19 AM (16 years ago)
Author:
davea
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • BossaExampleTwo

    v4 v5  
    1 = Example two: replication =
     1= Example 2: replication =
    22
    3 This example uses the same type of jobs as the previous example,
     3This example uses the same type of jobs as example 1,
    44but does replication to increase the accuracy of results.
    55Every job is sent to at least two different volunteers.
    6 A job is considered finished if either
    76
    8  * Two volunteers reported "no ellipse found";
    9  * Two volunteers found ellipses, and their centers are within 20 pixels;
     7We'll use the following job distribution policy:
     8 * Initially all jobs have the default priority (1)
     9 * When we send the first instance of a job we set its priority to 2, so that we'll get another instance soon.
     10 * When a 2nd or subsequent instance is issued we set the priority to 0.
     11 * When an instance times out, or finished but without consensus, we set the priority to 2.
    1012
    11 If ten instances have been performed and neither condition holds,
    12 the job is marked as "inconclusive" and no further instances are issued.
     13We'll use the following replication policy:
     14 * A job is considered finished if either
     15  * Two volunteers reported "no ellipse found";
     16  * Two volunteers found ellipses, and their centers are within 20 pixels;
     17 * If ten instances have been performed and neither condition holds, the job is marked as "inconclusive" and no further instances are issued.
    1318
    14 The following
    1519When the first instance of a job is issued, its priority is left at 1;
    1620this allows another instance to be issued immediately.
    17 
    1821{{{
    1922function job_issued($job, $inst, $user) {
     
    2528}}}
    2629
     30
    2731When an instance is finished,
    28 we check whether
     32we check whether there are now two consistent responses.
     33If so we mark the job as DONE.
     34If there are 10 finished instances, we mark it as INCONCLUSIVE.
     35Otherwise we set its priority to 2, so that we'll get another instance.
    2936{{{
    3037function job_finished($job, $inst) {