ParaViewWeb Server setting: Difference between revisions

From KitwarePublic
Jump to navigationJump to search
 
(One intermediate revision by the same user not shown)
Line 102: Line 102:
In the configuration file your are able to limit the size of the file that can be uploaded as well as the file extension that are allowed.
In the configuration file your are able to limit the size of the file that can be uploaded as well as the file extension that are allowed.
On top of that, a timer can be set to automatically delete uploaded files after a certain amount of minutes. If this amount of time is negative, then, no timer is set, and the uploaded files will remains on the server forever.
On top of that, a timer can be set to automatically delete uploaded files after a certain amount of minutes. If this amount of time is negative, then, no timer is set, and the uploaded files will remains on the server forever.
And the same happen with the upload size. If the size is smaller than 10 bytes, the upload section on the front page will disappear.
And the same happen with the upload size. If the size is smaller than 1 Mega byte, the upload section on the front page will disappear.


The properties used to for that are:
The properties used to for that are:
   pw.gwt-app.upload.size=10000000
   pw.gwt-app.upload.size=10
   pw.gwt-app.upload.timeout=2
   pw.gwt-app.upload.timeout=2
   pw.gwt-app.upload.types=vtp:vtk
   pw.gwt-app.upload.types=vtp:vtk
Line 168: Line 168:
    
    
   # Optional PWApp upload properties
   # Optional PWApp upload properties
   # - size in bytes
   # - size in MBytes
   # - timeout in minute
   # - timeout in minute
   # - set of extension allowed
   # - set of extension allowed
   pw.gwt-app.upload.size=10000000
   pw.gwt-app.upload.size=10
   pw.gwt-app.upload.timeout=2
   pw.gwt-app.upload.timeout=2
   pw.gwt-app.upload.types=vtp:vtk
   pw.gwt-app.upload.types=vtp:vtk

Latest revision as of 15:02, 5 August 2010

ParaViewWeb


Introduction

ParaViewWeb provide an external configuration file that can be changed to tune your server. This file is the pw-config.properties that should be placed in the lib directory of your tomcat or in the classpath of your web server. The content of that file is provided below as an example.

This configuration file is also used by sample application to retrieve a set of properties.

What can be achieved by configuration

Storage directory (pw.working.directory)

The PWService application keeps track of the running session and also of the previous one. Those information are stored on the server into a database. This database will use this directory to put its data into as a paraweb-localDB child directory.

Service Limitation

The PWService application can limit the number of concurrent visualization session as well as killing running session if no one has interact with them for a while. The timeout should be an integer representing the number of minutes of inactivity before stopping the visualization session.

The properties used to do that are:

 pw.max.nb.running.session=5
 pw.garbage.collector.timeout=5

Logging

The PWService grab the output and error stream and store them in a file. Those log can be browsed from the web with the administration page. But the user is allowed to tune the content of those log by specifying the level of information they expect as well what kind of content do they want to log. Such as only the PWServer layer or also the underlying ParaView pvserver content.

The properties used to for that are:

 pw.logging.level=DEBUG
 paraview.logging=OFF
 pw.logging=ON

Security access

The PWService provides some administration pages where an authenticated user can login in order to stop, view or browse logs of active or previous visualization sessions.

The properties used to for that are:

  pw.admin.login=admin
  pw.admin.password=admin

PWServer executable (pw.executable.path.xxx)

PWService allow the user to start several PWServer executable based on the third parameter of the paraview.createSession(name,comment,'third'). In that case the pw.executable.path.third property value will be used to run PWServer. And the plugin directory will be the value of pw.plugins.third.

PVServer executable (pvserver.executable.path.xxx)

PWService allow the user to start remote pvserver with any number of parameters... The script has to provide some output information such as the host name as well as the port used to start the server. Those information will be parsed and will be return in an XML standard form to the service user.

URL to access the service: http://.../PWService/pvserver?exec=demo&params=host:port:a:b:c&a=aa&b=b&c=cc&host=amber11&port=5646

  • exec: is used to select the executable on the server side such as if exec=demo the property used on server will be pvserver.executable.path.demo.
  • params: is used to precise the parameter that should be forwarded to the script with that specific order.

The XML response will look like that:

 <?xml version="1.0" encoding="UTF-8"?>
 <pvserver>
   <host name="amber11" port="5646"/>
   <connections>
      <connection type="socket" host="amber11" port="5646"/>
      <connection type="http" 
           upstream-url="http://localhost:8080/PWService/pvserver-socket?id=294916&type=up" 
           downstream-url="http://localhost:8080/PWService/pvserver-socket?id=294916&type=down"/>
   </connections>
 </pvserver>

The XML server configuration on the client side could look like that

File: ~/.config/ParaView/server.pvsc

 <Servers>
   <Server name="builtin" resource="builtin:">
     <ManualStartup/>
   </Server>
   
   <Server name="http-remote-manual" resource="http://paraviewweb.kitware.com">
     <ManualStartup>
       <Options>
         <Set name="params" value="port"/>
         <Set name="exec" value="demo"/>
         <Set name="path" value="/PWService/pvserver"/>
         <Option name="port" label="Server Port: ">
           <Range type="int" min="11111" max="65535" step="1" default="11122"/>
         </Option>
       </Options>
     </ManualStartup>
   </Server>
   
   <Server name="localhost" resource="cs://localhost:11111">
     <ManualStartup/>
   </Server>
 </Servers>

PWApp specific

File uploading limitation

In PWApp, user can process some data files. Those file must be on the server but can also be uploaded and used for a limited amount of time. In the configuration file your are able to limit the size of the file that can be uploaded as well as the file extension that are allowed. On top of that, a timer can be set to automatically delete uploaded files after a certain amount of minutes. If this amount of time is negative, then, no timer is set, and the uploaded files will remains on the server forever. And the same happen with the upload size. If the size is smaller than 1 Mega byte, the upload section on the front page will disappear.

The properties used to for that are:

  pw.gwt-app.upload.size=10
  pw.gwt-app.upload.timeout=2
  pw.gwt-app.upload.types=vtp:vtk

Custom file settings

The PWApp allow the user to load file on the server filesystem as well as loading and saving states. Therefore, the user has to specify which directory the server should look into to load data files and ParaView state files. Moreover, several Paraview configuration can be used to launch the application. For example, if you use the Manta engine for the rendering, you will need to start a pvserver and bind the PWServer to that pvserver at once. That's precisely what Paraview configuration is for. With the pw.gwt-app.confs property you provide the list of available configuration that you want to use for your PWApp application.

The properties used to for that are:

  pw.gwt-app.data=.../ParaViewWeb-work/data
  pw.gwt-app.states=.../ParaViewWeb-work/states
  pw.gwt-app.confs=default:manta

PWLauncher specific

PWLauncher is more like a generic script launcher on the server side where a username and a password are provided as argument. In order to allow the applciation to list the script available for your server, you will have to provides the directory that content those script as well as the directory that will content the log of their output.

The properties used to for that are:

  pw.remote.settings=.../ParaViewWeb-work/remote-settings
  pw.remote.log.dir=.../ParaViewWeb-work/logs

Sample pw-config.properties file

  ###################################
  # ParaView Web configuration file #
  ###################################
  
  # Directory used to store application files
  pw.working.directory=.../ParaViewWeb-work/
  
  # Logging level that should be used [DEBUG, INFO, WARNING, ERROR, CRITICAL]
  pw.logging.level=DEBUG
  
  # Do we enable logging [on, off, yes, no]
  paraview.logging=OFF
  pw.logging=ON
  
  # Inactivity timeout for garbage collecting PWServer applications 
  # time is given in minute
  pw.garbage.collector.timeout=5
  
  # Administration page user credentials
  pw.admin.login=admin
  pw.admin.password=admin
  
  # Maximum number of concurrent running visualization session
  pw.max.nb.running.session=5
  
  # PWServer executable path settings
  pw.executable.path.default=.../build-ParaViewWeb/ParaViewAdapter/PWServer
  pw.executable.path.manta=.../ParaViewWeb-work/exec/manta.sh
  
  # Plugin directory settings
  pw.plugins.default=.../ParaViewWeb-work/plugins
  pw.plugins.manta=.../ParaViewWeb-work/plugins
  
  # Optional thirdpart properties
  pw.gwt-app.data=.../ParaViewWeb-work/data
  pw.gwt-app.states=.../ParaViewWeb-work/states
  pw.gwt-app.confs=default:manta
  
  # Optional PWApp upload properties
  # - size in MBytes
  # - timeout in minute
  # - set of extension allowed
  pw.gwt-app.upload.size=10
  pw.gwt-app.upload.timeout=2
  pw.gwt-app.upload.types=vtp:vtk
  
  # Remote server command line
  #  * Tomcat will call any script in the following directory and will execute the
  #       > fullScriptPath username password 
  #  * Documentation on How to start a pvserver
  #    - http://www.cmake.org/Wiki/Setting_up_a_ParaView_Server
  pw.remote.settings=.../ParaViewWeb-work/remote-settings
  pw.remote.log.dir=.../ParaViewWeb-work/logs