ParaView:Server Configuration: Difference between revisions
No edit summary |
|||
Line 59: | Line 59: | ||
=Use Cases= | =Use Cases= | ||
==Case One: Simple server connection== | ==Case One: Simple server connection== | ||
In this use-case, we are setting a configuration for a simple server connection (to a pvserver processes) running on a node named "amber1", at port 20234. The pvserver process will be started manually by the user. | |||
<Server name="case1" resource="cs://amber1:20234" owner="site"> | |||
<ManualStartup /> | |||
</Server> | |||
Here, '''resource''' indentifies the type if the connection (''cs'' -- implying client-server), host name and port; '''owner''' is simply used to determine editability of the configuration from ParaView GUI (as explained earlier). Since the user starts pvserver processes manually, we use <ManualStartup /> tag. | |||
==Case Two: Simple server connection with user-specified port== | |||
This is case as Case One except that we want to ask the user each time the port number to connect to pvserver at. | |||
<Server name="case2" resource="cs://amber1" owner="site"> | |||
<ManualStartup> | |||
<Options> | |||
</ | |||
</ManualStartup/> |
Revision as of 15:17, 10 September 2008
Overview
Several sites have set of visualization clusters that are available to the users to connect to. These sites may want to provide a default set of server configurations available to the users. Additionally, there may be some options that may be needed to be specified before connecting to the server. All this can be managed using server configuration xmls. This document illustrates a few example use-cases.
Default Servers
When ParaView starts up, it looks for a default_servers.pvsc file in the following locations:
- On Unix-based systems
- ParaView executable directory
- $HOME/.config/ParaView/
- /usr/share/ParaView/
- On Windows
- ParaView executable directory
- %APPDATA%\ParaView\
- %COMMON_APPDATA%\ParaView\
XML Schema
This default_server.pvsc is an xml file describing either the available server configurations. The structure of this xml is as follows:
- The <Servers> tag is the root element of the document, which contains zero-to-many <Server> tags.
- Each <Server> tag represents a configured server:
- The "name" attribute uniquely identifies the server configuration, and is displayed in the user interface.
- The "resource" attribute specifies the type of server connection, server host(s) and optional port(s) for making a connection. See Server Resources.
- The "owner" attribute specifies where the configuration originated, current valid values are "builtin" (the configuration was hard-coded into the application), "site" (the configuration was setup by site administrators), or "user" (the configuration was setup by the user). The client uses this information to set policy, e.g: "builtin" and "site" configurations are read-only, only "user" configurations are stored in per-user preferences, etc.
- The <CommandStartup> tag is used to run an external command to start a server.
- An optional <Options> tag can be used to prompt the user for options required at startup.
- Each <Option> tag represents an option that the user will be prompted to modify before startup.
- The "name" attribute defines the name of the option, which will become its variable name when used as an environment variable, and for purposes of string-substitution in <Argument> tags.
- The "label" attribute defines a human-readable label for the option, which will be used in the user interface.
- The optional "readonly" attribute can be used to designate options which are user-visible, but cannot be modified.
- A <Range> tag designates a numeric option that is only valid over a range of values.
- The "type" attribute controls the type of number controlled. Valid values are "int" for integers and "double" for floating-point numbers, respectively.
- The "min" and "max" attributes specify the minimum and maximum allowable values for the option (inclusive).
- The "step" attribute specifies the preferred amount to increment / decrement values in the user interface.
- The "default" attribute specifies the initial value of the option.
- As a special-case for integer ranges, a default value of "random" will generate a random number as the default each time the user is prompted for a value. This is particularly useful with PV_CONNECT_ID.
- A <String> tag designates an option that accepts freeform text as its value.
- The "default" attribute specifies the initial value of the option.
- A <Boolean> tag designates an option that is either on/off or true/false.
- The "true" attribute specifies what the option value will be if enabled by the user.
- The "false" attribute specifies what the option value will be if disabled by the user.
- The "default" attribute specifies the initial value of the option, either "true" or "false".
- An <Enumeration> tag designates an option that can be one of a finite set of values.
- The "default" attribute specifies the initial value of the option, which must be one of its enumerated values.
- Each <Entry> tag describes one allowed value.
- The "name" tag specifies the value for that choice.
- The "label" tag provides human-readable text that will be displayed in the user interface for that choice.
- Each <Option> tag represents an option that the user will be prompted to modify before startup.
- A <Command> tag is used to specify the external command and its startup arguments.
- The "exec" attribute specifies the filename of the command to be run. The system PATH will be used to search for the command, unless an absolute path is specified.
- The "timeout" attribute specifies the maximum amount of time (in seconds) that the client will wait for the server to start (currently not implemented).
- The "delay" attribute specifies a delay (in seconds) between the time the startup command completes and the time that the client attempts a connection to the server.
- <Argument> tags are command-line arguments that will be passed to the startup command.
- String substitution is performed on each argument, replacing each $STRING$ with the value of a predefined or user-defined variable.
- Arguments whose value is an empty string are not passed to the startup command.
- An optional <Options> tag can be used to prompt the user for options required at startup.
- The <ManualStartup> tag indicates that the user will manually start the given server prior to connecting.
- An optional <Options> tag can be used to prompt the user for options required at startup. Note that PV_SERVER_PORT, PV_DATA_SERVER_PORT, PV_RENDER_SREVER_PORT, and PV_CONNECT_ID are the only variables that make sense in this context.
- Other startup type tags may be added in the future to support e.g: builtin SSH client functionality.
Use Cases
Case One: Simple server connection
In this use-case, we are setting a configuration for a simple server connection (to a pvserver processes) running on a node named "amber1", at port 20234. The pvserver process will be started manually by the user.
<Server name="case1" resource="cs://amber1:20234" owner="site"> <ManualStartup /> </Server>
Here, resource indentifies the type if the connection (cs -- implying client-server), host name and port; owner is simply used to determine editability of the configuration from ParaView GUI (as explained earlier). Since the user starts pvserver processes manually, we use <ManualStartup /> tag.
Case Two: Simple server connection with user-specified port
This is case as Case One except that we want to ask the user each time the port number to connect to pvserver at.
<Server name="case2" resource="cs://amber1" owner="site"> <ManualStartup> <Options> </ </ManualStartup/>