IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changes between Initial Version and Version 1 of pstamp_web_interface_features


Ignore:
Timestamp:
Dec 23, 2009, 12:48:51 PM (17 years ago)
Author:
bills
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • pstamp_web_interface_features

    v1 v1  
     1
     2== Notes on a PS1 postage stamp server web interface ==
     3
     4
     5The postage stamp server (PSS) is primarily designed to handle requests for many postage
     6stamps by science clients.
     7
     8It is also desired to have a user friendly web interface that allows a user
     9to input parameters for a request (or requests), submit them to the server for
     10processing, and retrieve the results.
     11
     12This note discusses features that such a web interface might have.
     13
     14First we provide some technical context by describing the operation of the postage stamp server and
     15the prototype web interface. Those interested only in potential web interface
     16features may skip ahead to the section "[Features for the IPP PSS Web Interface]"
     17
     18
     19
     20== Overview of the operation of the IPP Postage Stamp Server ==
     21
     22The postage stamp server consists of a set of IPP programs that run in under pantasks.
     23The sequence of requests and jobs is managed with the use of a mysql database.
     24
     25The nominal mode of operation is to query a set of predefined web sites for new request files.
     26These web sites follow the data store interface.
     27
     28When a new fileset on a datastore is discovered the postage stamp server creates a new
     29request in the database for each file in the fileset. All files are assumed to be
     30fits binary tables with EXTNAME=PS1_PS_REQUEST. The definition of this files may be
     31found in the postage stamp server interface control document on the wiki.
     32
     33    http://svn.pan-starrs.ifa.hawaii.edu/trac/ipp/wiki/PostageStampServer
     34
     35
     36Each row in a request file is a "request specification".
     37The columns in the request specification server three purposes
     38
     39    * to select the images of interest
     40    * to define the region of interest (the pixels in the input image that will be
     41      included in the stamp)
     42    * to select which data products that are included in the results (e.g. image stamp, mask stamp,
     43      variance stamp, psf, background model)
     44
     45Sometime after the requests have been queued, they are processed. The request file is copied to
     46the PSS network and parsed.  The parser reads each row in the request file and creates zero
     47or more postage stamp jobs.
     48Currently each job creates one stamp but there is an expectation that in the future jobs request
     49specifications that reference the same images of interest will be processed by a single job.
     50
     51When all jobs have finished, the postage stamp server builds a fits binary table that describes
     52the results of each job. Then that file and the results of the jobs are packaged into a fileset on
     53a PSS data store product specific to the requestor.
     54
     55
     56
     57== Web Interface ==
     58
     59Now all of the above is very good for science clients but not at all convienent for random
     60user requests.
     61
     62What we need is some sort of form based web pages that users may use to create requests, submit
     63them for processing, and "get" the results.
     64
     65We have a "prototype" web interface which is very simple, feature incomplete, and still not particularly
     66friendly. It's a set of php forms. I do not expect that any of it will be used in the "real web interface".
     67
     68The way the prototype interacts with the PSS is worth reviewing.
     69
     70The site is http://pstamp.ipp.ifa.hawaii.edu/request.php
     71
     72It is password protected with the "standard" PS1 science consortium username and password.
     73
     74The form allows users to input some of the supported parameters.
     75At the top we have data for the images of interest
     76For example:
     77
     78
     79{{{
     80    Select Images by:   Exposure Name
     81    Image Type:         warp
     82    ID:                 o5013g0086o
     83    Sky     RA:         293.3888     DEC:                16.04312
     84    Pixels  width       200          height: 200
     85}}}
     86
     87
     88If the user hits submit, the apache web server hosting the page executes a cgi script that
     89runs a program that creates a request table file containing a single row. Then the cgi script runs a command that enters
     90a postage stamp request into the database.
     91
     92On the form the radio button "Get Status" gets selected. If the submit button is pushed again it
     93shows the status of the request (and any previous requests entered in the given http session.
     94
     95Once all of the jobs from the request have finished processing
     96part of the the status line turns into a link to the data store fileset where the results
     97have been posted.  For example: http://datastore.ipp.ifa.hawaii.edu/pstampresults/web_373/
     98
     99If we go to this location we find two files: results.fits and parse_error.txt
     100Unfortunately this example generated postage stamp images.
     101
     102results.fits is the results table.  If we download it and examine it with fv we find that it
     103contains 4 rows all of which have an error code set.
     104 *  The first two rows have ERROR_CODE=24 PSTAMP_NOT_DESTREAKED.
     105 *  The other two rows have ERROR_CODE=25 PSTAMP_NOT_AVAILABLE.
     106
     107The first error is somewhat self explanatory. The images haven't been run through magic and thus can't
     108be released. PSTAMP_NOT_AVAILABLE is the error that happens when the input images have been
     109cleaned up (deleted to recover disk space).
     110
     111If these images hadn't been cleaned up postage stamp images would have been placed in the fileset as well.
     112
     113Soon the postage stamp server will (optionally by user request) queue update runs which will ask the IPP
     114to regenerate the images. This will of course increase the latency for processing requests significantly.
     115   
     116parse_error.txt gives any errors printed to stderr by the request file parser.
     117In this example it contains the lines
     118
     119{{{
     120    skipping non-magicked image neb://ipp035.0/gpc1/ThreePi_NorthernRegion.090729//o5013g0086o.83651/o5013g0086o.83651.wrp.9992.skycell.1662.134.fits
     121    skipping non-magicked image neb://ipp023.0/gpc1/ThreePi_NorthernRegion.090729//o5013g0086o.836515013g0086o.83651.wrp.9992.skycell.1748.006.fits
     122}}}
     123
     124
     125These lines correspond to the jobs in the results file with ERROR_CODE=24.
     126
     127
     128Desired Features for the IPP PSS Web Interface
     129----------------------------------------------
     130
     131Form elements for all parameters.
     132---------------------------------
     133
     134The elements presented to the user should be context sensitive.  For example the form elements
     135where the ID and COMPONENT are to be entered should be labeled depending on the REQ_TYPE:
     136if the REQ_TYPE is "byexp" then the ID element should be labeled "Exposure ID".
     137Similar considerations apply to the COMPONENT parameter.
     138
     139This suggests using some code that operates on the client side in the implementation
     140(e.g. Javascript or Java).
     141
     142Form elements need not follow the exact names in the request specification.
     143
     144Parameter validation
     145--------------------
     146Where efficient, parameters should be validated as they are entered and the user should
     147be notified of errors. (The prototype delays what checking it does until submission).
     148Some parameters that are "invalid" on the server side but legal in the request interface
     149should be caught and either corrected or raised as an error.
     150For example o5013g0086o is a valid GPC1 exposure name but o50130086o is not.
     151
     152That said perhaps the user should be allowed to enter values that map to the exp_name.
     153
     154{{{
     155    MJD: 55013  SEQ: 86
     156}}}
     157
     158(Note this would require either the ability to read the ipp database or some other table that
     159maps from date and sequence number to exposure name).
     160
     161
     162== User Accounts ==
     163 
     164
     165We want to define a set of authorized users each with it's own password. The PSS server will
     166be enhanced to include the identity of the user in the submitted requests. The PSS server
     167may use this to ration usage or prioritize the processing of jobs.
     168
     169Since requests can have significant latency it would be useful to allow users to "save" the
     170state of a session so that it can be resumed later.
     171
     172
     173== User experience for Request submission and status ==
     174
     175One of the biggest limitations of the prototype interface is the interaction with the server.
     176The whole push a button to get status is rather primitive.
     177
     178
     179== Presentation of Results ==
     180
     181When a request completes, the results file should be parsed and importand data presented
     182to the user in an easy to understand way.
     183
     184It might be useful to optionally display jpeg images of the stamps. (An option to create these should
     185be added to the PSS request specification).
     186
     187A way to convenient way to download the fits files is desired.
     188
     189