Point of View

Taverna can display results based on their MIME type eg. Text/Html. That means that T2 will have to do the same. Most of the renderers could be ported across from their T1 equivalents but a few had to be redeveloped due to changes in the data management structure fot T2. Results are now passed by reference and can be “de-referenced” into whatever type you request as long as the Data Manager will allow it. The results can then be viewed by the MIME types associated with them. To allow easy extensibility (or “extension points”) Taverna 1 & 2 use Java Interfaces a lot. These extensions are implemented using the Service Provider Interface (SPI) pattern. This is not a common one and there is not a great deal of info on the web about it. In the Renderers case, anything that wants to be a Renderer must implement the Renderer interface. To find the renderers they must also be registered by writing their full class name (including package) in a file stored in renderers-impl/src/main/resources/META-INF/services/net.sf.taverna.t2.renderers (as you might have guessed, net.sf.taverna.t2.renderers is the package name). The SPI lookup is performed by having a RendererRegistry which does something along the lines of getClass().getClassLoader.getResourceAsStream(“/services/net.sf.taverna.t2.renderers”). The individual class names can then be found from this stream and additional checks (defined in the Renderer interface) can be made on them to see if they support the Mime types you want.

The Installation blues

Two of our users had some problems with R (the stats package) and the server component Rserve. So, figured I should install it on the Mac. Downloaded the binary package from http://cran.r-project.org/bin/macosx/ .All was going well until the package tried to install tcl/tk at which point it failed with a strange message about “could not install some files to /”. Not very helpful. R was OK though but all attempts to get Rserve failed since it needed the tcl/tk stuff (ps. OSX Leopard has X11 be default now) maybe a source install was the best idea. Downloaded the tcl/tk source from http://www.tcl.tk/ and followed the instructions on http://www.tcl.tk/doc/howto/compile.html#unix .Some of the tests failed though and I had no enthusiasm for trying to figure out why (although sunning as sudo helped solve fCmd-9.4 file rename: comprehensive: dir to new name FAILED). The other one was more obscure

==== unixFile-1.7 Tcl_FindExecutable FAILED
==== Contents of test case:

set env(PATH) “:/dummy”
testfindexecutable junk

—- Result was:
—- Result should have been (exact matching):
==== unixFile-1.7 FAILED

Why it should be changing “d” to “D” I have no idea. Anyway, I moved the whole package to my root but still got a failure with

==== exec-9.7 commands returning errors FAILED
==== Contents of test case:

list [catch {exec [interpreter] “$path(sh)” -c “\”$path(echo)\” error msg 1>&2″ | [interpreter] “$path(sh)” -c “\”$path(echo)\” error msg 1>&2″} msg] $msg

—- Result was:
1 {error msg}
—- Result should have been (exact matching):
1 {error msg
error msg}
==== exec-9.7 FAILED

Lost enthusiasm completely by this point and googling didn’t help too much but it gave me the idea (from http://ircarc.com/freenode-tcl/302.html) that perhaps the tcl8.5.1 source wasn’t the way to go. Downloaded 8.4.18 and everyone went well until I got cp: /usr/local/lib/#inst.17465#: Too many levels of symbolic links

For whatever reason /us/local/lib was symlinked to itself. So, I removed that and everthing went well (except for a few tk test errors but I suppose that is to be expected – kind of cool watching all the X11 windows appear and flying around on their own!!).

So, now to install Rserve. The only way I could get it to work was to download Rserve_0.5-0.tar.gz and type sudo R CMD INSTALL Rserve_0.5-0.tar.gz

Sweet, everything sorted. Now, go into R. Type library(Rserve) then Rserve() and there it is running on port 6311.

Nice. I need a rest now (and I haven’t even looked at the bug yet!!)

Update – The Rserve version I installed was too new and uses a different protocol from the Rserve clients in Taverna. Oh well, time to give up I think!