wserv

Groups:

DATA-FLOW,WEB

Authors:

Igor Morozov, 06/05 Modified and expanded, code downloading removed: 10/08 Code downloading returned: 3/10

Module description:

Web service client

Executes an IGeoS (SIA) web service by sending another flow for remote execution via an untrusted (port 80, http) connection.

On remote systems with enabled SIA web services, this tool can:

  1. Retrieve the server usage info (such as the necessary details of UNIX environment, directory structure, file naming conventions, etc.);
  2. Execute any processing flow and retrieve the results (data records, tables, files, images, GMT scripts)
  3. Perform some service requests, such as:
    1. Retrieve server info (list INFO);
    2. Search the library of processing jobs posted on the server (list SEARCH);
    3. Obtain SIA code update (will be implemented later);
    4. Obtain a copy of the processing job library (coming soon);
    5. Save the data for later use (list SAVE). This could be used if the data is deemed valuable for others or needed for access at a later date. The data will be marked as protected and could be spared during server cleanup procedures.
    6. Clean the scratch directory (list DELETE).
  4. Retrieve and install locally a library of IGeoS processing jobs.
  5. Retrieve and install locally an update to IGeoS codes.

As a rule, these operations are specified by selection of the corresponding options in module POST inclided in the server flow. WSERV only submits the flow to the server.

Output data are placed into a subdirectory defined by USERID and JOBID in lists USER and JOB. Note that job ID may include slashes, thereby creating subdirectories on the server. If job ID is not specidied, the default job ID is formed as follows:
client_username@client_hostname/client_UNIX_process_ID

Usage

Normally, WSERV should be used in conjunction with POST. In the client flow, WSERV is used to invoke a web service request. The request consists in sending tho the server another flow. If some data are expected to be transmitted back to the client, this server flow should contain calls to POST.

Upon server-side job completion, POST places the data into the specified directory and creates an index.html web page for its access. In the present version, an HTML browser is started, and the user has to download the desired data manually.

If DLOAD list is used, WSERV waits for the page to be posted, downloads the data and optionally sends another reequest to remove the data directory. Note that initialing service requests and downloading could be done by different WSERV calls in the same or different jobs.

Normally, when option PRINT is used, the output is returned in HTML format. If this is not desired, you need to supply the following command: "opt=-nohtml" by using the COMMAND list.

The results obtained from the data server can be saved as text and binary files. Documents for which display rules are known (e.g., HTML, PostScript, PDF, or Excel) can be displayed by the corresponding programs.

Waveforms delivered in known formats (e.g., SAC, SEGY, GSE3.0 or ASCII) can be loaded directly as seismic traces by module LOAD fiollowing WSERV. For this, one needs to set WSER to download in EDIT phase, lists FILE

Data cleanup

If called corectly, WSERV normally deletes the job data after it is downloaded by the client. If this has not been done for some reason, the data can be deleted by submitting a web service job (using WSERV again) including a call to POST with list DELETE. The same can of course be achieved by using UNIX calls on the server (see modules UNIX and SHELL).

Configuration

Multiple servers can be contacted in a single call, and multiple WSERV instances can download the same data posted by POST. If list SERVER is not used, the target servers are specified from task 'webservice' in job execution configuration.

NOTE: when silent downloading is used (list RESULT with option DLOAD), the download directory is cleared each time the flow is run. Please make sure to move the files you want to keep from this directory, or use different directory names for different runs.

Module call format:

*call WSERV WHEN NAME

Global list parameter(s):

WHEN

When to call the service.
  • EDIT : The service is invoked during the EDIT phase. No traces are passed to or from the subflows;
  • PROC : the service is started during the Edit phase, runs concurrently and sends data to the flow;
  • EOF : subflow is called during the EOF phase of WSERV.
    • Format: Selection
    • Selectable Values: (codes in parentheses)
      • Edit phase (EDIT)
      • On trace (PROC)
      • EOF phase (EOF)
    • Default value: EDIT

    NAME

    Name assigned to this instance of WSERV. This name can be used in LOAD or DATASET as the name of the trace dataset.
    • Format: Character (24 characters)
    • Default value: Not specified

    Back to the beginning of module description
    IGeoS version 5.1
    Copyright (c) 1995-2015, I.B.Morozov
    Updated Wed Apr 1 21:42:03 2020