full text of my project turn-in. pretty sad, actually. i’m not happy with the professor that he would give us an option to do a report on a piece of software that’s basically non-functional. granted i did put off doing the project until the last week, but still …

TIMBER: When a good idea goes bad

Introduction

TIMBER, which stands for “Tree-structured native XML database Implemented at the University of Michigan by Bright Energetic Researchersâ€?, seems to be a great idea in itself. The BER portion of the project, (the self-styled as the ‘bright energetic researchers’) at the Big House in Ann Arbor intend the TIMBER project to be a way of addressing some of the issues of XML data in the real world. Their idea is that because XML has become so ubiquitous, mapping XML data to relational tables and databases has outgrown it’s intended use, becoming a performance and logistical hindrance. What follows is my experience with TIMBER, and the multitude of issues I had setting it up on my system.

Project Intentions

The intention was to complete a few small web applications for the project that were web-accessible, to allow my professor to view them from any computer with internet access. I would further make the application impressive by using AJAX (Asynchronous JavaScript and XML), which I had some limited experience with through my personal web site.

I had setup Apache Web Server and Tomcat in the past, so this shouldn’t have been a problem. The Apache Axis project, however, is in beta, and rightfully so. The documentation for Windows installations is sparse, and only after tinkering with the project files for 2 hours did I manage to get the Apache modules loaded.

Through some Googling, I found multiple free XML databases available to play with (http://www.ibiblio.org/xml/examples/). I was excited, and had a few ideas for what I could do with the data. One was a listing of all the elements in the periodic table of elements. Listing, sorting, and displaying these elements graphically using PHP and TIMBER would be my first conquest. Next would be something corresponding to an XML-tagged version of Shakespeare’s Hamlet.

So, I continued to work to get a working copy of TIMBER on my system.

Step 1: Compile the binaries

Easy, right? First we navigate to http://www.eecs.umich.edu/db/timber/, and fill out the same form over and over again every time we want to download the ‘project’. 3 downloads and a quick scan of the readme file on the site, and I’m in business. Wait a minute, according to the documentation, I can’t compile the project with the free version of Microsoft’s compiler (VS Express, at http://msdn.microsoft.com/vstudio/express/&e=15059) due to what the project members call a ‘bug’. The only bug here is that Visual Studio Express doesn’t include all of the libraries necessary for the project installs. So I spent about an hour and a half copying and pasting various DLLs and Header files from the web that the compiler was complaining about. Finally I realized that this was going nowhere, so I gave up for the night (it was 1:30am and I had to work the next day).

So, I’m either stuck with purchasing Visual Studio, or in my case, digging out the Visual Studio .Net Academic version I happened to pick up a few years ago at a Microsoft propaganda event. Anyone else would have been out of luck at this point, because platform specific binaries on the TIMBER page are non-existant.

The next day during lunch, I completed the installation of Visual Studio .Net Academic version on my laptop and compiled the project successfully. Finally, something had gone right. I left the testing of the actual application until later, when I had more free time.

The next day was Friday, and I planned to leave work early so I could spend the remainder of the day on finishing my project. 2PM rolled around and I left work to head for home and dive into completing the project.

Step 2: Setup a SOAP server using Apache Web Server and Axis

I won’t even go into the problems I had with setting up Apache Axis (still in beta, by the way). A 2 hour ordeal later, I was finally able to load the needed modules into the Apache web server. My limited understanding of SOAP (Small Object Access Protocol) thus far is that SOAP is akin to RPC, whereas a client submits a particular request for data, and the server completes a function and returns the results of that request.

A SOAP server uses configuration files called wsdl’s, which stands for Web Service Description Language. These files are basically XML data that describe the server application that will handle the SOAP request, along with all of the operations and how the application will respond to them.

The following are some examples, from the TIMBER project:






Service definition of function s0__switchDevice



gSOAP 2.1.9 generated service definition

It seems the Axis module will read the WSDL, and make the described services and operations available to clients that request them through the web server. Along with PHP, this setup was intended to provide the basis of my applications.

With the SOAP server setup, the next step was to ensure that Timber was working correctly. So I copied over the binaries I had compiled on my laptop.

Step 3: Ensure compiled binaries work as intended

Opening up a command prompt console on Windows (start->run->cmd), I entered the TIMBER directory. The first command I tried was “timber -m load -r 1 -d .allelements.xml�, assuming that it would load the periodic table of elements and allow me to perform queries on the data. What I was greeted with, instead, was a crash report and a statement of how Microsoft was “sorry for the inconvenience�. I bet. I had heard another student in our CIS556 course had issues with loading anything BUT the sample XML files from the TIMBER site, so I proceeded to download those hoping for some success. Not a chance, TIMBER still crashed.

< -- screenshot not included, but it was ugly. At this point, I was just hoping that TimberSoap would work, so I could continue developing my little web application. No luck there, either. <-- screenshot not included, but it was ugly. At this point I became disgusted with the TIMBER project. Nothing seemed to work, so I began to research other native XML databases. One that caught my eye originally was named eXist; it had shown up in the original Google results when I was searching for the TIMBER home page. eXist has a much more polished install process, and actually includes a built-in implementation of the Apache Axis project when it is installed on an Apache Tomcat server. This was the way to go, I thought. Step 4: Give up on TIMBER and use eXist instead

Apache Tomcat has a very straight forward method of deploying web applications, and the developers of eXist had enough sense to create a WAR file for Tomcat. Deploying eXist was incredibly easy, and much more fulfilling than spending hours trying to compile a project that ended up crashing in the end. eXist is available at http://exist.sourceforge.net.

I wasn’t able to setup a SOAP call no matter what library I tried to use (see references for PHP SOAP wrapper link), so my initial plans of creating the periodic table of elements from a simple XML file using PHP never came to fruition. However, I was able to perform some sample queries in XQuery format through the example page.

The results of my 2 day setup ordeal are available at >URL FOR MY HOME COMPUTER<. Sample applications

http://cis556.dyndns.org/exist/sandbox/sandbox.xql is a sample application that supports XQuery format queries of databases loaded into eXist. Some interesting queries here include querying the Mondial world statistics database for information such as population, birth rate, and cities.

Sample query 1: Returns all countries with population growths less than zero

for $c in //country[population_growth < 0] order by $c/name return
{$c/name, $c/population_growth}

Sample query 2: Returns all Hungarian provinces and their cities

xquery version "1.0";
(: This script accesses the mondial database, which can be
found at http://dbis.informatik.uni-goettingen.de/Mondial/ :)

let $country := /mondial/country[name = 'Hungary']
for $province in $country/province
order by $province/name
return {$province/name}
{
for $city in $country//city[@province=$province/@id]
order by $city/name
return $city
}

Sample query 3: Simple full-text query on Shakespeare plays (searches all included Shakespeare plays for the requested search term in single quotes)

For some reason, changing both $speech variables to $line do not return the intended result. The single line including the search term is not returned, however the entire “SPEECH� section is.

for $speech in //SPEECH[LINE &= 'fame']
return $speech

Result:


HAMLET I'll be with you straight go a little before. Exeunt all except HAMLET unqualifying result... That, for a fantasy and trick of fame, unqualifying result...

2

KING CLAUDIUS unqualifying result... And set a double varnish on the fame unqualifying result...

Conclusions

With the University of Michigan – Dearborn as my Bachelor alma mater, as well as being currently enrolled in the Master’s program for Computer and Information Science there, I had always looked up to the “Big Houseâ€? and their programming projects. However, I was sorely disappointed with TIMBER. eXist seems a much more robust and useful application, simply from the fact that the install procedures, documentation, and examples on syntax and usage are much more involved than that of TIMBER.

For TIMBER to become a viable project, and not simply a set of publications and theory, much more development will be required. In the real world, time is money, and successful projects are a balanced combination of quick results and quality. TIMBER does not provide anything near quick results, and is frustrating to set up.

References

Mondial Global Statistics XML database. Available via WWW at http://www.dbis.informatik.uni-goettingen.de/Mondial/gs.xml.

TIMBER Project Home Page. Available via WWW at http://www.eecs.umich.edu/db/timber/&e=15059.

DynDNS Service for virtual domain name. Available via WWW at http://www.dyndns.com/.

Apache Tomcat Home Page. Available via WWW at http://tomcat.apache.org/.

eXist Native XML Database. Available via WWW at http://exist.sourceforge.net/.