ParaViewWeb Building: Difference between revisions
(19 intermediate revisions by 4 users not shown) | |||
Line 3: | Line 3: | ||
== Requirements == | == Requirements == | ||
ParaViewWeb utilities several existing technologies for different components in the system. For that reason, it depends on a few 3D party libraries/runtimes that must be installed separately. In this section we will cover the different requirements and details for obtaining and building each of these dependencies. | |||
In this section we will | |||
=== For Building the application === | === For Building the application === | ||
* Caution | <div style="border: 4px solid #ffc9c9; color: #000; background-color: #fff3f3"> | ||
** Do not use OpenJDK be sure to use the Sun JDK in your CMake | :::::''' ******** Caution *******''' | ||
:: Do not use OpenJDK be sure to use the Sun JDK in your CMake | |||
:: For Mac OS X user, the JDK is already installed for you by Apple, and you do not need to download or install any other JDK. | |||
</div> | |||
<div style="border: 4px solid #ffc9c9; color: #000; background-color: #fff3f3"> | |||
:: The current version of ParaViewWeb has been updated to support the latest version of '''ParaView 3.14''', | |||
:: but if you want to use the '''ParaView release (3.10.1)''', you need to checkout an older version of ParaViewWeb by executing | |||
:: the following command line inside the ParaViewWeb directory: | |||
:: '''git checkout pv-3.10.1 -b pv-release''' | |||
</div> | |||
<div style="border: 4px solid #ffc9c9; color: #000; background-color: #fff3f3"> | |||
:: All the CMake configuration are given as example and some of them use Relative path to be explicit. | |||
:: Although, '''ONLY absolute path''' should be used | |||
</div> | |||
* MANDATORY - [WebServer/PWService] | * MANDATORY - [WebServer/PWService] | ||
** Java JDK 1. | ** Java JDK 1.6 (http://java.sun.com/javase/downloads/widget/jdk6.jsp) | ||
** Flex SDK 3 | ** Flex SDK 3 (http://opensource.adobe.com/wiki/display/flexsdk/Downloads) | ||
* OPTIONAL - [WebServer/PWApp] | * OPTIONAL - [WebServer/PWApp] | ||
** Ant 1.5+ (http://ant.apache.org/) | ** Ant 1.5+ (http://ant.apache.org/) | ||
Line 33: | Line 46: | ||
=== For the runtime === | === For the runtime === | ||
* ActiveMQ 3.x, the JMS brocker (http://activemq.apache.org/) | * ActiveMQ 5.3.x, the JMS brocker (http://activemq.apache.org/) | ||
* Tomcat 6.x, the Web server (http://tomcat.apache.org/) | * Tomcat 6.x, the Web server (http://tomcat.apache.org/) | ||
* [ParaviewAdapter] executable (PWServer) | * [ParaviewAdapter] executable (PWServer) | ||
Line 49: | Line 62: | ||
> git clone http://paraview.org/ParaViewWeb.git | > git clone http://paraview.org/ParaViewWeb.git | ||
> git clone git@paraview.org:ParaViewWeb.git | > git clone git@paraview.org:ParaViewWeb.git | ||
ParaViewWeb keep changing in order to support the latest ParaView version in its repository. | |||
If you want to use the latest ParaView release (3.10.1) instead, you should checkout the tag "pv-3.10.1" in the ParaViewWeb repository. | |||
In order to do that, you can simply type the following command line inside the ParaViewWeb directory | |||
> git checkout pv-3.10.1 -b pv-release | |||
The application is split into several components. | The application is split into several components. | ||
Line 78: | Line 96: | ||
==== Introduction ==== | ==== Introduction ==== | ||
The | The PWServer is a native application which rely on ParaView. Its | ||
executable start a ParaView server and wait user interaction by listening | executable start a ParaView server and wait user interaction by listening | ||
on a Messaging Service based on ActiveMQ. The automatic launch of this | on a Messaging Service based on ActiveMQ. The automatic launch of this | ||
Line 103: | Line 121: | ||
If not set, the listening loop will be started. | If not set, the listening loop will be started. | ||
[0, 1] | [0, 1] | ||
--jms-host : Specify the host where ActiveMQ is running when it is not localhost. | |||
--jms-port : Specify the port that ActiveMQ is using to communicate if not 27017 | |||
--paraweb-plugin-dir : Directory where plugins will be loaded from. | --paraweb-plugin-dir : Directory where plugins will be loaded from. | ||
Line 129: | Line 149: | ||
application. Therefore, you will need to download the source files at | application. Therefore, you will need to download the source files at | ||
the following url http://paraview.org/paraview/resources/software.html. | the following url http://paraview.org/paraview/resources/software.html. | ||
You should use | You should use ParaView 3.10.1 for now. | ||
Then you will need to build it with the Python wrapping. | Then you will need to build it with the Python wrapping. | ||
Qt is not mandatory to compile this ParaView. The command line given | Qt is not mandatory to compile this ParaView. The command line given | ||
Line 149: | Line 169: | ||
==== Configuration and building ==== | ==== Configuration and building ==== | ||
The | The PWServer will used the compiled version of ParaView with the | ||
python capability as well as the ActiveMQ-CPP library. The command line | python capability as well as the ActiveMQ-CPP library. The command line | ||
given below are for Unix systems and paths are given as example. | given below are for Unix systems and paths are given as example. | ||
Line 190: | Line 210: | ||
==== Prerequisites ==== | ==== Prerequisites ==== | ||
===== Flex SDK 3 | ===== Flex SDK 3 ===== | ||
Flex is a web framework developped by Adobe that is used in our | Flex is a web framework developped by Adobe that is used in our | ||
Line 218: | Line 238: | ||
> mkdir build-pw install-pw <---- Optional if you've done | > mkdir build-pw install-pw <---- Optional if you've done | ||
> cd build-pw <---- it for ParaviewAdapter | > cd build-pw <---- it for ParaviewAdapter | ||
> ccmake ../ | > ccmake ../SOURCE_DIR | ||
BUILD_WEB_SERVICE ON | BUILD_WEB_SERVICE ON | ||
BUILD_WEB_APPLICATION OFF | BUILD_WEB_APPLICATION OFF | ||
BUILD_WEB_SAMPLES OFF | BUILD_WEB_SAMPLES OFF | ||
Java_JAR_EXECUTABLE /opt/jdk1.6.0_18/bin/jar | |||
Java_JAVA_EXECUTABLE /opt/jdk1.6.0_18/bin/java | |||
Java_JAVAC_EXECUTABLE /opt/jdk1.6.0_18/bin/javac | |||
CORE_CTX_ROOT PWService | CORE_CTX_ROOT PWService | ||
FLEX_HOME /opt/flex-sdk/ | FLEX_HOME /opt/flex-sdk/ | ||
LOGGING_LEVEL ERROR | LOGGING_LEVEL ERROR | ||
Line 387: | Line 406: | ||
To use the sandbox, browse to the following URL: | To use the sandbox, browse to the following URL: | ||
http:// | http://localhost:8080/PWSandbox | ||
Select one of the sample scripts from the "Samples" drop-down and the | Select one of the sample scripts from the "Samples" drop-down and the |
Latest revision as of 17:37, 2 May 2012
Requirements
ParaViewWeb utilities several existing technologies for different components in the system. For that reason, it depends on a few 3D party libraries/runtimes that must be installed separately. In this section we will cover the different requirements and details for obtaining and building each of these dependencies.
For Building the application
- ******** Caution *******
- Do not use OpenJDK be sure to use the Sun JDK in your CMake
- For Mac OS X user, the JDK is already installed for you by Apple, and you do not need to download or install any other JDK.
- The current version of ParaViewWeb has been updated to support the latest version of ParaView 3.14,
- but if you want to use the ParaView release (3.10.1), you need to checkout an older version of ParaViewWeb by executing
- the following command line inside the ParaViewWeb directory:
- git checkout pv-3.10.1 -b pv-release
- All the CMake configuration are given as example and some of them use Relative path to be explicit.
- Although, ONLY absolute path should be used
- MANDATORY - [WebServer/PWService]
- Java JDK 1.6 (http://java.sun.com/javase/downloads/widget/jdk6.jsp)
- Flex SDK 3 (http://opensource.adobe.com/wiki/display/flexsdk/Downloads)
- OPTIONAL - [WebServer/PWApp]
- Ant 1.5+ (http://ant.apache.org/)
- GWT SDK 2.x (http://google-web-toolkit.googlecode.com/files/gwt-2.0.3.zip)
- OPTIONAL - [WebServer/Samples/SimpleJavaScript]
- Nothing more than the PWService
- OPTIONAL - [WebServer/Samples/InteractiveConsole]
- Nothing more than the PWService
- OPTIONAL - [WebServer/Samples/Sandbox]
- Qooxdoo SDK (http://qooxdoo.org/download)
For both and need local compilation
- [ParaviewAdapter] ParaView with the Python wrapping (http://paraview.org/paraview/resources/software.html)
- [ParaviewAdapter] ActiveMQ-CPP (http://activemq.apache.org/cms/download.html)
For the runtime
- ActiveMQ 5.3.x, the JMS brocker (http://activemq.apache.org/)
- Tomcat 6.x, the Web server (http://tomcat.apache.org/)
- [ParaviewAdapter] executable (PWServer)
- [PWService] war file with its configuration file. (PWService.war + pw-config.properties)
- [*] Any sample war file that you want to deploy.
Building the Application
The project is hosted at kitware at the following URL
> http://paraview.org/ParaViewWeb.git
You will need to create a clone of this repository before proceeding with the next instructions. To do so you can either of the following command line.
> git clone git://paraview.org/ParaViewWeb.git > git clone http://paraview.org/ParaViewWeb.git > git clone git@paraview.org:ParaViewWeb.git
ParaViewWeb keep changing in order to support the latest ParaView version in its repository. If you want to use the latest ParaView release (3.10.1) instead, you should checkout the tag "pv-3.10.1" in the ParaViewWeb repository. In order to do that, you can simply type the following command line inside the ParaViewWeb directory
> git checkout pv-3.10.1 -b pv-release
The application is split into several components.
- ParaviewAdapter (PWServer)
- This is C++ component that can be thought of as the ParaView server process that does the actual visualization. This is indeed an application that links against the ParaView application libraries.
- WebServer/PWService (PWService)
- This is a web service that processes access to the scheduling/managing/monitoring ParaviewAdapter jobs as well as communicating with the Paraview Web client for creating visualizations etc. This component includes client-side javscript/java/flash components for developing web-applications using ParaView.
- WebServer/PWLauncher (PWLauncher)
- This is a web component that allow the user to execute script on the server side with login and password informations. This application can be used to start remote pvserver on any cluster. This service has been inserted in the web page of the PWApp application.
Besides these two framework components, we have a collection of sample applications that demonstrate the use of these components. We have deliberately written these samples using different client-side application technologies.
- WebServer/PWApp (PWApp)
- a Google Web Toolkit (GWT) based visualization application that allow the user to load and process data dynamically with a nice and advanced interactive user interface.
- WebServer/Samples (PW)
- It provides an index page of all the sample available.
- WebServer/Samples/SimpleJavaScript (PWSimple)
- A static web page containing a standalone javascript starting two concurrent visualization session with six renderer based on several technology such as Java, JavaScript, Flash. This application can be used to validate how each renderer is behaving on your machine/browser.
- WebServer/Samples/Interactive console (PWConsole)
- a simple jQuery-based scripting application enabling user to write javascript code to control ParaView inside a JavaScript console.
- WebServer/Samples/Sandbox (PWSandbox)
- a Qooxdoox based sandbox application enabling user to try out the ParaView Javascript scripting capabilities to script visualization pipelines using javascript (similar to PWConsole) application.
ParaviewAdapter (PWServer)
Introduction
The PWServer is a native application which rely on ParaView. Its executable start a ParaView server and wait user interaction by listening on a Messaging Service based on ActiveMQ. The automatic launch of this executable is done by the WebServer/CoreService application. Therefore, the end-user should not care about this application.
In order to configure the running process several option are given when the application is launched. Those option are given here so sys/admin could understand the processes that are running on their servers.
PWServer options:
--session-identifier : Option used to id the visualization session. --base-log-dir : Deprecated (NOT USED ANYMORE) --log-level : Logging level that you want in your log files [DEBUG, INFO, WARNING, ERROR, CRITICAL] --batch-file : Python script that should be executed inside the pwhelper.py context --server-hostname : Specify the hostname to connect to at startup. --server-port : Specify the port to connect to at startup when a hostname has been provided. If not set, the default 11111 port will be used. --jms : Start or no the listening loop for JMS messages. If not set, the listening loop will be started. [0, 1] --jms-host : Specify the host where ActiveMQ is running when it is not localhost. --jms-port : Specify the port that ActiveMQ is using to communicate if not 27017 --paraweb-plugin-dir : Directory where plugins will be loaded from.
Prerequisites
ActiveMQ-CPP
ActiveMQ-CPP is needed for the compilation and the execution of the application. Therefore, you will need to download the source files at the following url http://activemq.apache.org/cms/download.html. As of (06/28/2010) activemq-cpp 3.2 appears to have a bug in it. Please use activemq-cpp 3.1.x. Then you will need to build that library. The command line given below are for Unix systems.
> ./configure > make > sudo make install
Make sure that you have all the dependency needed to build this library. Here are the required package for Debian/Ubuntu:
apt-get install build-essential libaprutil1-dev libapreq2-dev apache2-utils python-dev cmake-curses-gui uuid-dev libapr1 libapreq2-dev
ParaView
ParaView is needed for the compilation and the execution of the application. Therefore, you will need to download the source files at the following url http://paraview.org/paraview/resources/software.html. You should use ParaView 3.10.1 for now. Then you will need to build it with the Python wrapping. Qt is not mandatory to compile this ParaView. The command line given below are for Unix systems.
> mkdir build-paraview > cd build-paraview > ccmake ../Paraview3 <---- Fix ParaView source path
BUILD_SHARED_LIBS ON PARAVIEW_ENABLE_PYTHON ON PARAVIEW_BUILD_QT_GUI OFF <---- Optional CMAKE_BUILD_TYPE Debug <---- Up to you CMAKE_INSTALL_PREFIX ../somewhere/...
> make > make install <---- Optional: We are going to use the build directory
Configuration and building
The PWServer will used the compiled version of ParaView with the python capability as well as the ActiveMQ-CPP library. The command line given below are for Unix systems and paths are given as example.
> mkdir build-pw install-pw > cd build-pw > ccmake ../SOURCE_DIR
ACTIVEMQ_CPP /usr/local/lib/libactivemq-cpp.so ACTIVEMQ_INCLUDE_DIR /usr/local/include/activemq-cpp-3.1.0/ BUILD_PW_SERVER ON BUILD_TESTING ON BUILD_WEB_SERVICE OFF <---- We are focusing on PWServer CMAKE_BUILD_TYPE Debug CMAKE_INSTALL_PREFIX ../install-pw ParaView_DIR ../build-paraview
> make > make test > make install
Paraview WebService (PWService)
Introduction
The goal of this component is to provide an access point for remote visualisation such as Web visualisation. Moreover, some administration web pages are given to monitor and administrate the running processes. The administration pages are protected by a login and a password. This authentication login/password can be changed in the configuration file of the application. The default values are :
login : admin password : admin
Moreover, the PWService is a Web application that can run on any computer without rebuilding it. Therefore, a binary package can be used for the distribution regardless the targeted platform.
Prerequisites
Flex SDK 3
Flex is a web framework developped by Adobe that is used in our application for the component that is responsible to show the rendering window. In order to compile our component, you will need to download the SDK here http://opensource.adobe.com/wiki/display/flexsdk/Downloads.
Java 1.6
Java will be used as a compiler and a runtime. In order to use it you will need to download it at the following url http://java.sun.com/javase/downloads/widget/jdk6.jsp
Tomcat 6 for the runtime
Tomcat is a web server used to run Java web application, therefore it will only be needed for the deployment and the runtime. You can download the application at the following url http://tomcat.apache.org/download-60.cgi
Configuration and building
The PWService do not require any sample to work, therefore we will focusing on building only the core service with all the settings that are mandatory. The command line given below are for Unix systems and paths are given as example.
> mkdir build-pw install-pw <---- Optional if you've done > cd build-pw <---- it for ParaviewAdapter > ccmake ../SOURCE_DIR
BUILD_WEB_SERVICE ON BUILD_WEB_APPLICATION OFF BUILD_WEB_SAMPLES OFF Java_JAR_EXECUTABLE /opt/jdk1.6.0_18/bin/jar Java_JAVA_EXECUTABLE /opt/jdk1.6.0_18/bin/java Java_JAVAC_EXECUTABLE /opt/jdk1.6.0_18/bin/javac CORE_CTX_ROOT PWService FLEX_HOME /opt/flex-sdk/ LOGGING_LEVEL ERROR LOG_PARAVIEW OFF LOG_PARAWEB ON PV_ADAPTER_EXEC ../install-pw/bin/PWServer WEB_DEPLOY OFF WORKING_DIR ../PW-work/
> make > make install
Deployment
The PWService as a Java Web application requires a framework to run, you will need to deploy the compiled application into that framework. To do so, you can do it automatically with CMake or with the following procedure. The CMake procedure can only work if the deployement is done on the same computer. More details are given after the general case.
General case procedure:
- Install tomcat by unzipping it in a directory.
- Copy the file install-pw/Web-apps/PWService.war into the TOMCAT_ROOT/webapps directory.
- Copy the file install-pw/Web-apps/pw-config.properties into the TOMCAT_ROOT/lib directory.
- Eventually edit the TOMCAT_ROOT/lib/pw-config.properties to fix path and settings.
- You are done ! The application is ready to work and the URL will be http://localhost:8080/PWService
To start tomcat: > cd TOMCAT_ROOT/bin > ./catalina.sh start
To stop tomcat: > cd TOMCAT_ROOT/bin > ./catalina.sh stop
CMake automatic deploy:
For automatic deployment with CMake, you will have to set the following properties in order to use the "make deploy" command.
WEB_DEPLOY ON TOMCAT_HOME /opt/apache-tomcat-6.0.24
Once is done you can simply do:
> make deploy
Interactive Console Sample (PWConsole)
Introduction
The goal of this component is to provide a web sample code using javascript to build complex remote visualization. This application provides to the user two render windows with a command line console that can be used to make JavaScript calls. A sample scenario and command lines are given on the root web pages.
Prerequisites
This application needs the PWService with all its dependency.
Configuration and building
The command line given below are for Unix systems and paths are given as examples.
> mkdir build-pw install-pw <---- Optional if you've done > cd build-pw <---- it previously > ccmake ../SOURCE_DIR
BUILD_WEB_SAMPLES ON BUILD_CONSOLE_SAMPLE ON
> make > make install
Deployment
Read the 3.2.4 deployment part. With the CMake deploy target everything will be done automatically, otherwise you have to copy the file PWConsole.war into the TOMCAT_ROOT/webapps directory.
Paraview Web Application (PWApp)
Introduction
The goal of this component is to provide a web application code using javascript to build complex remote visualization. This application provides to the user several opportunities:
- Create a new visualization session and do some processing on the loaded data in a graphical manner an interactivity.
- Join a previously created session and watch the result dynamically.
Prerequisites
This application needs the PWService with all its dependency as well as the GWT SDK. To install the GWT sdk, you will need to download it here http://google-web-toolkit.googlecode.com/files/gwt-2.0.3.zip and unzip it. Moreover, as GWT generate a ant based project, ant will be needed as well. To install apache-ant just download it here http://ant.apache.org/bindownload.cgi and unzip it.
Configuration and building
The command line given below are for Unix systems and paths are given as examples.
> mkdir build-pw install-pw <---- Optional if you've done > cd build-pw <---- it previously > ccmake ../SOURCE_DIR
BUILD_WEB_APPLICATION ON ANT_EXECUTABLE /opt/apache-ant-1.8.0/bin/ant GWT_SDK_HOME /opt/gwt-2.0.3/
> make > make install
Deployment
Read the 3.2.4 deployment part. With the CMake deploy target everything will be done automatically, otherwise you have to copy the file PWApp.war into the TOMCAT_ROOT/webapps directory.
Sandbox Sample (PWSandbox)
Introduction
PWSandbox is sandbox for trying out the JavaScript API for scripting visualization pipelines for ParaView. The applications includes a bunch of sample scripts for creating filters/ sources, changing parameters on them, getting information about the data etc. The user can try these examples out or create his own scripts in the Editor provided.
Prerequisites
This applications needs the PWService with all its dependency as well as Qooxdoo (http://qooxdoo.org/). To install Qooxdoo, simply download the zip file for version 1.0.1 (or greater) and unzip the archive.
Configuration and building
The following CMake variables must be set for this application to be built:
BUILD_WEB_SAMPLES ON BUILD_SANDBOX_SAMPLE ON QOOXDOO_SDK_PATH /opt/qooxdoo-1.0.1-sdk
Deployment
Read the 3.2.4 deployment part. With the CMake deploy target everything will be done automatically, otherwise you have to copy the file PWSandbox.war into the TOMCAT_ROOT/webapps directory.
Usage
To use the sandbox, browse to the following URL: http://localhost:8080/PWSandbox
Select one of the sample scripts from the "Samples" drop-down and the click "Run", this will try to run the sample script.
You can edit the script in the "Source Code" widget. After making any changes, or changing the Sample script, you need to click "Run" for the changes to be applied.
Deployment
Prerequisites
The following software or files should be available on the computer that will execute the application
- Applications:
- Java : JDK 1.6 from sun and NOT the OpenJDK
- ActiveMQ : Binary package
- Tomcat 6 : Binary package
- Builded components:
- PWServer : Builded executable with its dependency library. (ParaView, ActiveMQ-CPP, Python)
- PWService.war : Web Service for remote visualization
- pw-config.properties : Configuration file for the PWService
- Optional builded components:
- PWApp.war : Complex Web application
- PWConsole.war : Javascript command line console sample
- PWSandbox.war : Sandbox sample application
- PWSimple.war : Simple static Javascript code starting 2 concurrent visualization session with 6 renderer.
- Sample Data : Some sample data are provided and used in the PWApp application. To allow the application to find them, you will need to copy the data directory from the source to the WORKING_DIR in order to get a file path like the following one. Beaware of the case ! > WORKING_DIR/data/cow.vtp
Tomcat need to be pre-configured in order to run the web components properly. To do so, just copy the war file that you want to run into the webapps directory of your tomcat. Add a configured version of the pw-config.properties into the "lib" directory of your tomcat.
Starting the application
- If an OpenJDK is installed on the computer, you will need to set the JAVA_HOME system property before launching tomcat and the JMS brocker.
The following command line illustrate how to do it on linux:
> export JAVA_HOME=/opt/jdk1.6.0_18
- Start the JMS brocker
> cd apache-activemq-5.3.0/bin/ > ./activemq
- Start tomcat
> cd apache-tomcat-6.0.24/bin > ./startup.sh
To quit the applications
> CTR-C in the terminal that start the activemq message broker > cd apache-tomcat-6.0.24/bin > ./shutdown.sh
How to try it !
- Make sure that ActiveMQ and Tomcat are running.
- Go with your browser to the PWService home page.
- Try to login (admin/admin)
- Go to a sample web page