|
Generated: Sun Oct 7 15:19:11 BST 2007 | ||||||||
PREV NEXT | FRAMES NO FRAMES |
See:
Description
Packages | |
---|---|
org.embl.ebi.analysis | |
org.embl.ebi.SoaplabServer.gowlab | |
org.embl.ebi.SoaplabShare |
An interface to a Web Service accessing and controlling an analysis (an analysis is a remote program, mostly a command-line program).
The main interface is AnalysisWS
. A supplementary interface AnalysisFactoryWS
should
be replaced in the real and ready word by some discovery (naming,
trading) service.
Additionally, for the Gowlab sub-project, there are plug-in interfaces
RunPlugIn
and
DataAdaptPlugIn
. Usage
of both these interfaces are described more detailed in Gowlab plug-ins. There are also
several basic implementations of RunPlugIn inteface:
RunPlugInDefaultImpl
fetches data from a remote web resource
RunPlugInXSLTImpl
fetches data and converts them by an XSLT stylesheet
RunPlugInExternalImpl
lets an exteranl program/script to fetch data
jobID = createJob (inputs); // create a job with input data run (jobID); // execute the job waitFor (jobID); // wait for its completion results = getResults (jobID); // retrieve resulting dataAdvantages: Input data validation can be done long before the job starts; full notification schema is available; full details, what is happening with the job, are available.
jobID = createAndRun (inputs); // create a job and start it waitFor (jobID); // wait for its completion results = getResults (jobID); // retrieve resulting dataAdvantages: Less stressing on the service implementation; "server-push" notification and full details about running job are still available.
results = runAndWaitFor (inputs); // create job, start it, wait for resultsAdvantages: Easy service implementation (but not necessarily less resource consuming because it needs very threaded service implementation - individual threads may last long).
Notification negotiation and notification channels
A running job changes its state and the user may be interested in
being notified about these changes. A prominent change in the job
life-cycle is, of course, when the job terminates (either by an
error or by the user request). The AnalysisWS
interface provides two ways how to pass information about job changes to the clients:
method AnalysisWS.getLastEvent(java.lang.String)
,
or using a notification channel.
The method AnalysisWS.getLastEvent(java.lang.String)
must be invoked by the client, and
it informs about the latest job status or job status change.
The notification channel is more complex (and more powerful) way. However, the implementation may decide not to provide it at all. It uses another service to transport event messages (which may involve things like setting an expiration time, secure channels, or postponed and re-tried deliveries etc.). All you need to know about a notification channel is defined in a channel descriptor (an XML string whose DTD yet to be defined). There are the following ways how to get and use notification channels:
jobID = createJob (inputs); channelDescriptor = getNotificationDescriptor (jobID); // use the 'channelDescriptor' (if it is not empty): // subscribe itself to it // (which may include starting a separate thread waiting // for server-push calls, or starting your own polling thread) run (jobID); ...
runNotifiable (jobID, myDescriptor)
or
createAndRunNotifiable (inputs, myDescriptor)
:
jobID = createJob (inputs); run (jobID, myChannelDescriptor);The server may refuse to use the suggested notification channel (e.g. if it does not understand the notification protocol defined in the channel descriptor).
The events are expressed as short XML strings. The
DTD
describing the events is simple and extendible in order to
include provider-specific events. Here are some examples of
various events:
Events describing running analyses
The chapter above described how to exchange messages.
This chapter tells what is being exchanged - it is about
the contents of the event messages.
Defining exceptions
Any Web Service call can raise an exception (fault). They can be
defined by the fault code, fault string, fault actor and fault
details. This interface will use the following rules to deliver
details about any exception:
Overview
Package
Class
Use
Tree
Index
Help
Generated: Sun Oct 7 15:19:11 BST 2007
PREV
NEXT
FRAMES
NO FRAMES
Submit a bug or feature
Generated: Sun Oct 7 15:19:11 BST 2007