Prompted by a comment from Mike Fischer at Yale, we are discussing whether sites calls should be allowed to publish multiple values, and how that might be implemented.


  • It is not difficult to extend the Orc semantics to support this. With the introduction of the otherwise combinator, we allow a site to respond negatively to a call. Previously, a dialogue with a site had an implicit end-marker after the first response was received, since only one response was expected. Now, we can use the negative response as an end-marker, allowing a site to return many values over time and then indicate at some point that there will be no more values using this negative response. This means that it is no longer difficult to represent multiple returns in the Orc semantics.
  • It is not difficult to extend the Orc implementation to support this. When a site call produces a response, rather than returning the call token it was given, it instead returns a copy of the call token. When it is known that no more values will be available, that call token is explicitly killed.


  • Even in expressions which don't call recursive definitions, the number of published values would no longer be apparent from the expression's lexical structure.
  • Certain idioms such as timeout would no longer be guaranteed to work with all sites, but only with the subclass of sites publishing exactly one value.
  • It violates the philosophy that sites are passive entities under the control of the Orchestration. This could have security implications, for example a site could cause a careless Orc program to run out of resources by returning more values than it anticipated.
  • The change is unnecessary, since Orc can always poll a site, e.g. using repeat. Mike Fisher suggested that this would necessarily be less efficient than a single-connection push solution. However that is not the case; the local end of the site can still implement a push protocol with a buffer while presenting a pull interface to the Orc programmer (Orc would essentially do this automatically if multiple returns were allowed).

Add new attachment

Only authorized users are allowed to upload new attachments.
« This page (revision-5) was last changed on 06-May-2009 16:56 by AdrianQuark