On Sat, Jun 20, 2009 at 01:04, Jan Hidders<[email protected]> wrote:
>> An iteration cannot start before all the control links are satisfied
>> AND all the input ports have received a value for that iteration.
> Just to be clear: when you say "have received a value" do you mean
> that they have received a complete value, or that they have received
> it partially for at least one index?
Received *completely* for at least one index, and that would be the
index that would be started. You can't have a partial start - for
instance a WSDL service can't start with only 2 of 3 parameters ready,
there's no way we can tell the web-service later that 'Ohh.. and the
third parameter is Fish' while it's in the middle of it's
calculations. :)
(Note that the Parallelize layer in the dispatch stack akes care of
not starting more jobs than the maximum number of threads, so even if
5 indexes are ready, if maxThreads is 2, only 2 of those would be
started)
> So when exactly is the empty index returned? Is this after each
> iteration has produced its complete output, or after each iteration
> has completed all its activities?
After each iteration has produced its complete output. It is true that
if the activity is a nested workflow, that nested workflow might still
be running even if all the values for the output ports have been
produced, but I believe we could consider that a bug. Not totally sure
about that, but all other activity types are 'finished' once they have
returned values. (Asynchronous services are different as they
continue running server-side, but you would then have other methods in
to check the status and get the results)
> Do you just mean to say here that all output ports always produce
> values, or are you talking about synchronization here, i.e., they
> produce it more or less at the same moment?
They would all produce values, and the values would come at exactly
the same moment - the values are returned in a Map that flows up the
dispatch stack - at the top of which the Processor will disassemble it
and send it out on the individual processor output ports.
The implementation of the nested workflow activity has a result
listener that listens to the output ports, when the results received
there are of the empty index [], they are added to this map. Once all
output ports have output their [] data, it returns this map to the
dispatch stack - If we mean to enforce the 'Data returned means we're
finished' rule, this is where we would have to also check for if there
are any other processors still running.
Note that there's nothing enforcing a full stop of the activity, we
don't have a VM within the JVM, for instance you could make a
beanshell script that does something like:@
t = new Thread() {
public void run() {
while(true) {
System.out.println("Still alive!");
Thread.sleep(250);
}
}
};
t.start();
- the thread would keep running, even if the beanshell activity itself
is 'finished'.
--
Stian Soiland-Reyes, myGrid team
School of Computer Science
The University of Manchester
------------------------------------------------------------------------------
Are you an open source citizen? Join us for the Open Source Bridge conference!
Portland, OR, June 17-19. Two days of sessions, one day of unconference: $250.
Need another reason to go? 24-hour hacker lounge. Register today!
http://ad.doubleclick.net/clk;215844324;13503038;v?http://opensourcebridge.org
_______________________________________________
taverna-hackers mailing list
[email protected]
Web site: http://www.taverna.org.uk
Mailing lists: http://www.taverna.org.uk/taverna-mailing-lists/
Developers Guide: http://www.mygrid.org.uk/tools/developer-information