Installation instructions of this demo for INS1'ers/CWI'ers.
0. JAVA
You should have JRE 1.6 or higher installed on your machine.
1. GET FILES
Create a directory, say $HOME/sciqldemo, on your machine to store all files
for the SciQL demo.
Download all four files from http://homepages.cwi.nl/~zhang/sciqldemo/, or
(use your CWI account to) copy all files from /ufs/zhang/sciqldemo/ to
$HOME/sciqldemo.
You should have four files in your $HOME/sciqldemo; one package for the Tomcat
server, one package for the SciQL demo package, and two .tiff files used by
the image processing demo queries.
shell> mkdir $HOME/sciqldemo
shell> scp -r zhang@riga.ins.cwi.nl:/ufs/zhang/sciqldemo/* $HOME/sciqldemo
shell> ls $HOME/sciqldemo
GreyScale.tiff RemoteSensing.tiff SciQLdemo.war apache-tomcat-7.0.29.tar.gz
2. SET UP TOMCAT
Unpack the Tomcat package in your $HOME/sciqldemo
Deploy the demo package, i.e., move/copy the SciQL demo package into the
'webapps' directory.
Start the Tomcat server by going to the 'bin' directory of Tomcat and execute
the script './startup.sh'.
shell> cd $HOME/sciqldemo
shell> tar xfz apache-tomcat-7.0.29.tar.gz
shell> cd apache-tomcat-7.0.29
shell> cp $HOME/sciqldemo/SciQLdemo.war webapps/
shell> cd bin
shell> ./startup.sh
Starting up a Tomcat server happens very fast.
The 'startup.sh' script should output some information like:
Using CATALINA_BASE: $HOME/sciqldemo/apache-tomcat-7.0.29
Using CATALINA_HOME: $HOME/sciqldemo/apache-tomcat-7.0.29
Using CATALINA_TMPDIR: $HOME/sciqldemo/apache-tomcat-7.0.29/temp
Using JRE_HOME: /path/to/CurrentJDK/Home
Using CLASSPATH: $HOME/sciqldemo/apache-tomcat-7.0.29/bin/bootstrap.jar:$HOME/sciqldemo/apache-tomcat-7.0.29/bin/tomcat-juli.jar
You can verify that the Tomcat server is up and running by visiting the website
"localhost:8080" in your favorite browser.
Shuting down the Tomcat server can be down using:
shell> cd $HOME/sciqldemo/apache-tomcat-7.0.29/bin
shell> ./shutdown.sh
3. START MONETDB SERVER
By default, the demo interface assumes that the sciql branch of MonetDB is
compiled and installed on your local machine.
So you can start a MonetDB server using the following options, note the specific
port number and database name:
shell> mserver5 --set mapi_port=48137 --set mapi_open=true --dbname=sciqldemo
4. PREPARE IMAGE FILES
By default, the image processing queries expect two image files
"GreyScale.tiff" and "RemoteSensing.tiff" to be stored in the "/tmp"
directory of your machine.
shell> cp $HOME/sciqldemo/*.tiff /tmp
5. VIEW DEMO
Now you should be able to play with the demo in your favorite browser by
visiting the URL "localhost:8080/SciQLdemo"
Enjoy!
For all you comments, complains, mailto: y dot zhang at cwi dot nl
=================================
Note 1. The demo interface uses a simple configure file which can be found in
$HOME//sciqldemo/apache-tomcat-7.0.29/webapps/SciQLdemo/WEB-INF/web.xml
The only interesting line for the users is:
jdbc:monetdb://localhost:48137/sciqldemo
If you MonetDB server is running on another machine, say "host_xyz",
listening to another port, say 48130, or serving anther database, say
"mydb", you can modify the default values here:
jdbc:monetdb://host_xyz:48130/mydb
Shift-reload the page "localhost:8080/SciQLdemo" should trigger the Tomcat
server to use the new values; otherwise, try restart the Tomcat server.
However, this requires that
1) the port 48130 on the other machine is open to your local machine, and
2) the image files "/tmp/GreyScale.tiff" and "/tmp/RemoteSensing.tiff" are
available on host_xyz, i.e., on the *same* host where the MonetDB server
is running.
Note 2. Another way to use a MonetDB server running on remote machine, say
"host_xyz:48137", is to set up a SSH tunnel:
shell> ssh -L 48137::48137 @
Of course, you can use any other port number than 48137 on .
This way, the port on the remove machine doesn't need to be opened.
Note 3. The TIFF images *must* be stored in a directory *local* to your MonetDB
server!
If they can't be stored in the '/tmp' directory, you need to modify the
'rs.load()' queries in the demo interface with the correct path.
Note 4. The process of turning the image query results into a PNG image and
display it in the website is rather time consuming, so please wait for about
5 seconds before thinking some thing has gone wrong.
Note 5. It's a known problem that the database can get corrupted randomly :'(
It can cause MonetDB server to crash, or the Java code to return exceptions,
or the website to not respond for a long time (say >5 sec).
In that case, remove the database, restart the MonetDB server.
Note 6. If the resulting image of an image processing query is not updated
(compared with the previous result) as expected, try:
i) Shift-reload the page,
ii) clean up the browser cache,
iii) using the 'Clear' button to throw away all resulting images.
Note 7. If all instructions above don't help, mailto: y dot zhang at cwi dot nl