SX Communication Concepts
Extractors
- SELECTION
- Selection of only specified attributes from the objects which
satisfy the search criteria.
- FORMAT
- Specification of file formats (ASCII, BINARY, etc.) for the
image and other types of data stored in an object which satisfy
the search criteria.
- POST-PROCESSING
- Post-processing of the data and attributes of the data by
executing arbitrary shell commands. For example, one can perform
arithmetic and statistical operations on a sub-set of attributes,
display the data by sending it to an image processing software,
draw various histograms, or simply store them in a file or even in
a database.
Communication Concepts and Commands
- CONNECTION REQUEST
- A connection request made by a User Interface
- QUERY
- A specification of a set of constraints and required attributes
- TARGET
- A specification of output location and format
- QUERY
- A submitted query to the data warehouse
- QUERY CONTROL
- Interrupting, resuming and aborting ongoing queries
- SESSION
- A client<->server session between a GUI (user) and server that begins with a CONNECTION REQUEST and ends with an EXIT request
- STATUS
- The state of submitted queries : active/passive, fractional
completion status
- PROJECTION
- Shows a projected time and size for the query
- CODE
- User written code to be interpreted by the Science Archive server.
Syntax of messages sent by the User Interface (GUI)
- [ BEGIN QUERY | END QUERY ]
- indicates begin/end of an sxQL query
- [ LAUNCH QUERY | END QUERY ]
- same as above, but instructs the server to give a quick and
abbreviated cost-estimate and launch the query execution without
waiting for user confirmation
- ECHO txt
- echo the given txt back to the GUI (used for debugging).
- SET ECHO [ ON | OFF ]
- set echo mode ON or OFF. If echo is ON, everything is echoed back to the client (used for debugging).
- SET ID sid
- assigns a user defined sid to the session
- the defult is the pid.uid of the server process and user
- SET TARGET [ DEFAULT | FILE | SOCKET ] arguments
- specifies where the data should be directed
- DEFAULT takes no arguments; control socket receives data
- FILE takes one argument: file-path
- SOCKET takes one argument: host:port
- SET FORMAT [ ASCII | BINARY ]
- specifies what format data should be sent
- the default is ASCII for now
- STATUS [qid]
- get status report on query
- LIST
- get a list of queries currently entered in this session, along with the status of each query
- SUSPEND [qid]
- pause the current query
- RESUME [qid]
- continue the suspended query
- ABORT [qid]
- entirely abort the query, and clean up
- EXIT
- denotes normal termination of session
- USERNAME userid
- username to be validated.
- PASSWORD passwd
- password to be validated.
- DISCONNECT sid
- disconnect GUI from the specified session. Does NOT terminate the session.
- RECONNECT sid
- re-establish connection between GUI and the specified session.
Syntax of messages received by the User Interface
- BC qid =
multi-line report
EC qid
- this is the response to the BEGIN QUERY and LAUNCH QUERY
commands
- the BEGIN QUERY results in a full cost-estimate evaluation
- the LAUNCH QUERY only gets an abbreviated cost-estimate
- BO qid
multi-line output
EO qid %done #objs
- this is the output packet for a given query
- the end-output (EO) comes with the query progress in terms of the
percentage of the query done so far and the number of objects returned
- STATUS qid [ IDLE | BEGIN | END | ACTIVE | SUSPENDED | RESUMED ] [info]
- response to STATUS command
- no information follows IDLE or BEGIN
- the estimated percent completed follows ACTIVE and PAUSED
- the number of objects returned follows END
- a SUSPENDED status message is issued in response to the SUSPEND
command
- a RESUMED status message is issued in response to the RESUME command
- DONE [QUERY | ABORT] qid
- QUERY qid:
query
query-status
... (for each query in current session)
- this is the response to the LIST command
- there is one of these for every currently active query
- WARNING qid warning-message
- ERROR [qid] error-message
- ECHO text
- response to the ECHO command
Layout of a session as seen by the user
send BEGIN QUERY
SELECT PROJECTION ....
END QUERY
get [ ProjectionReport | ErrorMsg ]
...
send SET ID 2344; SET TARGET ... ; SET FORMAT ...;
send BEGIN QUERY
SELECT PROJECTION ....
END QUERY
get [ StatusReport | ErrorMsg ]
...
get [ StatusReport | ErrorMsg ]
send [ PAUSE | ABORT | RESUME ]
get [ StatusReport | ErrorMsg ]
send STATUS
get [ StatusReport | ErrorMsg ]
send EXIT