You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@taverna.apache.org by Bill Smith <Bi...@appliedproteomics.com> on 2015/02/12 03:14:09 UTC

Taverna workflows as web services

Hi,

The FAQ says that that there is no standard way to run a workflow as a web service, but elsewhere I find documentation on REST and SOAP interfaces, and these interfaces seem to underly the Web Demonstrator.  I can’t seem to find other examples, however, or comprehensive documentation.

Can anyone give me the complete picture and, I hope, links to some code that I can work through?

Thanks,
Bill

Re: Taverna workflows as web services

Posted by "Donal K. Fellows" <do...@manchester.ac.uk>.
On 12/02/2015 02:14, Bill Smith wrote:
> The FAQ says that that there is no standard way to run a workflow as
> a web service, but elsewhere I find documentation on REST and SOAP
> interfaces, and these interfaces seem to underly the Web
> Demonstrator.  I can’t seem to find other examples, however, or
> comprehensive documentation.
>
> Can anyone give me the complete picture and, I hope, links to some
> code that I can work through?

There's no standard way, but there are some very common patterns. :-)

Almost all workflows of any interest take an appreciable amount of time 
to execute, and so are not processed in their entirety during a single 
web service call. Instead, they almost universally use one of the 
asynchronous service patterns. At a very high level, these are:

   1. Notify on Termination

     Send the work together with a service address that will have a
     message sent to it when the work has finished processing.

   2. Poll for Termination

     Send the work and immediately receive a token that may be used to
     check on the status of the processing (including whether it is
     done).

Naturally, these are not incompatible with each other; a particular 
service might support both. However, the first pattern is most common in 
server-to-server processing, and the second is most common in 
client-server processing.

The translation of these high-level concepts into low-level ones is 
something else. There's no standard at all for what the actual messages 
on the wire (whether SOAP or REST) look like. There are standards in 
some subject domains (e.g., WPS in the geospatial domain, BES for grid 
computing) but they're incompatible with each other and there's no 
general solution. (In particular, notification messages vary a lot and 
are problematic for client code anyway due to common firewall policies, 
and polling responses have nearly infinite variation.)

Let's veer more on topic for this list. :-D

Taverna Server implements the second model above. The Taverna workflow 
model (as embodied in Taverna workflows) does not select any of the 
models, or any particular implementation, but can interact with any of 
them; it supports marking a sub-workflow as having a repetition 
condition based on an output of that sub-workflow, which makes doing 
polling pretty easy. This means that Taverna workflows (which you can 
run by various mechanisms) can invoke these various asynchronous services.

Yes, you can have workflows that run workflows remotely. I've done that. 
It's easy.

We can do some examples, but you'll need to be more specific about what 
you're talking about. The solutions here are all highly domain specific.

Donal.

Re: Taverna workflows as web services

Posted by Stian Soiland-Reyes <st...@apache.org>.
Hi, I think the FAQ is slightly misleading.

What kind of web service did you want to expose?

There is no standard way to generate a web service that executes a fixed
workflow every time. (E.g. which WSDL input parameters match the workflow
inputs).  If you want this, you can develop a  web service that simply
invokes the Taverna Command Line with a fixed workflow under the hood.
There are multiple frameworks that makes wrapping a command line easy, with
varying degree of smoothness (e.g. some just gives you inputs arg1, arg2,
results as STDOUT)

There is however the Taverna Server which provides general REST and SOAP
interfaces for running any Taverna workflow.

http://www.taverna.org.uk/download/server/2-5/

http://dev.mygrid.org.uk/wiki/display/tav250/Taverna+Server+2.5

Taverna Server is using an asynchronous job pattern, so you upload a
workflow (if it is not already there), upload and set data inputs, start
the job, check its status, and then finally retrieve workflow outputs,
provenance and logs.

You can configure security on the Server to restrict user and/or workflows.
This is  important, as letting anyone run anything is basically a login
shell giveaway. :-)

The server can be used with the Taverna Player to generate a web interface
for running a fixed list of workflows. This can include support for
interactions through the browser.

http://www.taverna.org.uk/documentation/taverna-2-x/taverna-player/

For example of how customized this can be made, see the BioVel portal:

https://portal.biovel.eu
On 12 Feb 2015 09:07, "Bill Smith" <Bi...@appliedproteomics.com> wrote:

> Hi,
>
> The FAQ says that that there is no standard way to run a workflow as a web
> service, but elsewhere I find documentation on REST and SOAP interfaces,
> and these interfaces seem to underly the Web Demonstrator.  I can’t seem to
> find other examples, however, or comprehensive documentation.
>
> Can anyone give me the complete picture and, I hope, links to some code
> that I can work through?
>
> Thanks,
> Bill
>