Changes between Version 16 and Version 17 of BossaExampleOne


Ignore:
Timestamp:
Jul 21, 2008, 3:11:53 PM (16 years ago)
Author:
davea
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • BossaExampleOne

    v16 v17  
    2020== Example application ==
    2121
    22 We'll create an application in which volunteers view images,
     22We'll create an application in which volunteers view synthetic images,
    2323looking for ellipses on a noisy background.
    2424Their task is to click on the center of the ellipse,
     
    2828[[Image(bossa_test.png, nolink)]]
    2929
    30 (this has an ellipse slightly below/left of center).
     30(there's an ellipse slightly below/left of center).
    3131
    3232Visit http://a.b.c/test_ops/bossa_ops.php,
     
    3535The application is define by three scripts in ~/projects/test/html/:
    3636
    37  * '''ops/bossa_example_make_files.php''': this creates image files.
    38  * '''ops/bossa_example_make_jobs.php''': this creates jobs.
    39  * '''inc/bossa_example.inc''': display jobs and handle completed jobs.
     37 * '''ops/bossa_example_make_files.php''': a script that creates image files.
     38 * '''ops/bossa_example_make_jobs.php''': a script that creates jobs.
     39 * '''inc/bossa_example.inc''': display and policy functions.
    4040
    4141We'll go through these scripts and explain how they work.
     
    4444== Creating jobs ==
    4545
    46 To create some jobs, first we'll create some image files using the script
     46First we'll create some image files using the script
    4747[source:/trunk/boinc/html/ops/bossa_example_make_files.php html/ops/bossa_example_make_files.php].
    4848
     
    6060
    6161Now, create jobs using
    62 [source:/trunk/boinc/html/ops/bossa_example_make_jobs.php html/ops/bossa_example_make_jobs.php].
     62[source:/trunk/boinc/html/ops/bossa_example_make_jobs.php html/ops/bossa_example_make_jobs.php]:
    6363{{{
    6464php bossa_example_make_jobs --app_name bossa_example --dir example
     
    6868and collects them into a "batch".
    6969
    70 == Displaying jobs ==
     70== Display and policy functions ==
    7171
    72 The application is described by a PHP file ([source:/trunk/boinc/html/inc/bossa_example.inchtml/inc/bossa_example.inc])
    73 that contains several functions.
    74 
    75 The first of these displays a job:
     72The file ([source:/trunk/boinc/html/inc/bossa_example.inc html/inc/bossa_example.inc])
     73contains display and policy functions.
     74The display function is:
    7675{{{
    7776function job_show($job, $inst, $user) {
     
    9392}}}
    9493
    95 The second is called when a job is issued:
     94The policy functions are as follows.
    9695
    9796{{{
     
    101100}}}
    102101
     102This is called when a job is issued.
    103103It sets the job's priority to zero so that no further instances will be issued
    104104(unless this one times) out.
    105105
    106 The next function is called when a job instance is finished.
    107 It gets the user's response to the job,
    108 and stores it in the instance's app data field.
    109106{{{
    110107function job_finished($job, $inst) {
     
    121118}}}
    122119
    123 The next function is called when a job times out.
    124 It restores the priority to one so that the job will
    125 be issued to another volunteer.
     120This is called when a job instance is finished.
     121It gets the user's response to the job,
     122and stores it in the instance's app data field.
     123
    126124{{{
    127125function job_timed_out($job, $inst, $user) {
     
    129127}
    130128}}}
     129This is called when a job times out.
     130It restores the priority to one so that the job will
     131be issued to another volunteer.
    131132
    132133The remaining functions return short strings
    133 that show the app data for jobs, instances, and users
    134 on the Admin page:
     134that show the app data for jobs, instances, and users on the Admin page:
    135135{{{
    136136function job_summary($job) {