[ESTEST] Topic #11 - Transitioning to eXist-db 2.0

14 views
Skip to first unread message

Team ESTEST

unread,
Mar 13, 2012, 5:30:23 PM3/13/12
to estes...@gmail.com
Topic #11 - Transitioning to eXist-db 2.0
----------------------------------------------------------------------------
Author: yuangm
Created: 03/13/12 14:30:22
Moderators: fgygiyuangm
----------------------------------------------------------------------------

The eXist-db 2.0 (Tech Preview) is upon us, so lets talk about what this means for ESTEST software. First, this post is NOT a migration tutorial; issues with importing backups made from an eXist-db 1.4.x distribution to the new 2.0 version have yet to be resolved. This does not mean that eXist-db 2.0 cannot be used with the newest version of ESTEST >= 1.4.x--you can still setup a new ESTEST server with eXist-db 2.0. There are, however, a few changes that server administrators should be aware of with the eXist-db 2.0 distribution.

1. eXist-db 2.0 does not support soft links to XQuery scripts in /webapp where previously we installed the /webapp/estest XQuery scripts. Two solutions for this problem. You can replace the soft links with the script files themselves. Alternatively (and recommended) the XQuery scripts can be executed directly from the REST servlet in eXist-db by installing the script directly to the database. This operation is encapsulated in the GMake command
{{{
$ make xrest
}}}
For the ESTEST server to use the REST servlet paths you must also change the Apache configuration for these aliases
{{{
ProxyRequests Off

<Proxy *>
Order deny,allow
Allow from all
</Proxy>

ProxyPass /exist http://localhost:8080/exist/rest/db
ProxyPassReverse /exist http://localhost:8080/exist/rest/db

Redirect /estest-plugins /exist/estest/plugins
}}}

2. eXist-db 2.0 has overhauled document permissions to be inline with those of *NIX operating systems. Instead of the older read, write, update `rwu` permissions, the 2.0 distribution uses the permissions read, write, execute. Basically this means that the update permission has been absorbed into the write permission and an execute permission has been added in its place. The execute permission is important to add to collections (directories) to allow access to them as well as to XQuery scripts to allow their execution. Most collections in eXist-db created by ESTEST will take into account which version of eXist-db is being used and set permissions accordingly.

3. Changes to the XML-RPC API. The XML-RPC servlet in eXist-db 2.0 does not support the function call `getUsers()`. Also the 2.0 servlet implements the functions `getVersion()`, `addGroup(string)`, and `removeGroup(string)`. A test for which version of eXist-db is running with XML-RPC and Python is captured by the following code snippet. The parameter `localeXist` is the server proxy returned by calling the `xmlrpclib` library.
{{{
def getVersion(localeXist):
version = "1."
try:
v=localeXist.getVersion()
if v[0:2]=="2.":
version="2."
except:
pass

return version
}}}

--
Topic URL: <http://estest.ucdavis.edu/trac/discussion/topic/11>
ESTEST <http://estest.ucdavis.edu>
Validation and verification for electronic structure tools

Reply all
Reply to author
Forward
0 new messages