IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changes between Initial Version and Version 1 of PublishingDetections


Ignore:
Timestamp:
Jun 19, 2009, 1:48:52 PM (17 years ago)
Author:
Paul Price
Comment:

Adding information about publishing detections.

Legend:

Unmodified
Added
Removed
Modified
  • PublishingDetections

    v1 v1  
     1== Requirements ==
     2
     3Note that publishing requires installation of the DataStoreServer.
     4
     5== Components ==
     6
     7The detections publishing mechanism consists of the following components:
     8
     9 * ippdb database tables: publishClient, publishRun, publishDone
     10 * ippTools: pubtool
     11 * ippScripts: publish_file.pl
     12 * ippTasks: publish.pro (publish.trigger, publish.load, publish.run)
     13 * ppMops (translation for IPP-MOPS product)
     14
     15== Database ==
     16
     17 * publishClient: IPP clients (they may be "science servers" to the rest of the PS1SC, but they are clients to the IPP) that want to receive detections via the DataStore.  They must nominate a product (used for the DataStore as the product name and type), the stage of interest (currently only "diff" and "camera" are accepted) and a working directory (meaningless for the clients themselves, but may be important for us if we're translating formats, since we need a place to store the translated data; note this does not have anything to do with the DataStore).  A comment field is also available, unused by the system (though it can be searched on using LIKE for some of the pubtool-generated queries).
     18 * publishRun: A run consists of pushing a single exposure, specified by a stage_id (which corresponds to either a diff_id or cam_id, depending on the stage in publishClient) to a client.  A run has state 'new' when created, and 'full' when completed.  A label is provided for grouping.
     19 * publishDone: On completion of a run, an entry is made here with the path_base and fault code.
     20
     21== Workflow ==
     22
     23An entry in the publishClient table is set up manually:
     24{{{
     25pubtool -defineclient -stage diff -comment "This is an aid to memory" -product IPP-MOPS -workdir neb://any/where/
     26}}}
     27
     28With the client set up, pantasks (task publish.trigger) regularly looks for data that is ready to be published.  It does so with:
     29
     30{{{
     31pubtool -definerun -label LABEL
     32}}}
     33
     34This looks for a completed diffRun or camRun (as specified by the clients) with the provided label, and generates a corresponding publishRun with the same label.
     35
     36Pending publishRuns are recognised by pantasks (task publish.load) using:
     37
     38{{{
     39pubtool -pending -label LABEL
     40}}}
     41
     42These are then executed (task publish.run):
     43
     44{{{
     45publish_file.pl --pub_id 123 --camera GPC1 --workdir neb://any/where/ --product IPP-MOPS --stage diff --stage_id 456 --redirect-output
     46}}}
     47
     48This script retrieves the appropriate input files (using either difftool or camtool), applies any translation (ppMops is used for the IPP-MOPS product) and the results bundled off to the DataStore.  Finally, it adds the result:
     49
     50{{{
     51pubtool -add -pub_id 123 -path_base neb://any/where/IPP-MOPS.123
     52}}}
     53
     54In the event of an error, the fault code is added.  The run can be retried following reversion:
     55
     56{{{
     57pubtool -revert -pub_id 123
     58}}}
     59
     60
     61== Use ==
     62
     63Add a client using "pubtool -defineclient", install the DataStoreServer package, ensure the DataStore configurations are in your site configuration (DS_DBSERVER, DS_DBNAME, DS_DBUSER, DS_DBPASSWORD, DATA_STORE_ROOT) and you should be good to go:
     64
     65{{{
     66pantasks: module pantasks.pro
     67pantasks: module publish.pro
     68pantasks: add.label LABEL
     69pantasks: add.database DATABASE
     70pantasks: controller host add HOST_1
     71pantasks: controller host add HOST_2
     72pantasks: controller host add HOST_3
     73pantasks: run
     74}}}
     75
     76A directory is set up for the ipp user on the Production (Maui) cluster to run this on a specified machine.
     77
     78== Debugging ==
     79
     80The publish_file.pl script recognises the usual debugging flags:
     81 * --verbose
     82 * --no-update
     83 * --save-temps