Server Configuration

From ParaQ Wiki
Revision as of 15:09, 10 August 2006 by Tshead (talk | contribs)
Jump to navigationJump to search

Overview

To simplify the user experience, many sites may opt to provide predefined ParaView server configurations for their users, which can be done with an external XML file - see Server Startup. Although server configuration is new to ParaView, similar functionality already exists in ParaView Enterprise. This page proposes an XML schema for storing server configurations that is based on the existing functionality.

Example

Following is an example of the proposed server configuration XML:

  • "name" attributes are unique identifiers.
  • "label" attributes are human-readable labels for use by the user interface.
  • The <Server> "resource" attribute specifies the type of server connection, server host(s) and optional port(s) for making a connection. See Server Resources.
  • <Option> tags are options that will be presented to the user prior to starting a server.
  • <Argument> tags are command-line arguments that will be passed to the startup command when starting a server.
  • When a startup command is run, its environment will include all of the variables defined by <Option> tags, plus the following predefined variables:
    • PV_CONNECTION_URI
    • PV_CONNECTION_SCHEME
    • PV_SERVER_HOST
    • PV_SERVER_PORT
    • PV_DATA_SERVER_HOST
    • PV_DATA_SERVER_PORT
    • PV_RENDER_SERVER_HOST
    • PV_RENDER_SERVER_PORT
    • PV_USERNAME
  • When a startup command is run, string substitution is performed on its arguments, replacing each $STRING$ using the same collection of options and predefined variables.
  • The "readonly" attribute in a <Server> tag is a hint to the user interface that it should not allow users to edit the given server's configuration (users may modify a copy of the configuration, of course).
<Servers>

 <Server name="Localhost (reverse connection)" resource="csrc://localhost" >
  <ManualStartup/>
 </Server>

 <Server name="Localhost (forward connection)" resource="cs://localhost" >
  <CommandStartup>
   <Command exec="cmd" timeout="120" delay="3">
    <Arguments>
     <Argument value="/c" />
     <Argument value="start" />
     <Argument value="/b" />
     <Argument value="pvserver" />
     <Argument value="--server-port=$PV_SERVER_PORT$" />
     <Argument value="--use-offscreen-rendering" />
    </Arguments>
   </Command>
  </CommandStartup>
 </Server>

 <Server name="Jupiter" resource="cs://jupiter" readonly="true" >
  <CommandStartup>
   <Options>
    <Option name="NODES" label="Number of Nodes">
     <Range type="int" min="1" max="1024" default="1" />
    </Option>
    <Option name="MINUTES" label="Number of Minutes">
     <Range type="int" min="1" max="3600" default="60" />
    </Option>
    <Option name="PROJECTTASK" label="Project/Task">
     <String default="123/4.5" />
    </Option>
    <Option name="FLAVORENDER" label="Enable Flav-O-Render">
     <Boolean true="yes" false="no" default="true"/>
    </Option>
    <Option name="FLAVOR" label="Flavor">
     <Enumeration default="cherry">
      <Entry value="cherry" label="Cherry" />
      <Entry value="lime" label="Lime" />
      <Entry value="rutabaga" label="Rutabaga" />
     </Enumeration>
    </Option>
   </Options>
   <Command exec="cmd" timeout="120" delay="5">
    <Arguments>
     <Argument value="/c" />
     <Argument value="start" />
     <Argument value="/b" />
     <Argument value="mystartup" />
     <Argument value="--server-port=$PV_SERVER_PORT$" />
     <Argument value="--nodes=$NODES$" />
     <Argument value="--minutes=$MINUTES$" />
     <Argument value="--project-task=$PROJECTTASK$" />
     <Argument value="--flav-o-render=$FAVORENDER$" />
     <Argument value="--flavor=$FLAVOR$" />
    </Arguments>
   </Command>
  </CommandStartup>
 </Server>
 
</Servers>