diff webapp/doc/website/tips.html @ 922:8251cc7888fb

slightly updated website. removed links to berlios wiki, made tips page instead. still quite ugly...
author robcast
date Fri, 09 Dec 2011 20:33:24 +0100
parents
children 45effb9c9bed
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/webapp/doc/website/tips.html	Fri Dec 09 20:33:24 2011 +0100
@@ -0,0 +1,194 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+      "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<title>digilib -- Digital Image Library</title>
+</head>
+<body>
+  <table border="0" cellspacing="0" cellpadding="10">
+    <tr>
+      <td bgcolor="#a0a0a0">&nbsp;</td>
+      <td>
+        <img src="images/digilib-logo-big.png" align="left" />
+        <h1>
+          <tt>digilib</tt>
+          -- a versatile image viewing environment for the internet
+        </h1>
+      </td>
+    </tr>
+    <tr>
+      <td bgcolor="#a0a0a0" valign="top" align="right">
+        <p>
+          <b><a href="index.html">Info</a>
+          </b>
+        </p>
+        <p>
+          <b><a href="http://developer.berlios.de/projects/digilib/">Project</a>
+          </b>
+        </p>
+        <p>
+          <b><a href="http://developer.berlios.de/project/showfiles.php?group_id=251">Download</a>
+          </b>
+        </p>
+        <p>
+          <b><a href="http://developer.berlios.de/docman/?group_id=251">Docs</a>
+          </b>
+        </p>
+        <p>
+          <b><a href="tips.html">Tips</a>
+          </b>
+        </p>
+        <p>
+          <b><a href="http://hg.berlios.de/repos/digilib">Source</a>
+          </b>
+        </p>
+      </td>
+      <td>
+
+
+        <p>Some tips for running digilib</p>
+        <ul>
+          <li>
+            <a href="#vm_settings">Java VM settings for digilib</a>
+          </li>
+          <li>
+            <a href="#prescaled_images">Prescaled images</a>
+          </li>
+          <li>
+            <a href="installing_jai">Installing JAI</a>
+          </li>
+        </ul>
+
+        <h1 id="vm_settings">Java VM settings for digilib</h1>
+
+        <p>The Java virtual machine (Java-VM) only uses a fixed amount of memory for
+          its operations. When an operation needs more memory than available it aborts
+          with an error ("out of memory error").</p>
+        <p>digilib can need a lot of memory depending on the size and type of images.
+          Since digilib runs as a servlet under Tomcat its in the same VM as the Tomcat
+          server.</p>
+        <p>The amount of memory Tomcat (version 5.0) uses is configured by creating a
+          "setenv.sh" script with a line</p>
+        <pre> CATALINA_OPTS="-Xmx512m"
+</pre>
+        <p>in Tomcat's "bin" directory (giving 512MB in this case).</p>
+        <p>
+          You can check the amount of memory your digilib instance has available on the
+          bottom of the web page /server/dlConfig.jsp in your digilib instance (e.g. <a
+            href="http://digilib.mpiwg-berlin.mpg.de/digitallibrary/server/dlConfig.jsp"
+            class="external free" rel="nofollow">http://digilib.mpiwg-berlin.mpg.de/digitallibrary/server/dlConfig.jsp</a>).
+        </p>
+
+        <h1 id="prescaled_images">Prescaled images</h1>
+
+        <p>You can provide any number of scaled-down versions of your images that
+          digilib uses when a smaller version of an image is requested. Since less data
+          has to be read and processed this can speed up digilib's performance quite a
+          lot.</p>
+        <p>The actual process is that the client requests a certain target size,
+          digilib scans all available scaled-down versions of the same image, selects the
+          smallest image that is larger than the requested size and scales it down to the
+          requested size.</p>
+        <p>The scaled-down versions of the image have to have the same file name as
+          the original hi-res file. They can have a different type and extension (e.g.
+          img002.jpg for img002.TIFF)</p>
+        <p>The scaled down images have to be in the same subdirectory (the part that
+          shows up in digilib's "fn" parameter) as the hi-res file. The first part of each
+          directory tree is configured by the basedir-list parameter in
+          digilib-config.xml.</p>
+        <p>The sequence of directories in basedir-list is from hi-res to lo-res.
+          Images must be present in the hires directory but they need not be present in
+          all lower-res directories.</p>
+        <p>e.g. if digilib-config.xml contains</p>
+        <pre> &lt;parameter name="basedir-list" value="/images:/scaled:/thumb" /&gt;
+</pre>
+        <p>and a user requests the image "books/book1/page0002" digilib looks for</p>
+        <pre> /thumb/books/book1/page0002.*
+ /scaled/books/book1/page002.*
+ /images/books/book1/page002.*
+</pre>
+        <p>and uses the first image that is bigger than or equal to the requested
+          size.</p>
+        <p>
+          For batch-prescaling our images we use a script called "scale-o-mat" that uses a
+          lot of freely available imaging libraries (ImageMagick, libtiff, netpbm) and is
+          available in our public CVS <a
+            href="http://itgroup.mpiwg-berlin.mpg.de/cgi-bin/cvsweb.cgi/scaleomat/"
+            class="external autonumber" rel="nofollow">[1]</a>. The script is given a
+          hi-res base directory, a destination base directory, a destination size and a
+          starting directory. It then processes all files in the starting directory and
+          all its subdirectories and creates scaled images in corresponding directories
+          under the destination base directory.
+        </p>
+        <p>We currently use prescaled thumbnails of 100 pixels and images for browser
+          display of 1500 pixels. Remember that the prescaled image has to be larger (or
+          the same size) than the requested image size!</p>
+        <p>There is another optimization in digilib: if the requested image is exactly
+          the same size and type as the prescaled image then the prescaled image is sent
+          unmodified to the client which is a lot faster. So it makes sense to produce
+          thumbnails of exactly 90 pixels width when they are used in an HTML page where
+          all images are 90 pixels wide.</p>
+
+
+        <h1 id="installing_jai">Installing JAI</h1>
+
+        <p>
+          In principle you can install the <a
+            href="http://java.sun.com/javase/technologies/desktop/media/jai/"
+            class="external text" rel="nofollow">Java Advanced Imaging</a> JAR files (and
+          native library files if available) in the /WEB-INF/lib/ directory of the digilib
+          web application.
+
+        </p>
+        <p>I found that in some cases digilib stopped reading TIFF files after a
+          period of running. In these cases it helped to install the JAI files directly in
+          the local Java installation (i.e. in the Java's /jre/lib/ext/ directory on
+          linux).</p>
+
+
+        <h1 id="mpiwg_setup">Sample setup</h1>
+
+        <p>The current digilib setup at the MPIWG (as of November 2005):</p>
+        <ul>
+          <li>
+            One frontend server running the lightweight web-multiplexer <a
+              href="http://www.apsis.ch/pound/" class="external text" rel="nofollow">pound</a>
+            on port 80 that distributes requests to two servers runnning digilib
+          </li>
+          <li>
+            the two servers run digilib under <a
+              href="http://tomcat.apache.org/index.html" class="external text"
+              rel="nofollow">Tomcat</a> on port 8080 without Apache
+            <ul>
+              <li>one server is the same machine as the frontend server (Linux, Dual
+                2.4GHz Xeon, 2GB RAM)</li>
+              <li>the other server is a separate, newer machine (Linux, Dual 1.8GHz
+                Opteron, 2GB RAM)</li>
+            </ul>
+          </li>
+          <li>
+            the digilib instances (digilib 1.5.9c as of 22.11.2005) run on Tomcat on Java
+            1.5.0_05 (or 1.4.2_06) with 1GB of <a href="#vm_settings">Java VM memory
+              for digilib</a> (-Xmx1024m) with JAI (1.1.2_01) and JAI-ImageIO (1.0_01) <a
+              href="#installing_jai">installed in the JRE</a>(!)
+          </li>
+          <li>both digilib servers access all image files over NFS (over GBit
+            Ethernet) from a central file server (Solaris 8, Sun Fire 480, multiple RAIDs
+            on Fibrechannel)</li>
+        </ul>
+
+      </td>
+    </tr>
+    <tr>
+      <td style="padding: 0px" align="left">
+        <a href="http://developer.berlios.de"> <img
+          src="http://developer.berlios.de/bslogo.php?group_id=0&type=1" width="124"
+          height="32" border="0" alt="BerliOS Logo" /> </a>
+      </td>
+      <td></td>
+    </tr>
+  </table>
+
+</body>
+</html>
\ No newline at end of file