[Swift-devel] external datasets

Ben Clifford benc at hawaga.org.uk
Tue May 27 17:46:24 CDT 2008


Someone (that I don't remember - probably mike (wilde) or mihael) 
requested (in person) a way of expressing dependencies between procedures 
that doesn't involve making a dummy data file.

I have a prototype implementation that lets you do this. An example is 
below. There is a new type called "external". Variables of "external" type 
are not mapped to any file, but they participate in dependency ordering 
with an external value acting as if it has been assigned when it is 
returned from a procedure.

Running the below code will cause echo to run, and then ls to run only 
when echo has finished.

The name "external" comes from a conceptualisation of this as representing 
some data that is stored externally to Swift - instead of being mapped 
with a mapping expression, with Swift handling stage-in and stage-out etc, 
the data is external and its up to your apps to deal with access to 
whatever the data is.

Be cautious using this in the presence of retries, replication, and 
restarts (the 3 Rs?) - Swift won't provide any of the handling for 
external data that it provides for output files.

(external db) first() {
app {
  echo;
}
}

second(external db) {
app {
  ls;
}
}

external o;

second(o);
o=first();

-- 



More information about the Swift-devel mailing list