[MOBY-guts] biomoby commit
Eddie Kawas
kawas at dev.open-bio.org
Thu Feb 28 14:55:41 UTC 2008
kawas
Thu Feb 28 09:55:40 EST 2008
Update of /home/repository/moby/moby-live/Docs/MOBY-S_API
In directory dev.open-bio.org:/tmp/cvs-serv21874/Docs/MOBY-S_API
Modified Files:
RegistryScripts.html
Log Message:
added a bit on compressing the output of the scripts
moby-live/Docs/MOBY-S_API RegistryScripts.html,1.8,1.9
===================================================================
RCS file: /home/repository/moby/moby-live/Docs/MOBY-S_API/RegistryScripts.html,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- /home/repository/moby/moby-live/Docs/MOBY-S_API/RegistryScripts.html 2008/02/22 15:17:37 1.8
+++ /home/repository/moby/moby-live/Docs/MOBY-S_API/RegistryScripts.html 2008/02/28 14:55:40 1.9
@@ -4,156 +4,179 @@
<title>Registry Scripts</title>
<style type="text/css">
<!--
-body { background: #ffffcd;
- color: #000000;
- font-family: Arial, Helvetica, sans-serif;
- font-size: 12pt;
- font-weight: normal;
- margin-top: 110px;
- margin-right: 1em;
- margin-bottom: 1em;
- margin-left: 1em;
- background-position: left top;
- background-repeat: no-repeat;
- }
-
+body {
+ background: #ffffcd;
+ color: #000000;
+ font-family: Arial, Helvetica, sans-serif;
+ font-size: 12pt;
+ font-weight: normal;
+ margin-top: 110px;
+ margin-right: 1em;
+ margin-bottom: 1em;
+ margin-left: 1em;
+ background-position: left top;
+ background-repeat: no-repeat;
+}
.indent {
- margin-left: 5em;
- }
-
-td.text { background: #ffffcd;
- color: #000000;
- font-family: Arial, Helvetica, sans-serif;
- font-size: 12pt;
- font-weight: normal;
- margin-top: 110px;
- margin-right: 1em;
- margin-bottom: 1em;
- margin-left: 1em;
- }
-
-h1 { border: solid;
- text-align:center;
- background-color:yellow;
- color: navy;
- }
-h2 { border: ridge;
- padding: 5px;
- background-color:yellow;
- color: navy;
- }
-h3 { border: none;
- padding: 5px;
- background-color:yellow;
- color: navy;
- }
-
-.subtitle { border: none;
- padding: 5px;
- background-color:yellow;
- color: navy;
- }
-
-a:link { color: #0000ff; font-family: Arial, Helvetica, sans-serif; font-weight: normal; text-decoration: underline}
-a:visited { color: #0099ff; font-family: Arial, Helvetica, sans-serif; font-weight: normal; text-decoration: underline}
-a:active { color: #0000ff; font-family: Arial, Helvetica, sans-serif; font-weight: normal; text-decoration: underline}
-a:hover { color: #336666; font-family: Arial, Helvetica, sans-serif; font-weight: normal; text-decoration: underline}
-
-li { list-style-type: square;
- margin: 1em;
- list-style-image: url(b_yellow.gif);
- }
-li.tiny { list-style-type: square;
- margin: 0;
- list-style-image: none;
- }
-li.count { list-style-type: upper-roman;
- list-style-image: none;
- margin: 0;
- }
-li.dcount { list-style-type: decimal;
- list-style-image: none;
- margin: 0;
- }
-
-dd { margin-bottom: 0.5em }
-
-.address { font-size: 5pt; margin-right:1em }
-.smaller { font-size: 8pt }
-
-.note { font-style: italic;
+ margin-left: 5em;
+}
+td.text {
+ background: #ffffcd;
+ color: #000000;
+ font-family: Arial, Helvetica, sans-serif;
+ font-size: 12pt;
+ font-weight: normal;
+ margin-top: 110px;
+ margin-right: 1em;
+ margin-bottom: 1em;
+ margin-left: 1em;
+}
+h1 {
+ border: solid;
+ text-align:center;
+ background-color:yellow;
+ color: navy;
+}
+h2 {
+ border: ridge;
+ padding: 5px;
+ background-color:yellow;
+ color: navy;
+}
+h3 {
+ border: none;
+ padding: 5px;
+ background-color:yellow;
+ color: navy;
+}
+.subtitle {
+ border: none;
+ padding: 5px;
+ background-color:yellow;
+ color: navy;
+}
+a:link {
+ color: #0000ff;
+ font-family: Arial, Helvetica, sans-serif;
+ font-weight: normal;
+ text-decoration: underline
+}
+a:visited {
+ color: #0099ff;
+ font-family: Arial, Helvetica, sans-serif;
+ font-weight: normal;
+ text-decoration: underline
+}
+a:active {
+ color: #0000ff;
+ font-family: Arial, Helvetica, sans-serif;
+ font-weight: normal;
+ text-decoration: underline
+}
+a:hover {
+ color: #336666;
+ font-family: Arial, Helvetica, sans-serif;
+ font-weight: normal;
+ text-decoration: underline
+}
+li {
+ list-style-type: square;
+ margin: 1em;
+ list-style-image: url(b_yellow.gif);
+}
+li.tiny {
+ list-style-type: square;
+ margin: 0;
+ list-style-image: none;
+}
+li.count {
+ list-style-type: upper-roman;
+ list-style-image: none;
+ margin: 0;
+}
+li.dcount {
+ list-style-type: decimal;
+ list-style-image: none;
+ margin: 0;
+}
+dd {
+ margin-bottom: 0.5em
+}
+.address {
+ font-size: 5pt;
+ margin-right:1em
+}
+.smaller {
+ font-size: 8pt
+}
+.note {
+ font-style: italic;
padding-left: 5em;
- margin: 1em;
- }
-
+ margin: 1em;
+}
.update {
- background-color:#ccffcd;
- }
-
-pre.code { border: ridge;
- padding: 5px;
- background-color:#FFFF99;
- color: navy;
- }
-
+ background-color:#ccffcd;
+}
+pre.code {
+ border: ridge;
+ padding: 5px;
+ background-color:#FFFF99;
+ color: navy;
+}
pre.script {
- padding: 5px;
- background-color: white;
- color: navy;
- }
-
+ padding: 5px;
+ background-color: white;
+ color: navy;
+}
pre.script2 {
- padding: 5px;
- background-color: white;
- color: navy;
- margin-left: 5em;
- }
-
-
+ padding: 5px;
+ background-color: white;
+ color: navy;
+ margin-left: 5em;
+}
pre.sscript {
- padding: 5px;
- background-color: white;
- color: navy;
- font-size: 8pt;
- }
+ padding: 5px;
+ background-color: white;
+ color: navy;
+ font-size: 8pt;
+}
pre.ssscript {
- padding: 5px;
- background-color: white;
- color: navy;
- font-size: 6pt;
- }
-
+ padding: 5px;
+ background-color: white;
+ color: navy;
+ font-size: 6pt;
+}
tr.options {
- background-color: #FFFF99;
- color: navy;
- }
-
+ background-color: #FFFF99;
+ color: navy;
+}
b.step {
- background-color: white;
- color: navy;
- font-size: 8pt;
- }
+ background-color: white;
+ color: navy;
+ font-size: 8pt;
+}
.motto {
- text-align: right;
- font-style: italic;
- font-size: 10pt;
- }
+ text-align: right;
+ font-style: italic;
+ font-size: 10pt;
+}
.motto-signature {
- text-align: right;
- font-style: normal;
- font-size: 8pt;
- }
-
+ text-align: right;
+ font-style: normal;
+ font-size: 8pt;
+}
.sb {
- font-weight: bold;
- font-size: 8pt;
+ font-weight: bold;
+ font-size: 8pt;
}
.sbred {
- font-weight: bold;
- font-size: 8pt;
- color: red;
+ font-weight: bold;
+ font-size: 8pt;
+ color: red;
+}
+.mail {
+ font-size: medium
}
-.mail {font-size: medium}
-->
</style>
</head>
@@ -182,7 +205,11 @@
<ul>
<li> <a href="#prereq">Prerequisites</a></li>
<li> <a href="#install">Installation</a></li>
- <li> <a href="#config">Configuration</a></li>
+ <li> <a href="#config">Configuration</a>
+ <ul>
+ <li><a href="#speed">Making RDF Downloads Faster</a></li>
+ </ul>
+ </li>
<li> <a href="#testing">Testing</a></li>
</ul>
</ol>
@@ -200,16 +227,16 @@
<p class="indent"><span class="subtitle">Installation Procedure </span></p>
<ol>
<ol>
- <ol>
- <li class="dcount">Please make sure to first update your moby-live checkout from the cvs. Further details can be found <a href="http://biomoby.open-bio.org/index.php/for-developers/get_code" target="_blank">here.</a> <br>
- <br>
- </li>
- <li class="dcount">Once you have an updated checkout of BioMOBY, <strong><em>cd</em></strong> into <strong><em>/moby-live/Perl/MOBY-Server/share/cgi/</em></strong><br/>
- <br>
- </li>
- <li class="dcount">Copy the following files to your webservers cgi-bin directory<br>
- <br>
- <pre class="script">
+ <ol>
+ <li class="dcount">Please make sure to first update your moby-live checkout from the cvs. Further details can be found <a href="http://biomoby.open-bio.org/index.php/for-developers/get_code" target="_blank">here.</a> <br>
+ <br>
+ </li>
+ <li class="dcount">Once you have an updated checkout of BioMOBY, <strong><em>cd</em></strong> into <strong><em>/moby-live/Perl/MOBY-Server/share/cgi/</em></strong><br/>
+ <br>
+ </li>
+ <li class="dcount">Copy the following files to your webservers cgi-bin directory<br>
+ <br>
+ <pre class="script">
authority.pl<br/>
ValidateService<br/>
AgentRDFValidator<br/>
@@ -217,18 +244,17 @@
RESOURCES <br/>
GenerateRDF.cgi <br/>
Moby </pre>
- Copy the following file somewhere other than a web accessible directory (this script will be placed on a cron)
- <br>
- <br>
- <pre class="script">
+ Copy the following file somewhere other than a web accessible directory (this script will be placed on a cron) <br>
+ <br>
+ <pre class="script">
service_tester.pl </pre>
- <br>
- <br>
- </li>
- <li class="dcount">You're done. All that is left for you to do is configure the newly installed scripts. </li>
- </ol>
- <p class="update">Please make sure that the first line of all the scripts corresponds to the correct location of your perl executable. <br>
- For instance if you perl is located in<span class="script"> <strong>/bin/my/perl</strong></span>, then make sure to modify the first line of each of the scripts so that they read <em><strong> #!/bin/my/perl -w</strong></em></p>
+ <br>
+ <br>
+ </li>
+ <li class="dcount">You're done. All that is left for you to do is configure the newly installed scripts. </li>
+ </ol>
+ <p class="update">Please make sure that the first line of all the scripts corresponds to the correct location of your perl executable. <br>
+ For instance if you perl is located in<span class="script"> <strong>/bin/my/perl</strong></span>, then make sure to modify the first line of each of the scripts so that they read <em><strong> #!/bin/my/perl -w</strong></em></p>
<p><a name="config"></a></p>
</ol>
</ol>
@@ -266,9 +292,8 @@
<p>On *NIX machines, an example of how to set MOBY_SERVER is shown below: </p>
<blockquote>
<pre class="script">set MOBY_SERVER=http://your.domain.here/cgi-bin/MOBY/MOBY-Central.pl</pre>
- </blockquote>
-<p class="note">A better place for these variables would be in the profile of the user that starts the web server so that the variables can persist. </p>
-
+ </blockquote>
+ <p class="note">A better place for these variables would be in the profile of the user that starts the web server so that the variables can persist. </p>
<p class="subtitle"><a name="httpdconf"></a>Configure Apache</p>
<p>You will have to make sure that the following variables are set in your conf (httpd.conf) file. In most cases, you will have done this already when the registry was installed.</p>
<p> In any case, the variables are listed below: </p>
@@ -287,35 +312,34 @@
<tr>
<td width="25%" align="center" class="text">lsid_authority</td>
<td width="75%" align="left" class="text"><p>Your domain name, as you would like it in </p>
- <p>urn:lsid:<strong>lsid_authority</strong>:namespace:object</p></td>
+ <p>urn:lsid:<strong>lsid_authority</strong>:namespace:object</p></td>
</tr>
<tr>
<td width="25%" align="center" class="text">lsid_namespace</td>
<td width="75%" align="left" class="text"><p>The namespace that you would like service instances to use when resolving LSIDs, e.g.</p>
- <p> urn:lsid:lsid_authority:<strong>namespace</strong>:object</p></td>
+ <p> urn:lsid:lsid_authority:<strong>namespace</strong>:object</p></td>
</tr>
<tr>
<td width="25%" align="center" class="text">resourceURL</td>
<td width="75%" align="left" class="text"><p>The URL that would return the RDF describing the service instances registered in your registry.</p>
- <p> This value is most likely: http://yourDomain:yourPort/authority/RESOURCES/MOBY-S/ServiceInstances </p></td>
+ <p> This value is most likely: http://yourDomain:yourPort/authority/RESOURCES/MOBY-S/ServiceInstances </p></td>
</tr>
<tr>
<td width="25%" align="center" class="text">allResources</td>
<td width="75%" align="left" class="text"><p>The URL that would return the RDF describing all ontologies in your registry.</p>
- <p> This value is most likely: http://yourDomain:yourPort/authority/RESOURCES/MOBY-S/FULL </p></td>
+ <p> This value is most likely: http://yourDomain:yourPort/authority/RESOURCES/MOBY-S/FULL </p></td>
</tr>
- <tr>
+ <tr>
<td width="25%" align="center" class="text">service_tester_path</td>
<td width="75%" align="left" class="text"><p>The full readable/writeable path that the service tester can place persistent data between invocations .</p>
- <p> This can be any directory, including a temporary one. Make sure that the scripts invoked through apache and from the command line can read/write to it. <br>
- <strong>Note: the service tester does not currently work on windows!</strong> </p></td>
+ <p> This can be any directory, including a temporary one. Make sure that the scripts invoked through apache and from the command line can read/write to it. <br>
+ <strong>Note: the service tester does not currently work on windows!</strong> </p></td>
</tr>
<tr>
<td width="25%" align="center" class="text">rdf_cache</td>
<td width="75%" align="left" class="text"><p>The full readable/writable path that the RESOURCES script can place cached RDF related files.</p>
- <p> This can be any directory, including a temporary one. Make sure that the scripts invoked through apache and from the command line can read/write to it. <br>
- </p>
- </td>
+ <p> This can be any directory, including a temporary one. Make sure that the scripts invoked through apache and from the command line can read/write to it. <br>
+ </p></td>
</tr>
</table>
<p> </p>
@@ -324,17 +348,17 @@
<tr>
<td width="25%" align="center" class="text">lsid_authority</td>
<td width="75%" align="left" class="text"><p>Your domain name, as you would like it in </p>
- <p>urn:lsid:<strong>lsid_authority</strong>:namespace:object</p></td>
+ <p>urn:lsid:<strong>lsid_authority</strong>:namespace:object</p></td>
</tr>
<tr>
<td width="25%" align="center" class="text">lsid_namespace</td>
<td width="75%" align="left" class="text"><p>The namespace that you would like Objects to use when resolving LSIDs, e.g.</p>
- <p> urn:lsid:lsid_authority:<strong>namespace</strong>:object</p></td>
+ <p> urn:lsid:lsid_authority:<strong>namespace</strong>:object</p></td>
</tr>
<tr>
<td width="25%" align="center" class="text">resourceURL</td>
<td width="75%" align="left" class="text"><p>The URL that would return the RDF describing the datatypes registered in your registry.</p>
- <p> This value is most likely: http://yourDomain:yourPort/authority/RESOURCES/MOBY-S/Objects </p></td>
+ <p> This value is most likely: http://yourDomain:yourPort/authority/RESOURCES/MOBY-S/Objects </p></td>
</tr>
</table>
<p> </p>
@@ -343,17 +367,17 @@
<tr>
<td width="25%" align="center" class="text">lsid_authority</td>
<td width="75%" align="left" class="text"><p>Your domain name, as you would like it in </p>
- <p>urn:lsid:<strong>lsid_authority</strong>:namespace:object</p></td>
+ <p>urn:lsid:<strong>lsid_authority</strong>:namespace:object</p></td>
</tr>
<tr>
<td width="25%" align="center" class="text">lsid_namespace</td>
<td width="75%" align="left" class="text"><p>The namespace that you would like namespaces to use when resolving LSIDs, e.g.</p>
- <p> urn:lsid:lsid_authority:<strong>namespace</strong>:object</p></td>
+ <p> urn:lsid:lsid_authority:<strong>namespace</strong>:object</p></td>
</tr>
<tr>
<td width="25%" align="center" class="text">resourceURL</td>
<td width="75%" align="left" class="text"><p>The URL that would return the RDF describing the namespaces registered in your registry.</p>
- <p> This value is most likely: http://yourDomain:yourPort/authority/RESOURCES/MOBY-S/Namespaces </p></td>
+ <p> This value is most likely: http://yourDomain:yourPort/authority/RESOURCES/MOBY-S/Namespaces </p></td>
</tr>
</table>
<p> </p>
@@ -362,17 +386,17 @@
<tr>
<td width="25%" align="center" class="text">lsid_authority</td>
<td width="75%" align="left" class="text"><p>Your domain name, as you would like it in </p>
- <p>urn:lsid:<strong>lsid_authority</strong>:namespace:object</p></td>
+ <p>urn:lsid:<strong>lsid_authority</strong>:namespace:object</p></td>
</tr>
<tr>
<td width="25%" align="center" class="text">lsid_namespace</td>
<td width="75%" align="left" class="text"><p>The namespace that you would like service instances to use when resolving LSIDs, e.g.</p>
- <p> urn:lsid:lsid_authority:<strong>namespace</strong>:object</p></td>
+ <p> urn:lsid:lsid_authority:<strong>namespace</strong>:object</p></td>
</tr>
<tr>
<td width="25%" align="center" class="text">resourceURL</td>
<td width="75%" align="left" class="text"><p>The URL that would return the RDF describing the service types registered in your registry.</p>
- <p> This value is most likely: http://yourDomain:yourPort/authority/RESOURCES/MOBY-S/ServiceTypes </p></td>
+ <p> This value is most likely: http://yourDomain:yourPort/authority/RESOURCES/MOBY-S/ServiceTypes </p></td>
</tr>
</table>
<p> </p>
@@ -408,7 +432,7 @@
<p class="update">Note: When setting up the cron job, make sure that MOBY_CENTRAL_CONFIG is visible in the cron's environment. One way of doing this is to do something like the following:<br>
<pre class="code"> * * * * * /bin/su - root -c /path/to/your/service_tester.pl</pre>
</p>
- <span> Of course, you will need to modify the timing of the job, i.e. the <font color="#0000FF"><strong>* * * * *</strong></font> bit!</span></blockquote>
+ <span> Of course, you will need to modify the timing of the job, i.e. the <font color="#0000FF"><strong>* * * * *</strong></font> bit!</span></blockquote>
<ol>
<li>Modify script specific variables (although, the default values should be fine)</li>
</ol>
@@ -429,11 +453,37 @@
</ol>
<p>The user configurable variables for the service tester are listed below with their descriptions. To modify them, open up the file service_tester.pl and change the values to those values you wish to have.</p>
<ul>
- <li><strong>useCache</strong>- Caching is enabled by default and can be toggled by modifying<br>
+ <li><strong>useCache</strong>- Caching is enabled by default and can be toggled by modifying<br>
<span class="script">$useCache [0 => disabled, 1 => enabled]</span><span class="code">. </span><br>
- Caching really speeds up the generation of RDF and is highly recommended.</li>
+ Caching really speeds up the generation of RDF and is highly recommended.</li>
<li><strong>dir</strong> - dir is the cache directory that the script will output cached files into and read from. By default, '<em>/tmp/</em>' is the directory. Please ensure that the web server can read/write into this directory.</li>
</ul>
+ <p class="subtitle"><a name="speed"></a>Making RDF Downloads Faster</p>
+ <p>To speed up downloads of the RDF fles that the RESOURCE script serves, you will need to enable <a href="http://httpd.apache.org/docs/2.0/mod/mod_deflate.html" target="_blank">mod_deflate</a> on your Apache webserver.</p>
+ <p>Of course, the details on how to do this on your system may differ, but in general, the steps involved are:</p>
+ <ol>
+ <li class="dcount">Open your <strong>httpd.conf</strong> file and add the following line:<br>
+ </li>
+ <blockquote> <br>
+ <pre class="code">LoadModule deflate_module path/to/modules/mod_deflate.so</pre>
+ Of course, you will have to update the path/to/modules to reflect where it is that you have mod_deflate.so installed.<span></span></blockquote>
+ <li class="dcount">Append following configuration <strong><Location /></strong> directive:</li>
+
+ <blockquote> <br>
+ <pre class="code">
+<Location />
+
+ # compress only the following mime types
+ AddOutputFilterByType DEFLATE text/html text/plain text/xml application/xml application/rdf+xml
+
+ # Make sure proxies don't deliver the wrong content
+ Header append Vary User-Agent env=!dont-vary
+
+</Location></pre>
+ Feel free to add more mime types.<span></span></blockquote>
+ <li class="dcount">Last, but not least, restart your web server.<br>
+ </li>
+ </ol>
</ul>
</ul>
<a name="testing"></a>
More information about the MOBY-guts
mailing list