W3C home > Mailing lists > Public > public-xml-processing-model-wg@w3.org > April 2006

Re: A side-effect example

From: Alessandro Vernet <avernet@orbeon.com>
Date: Wed, 26 Apr 2006 16:21:18 -0700
Message-ID: <4828ceec0604261621v73ee74d2j6c4b248db8578676@mail.gmail.com>
To: public-xml-processing-model-wg@w3.org

On 4/26/06, Norman Walsh <Norman.Walsh@sun.com> wrote:
> Indeed. That's the sort of reasoning that lead me to make the proposal
> that I made in response to Alex M.:
>
> We've had two telcons of discussion about how to expose this
> information and we don't seem to be approaching consensus, so let's
> try a new approach.
>
> I propose that we say that all components are non-functional. That is,
> a pipeline implementation must behave as if it evaluated a component
> every time it occurs [in the context of this message, everytime it is
> used in a step]. "Must behave as if" is spec-ease for "implementations
> that are clever enough to determine with certainty that a component
> is, in fact, functional are free to cache the intermediate results
> because by golly if it is, no one will be able to tell."
>
> Pipeline authors who are concerned about controlling the number of
> times a component is executed can use the 'tee' component to split
> output and thereby be confident that it will be evaluated only once.

Norm,

I wholeheartedly agree with this.

I am not sure however how we want to define the notion of "no one will
be able to tell". Say you have a component "get-url" that retrieves a
document from a URL, and that you write a pipeline with two steps:

d1 = get-url("http://feeds.feedburner.com/xml-web-apps")
d2 = get-url("http://feeds.feedburner.com/xml-web-apps")

When d1 is read, the whole XML document is pulled down from the
server. When the second step runs, it might be reasonable to sent an
HTTP request with the "If-Modified-Since" header, to which the server
might reply with "HTTP/1.1 304 Not Modified". So in fact, someone
monitoring the HTTP traffic will be able to tell the difference.

Alex
--
Blog (XML, Web apps, Open Source):
http://www.orbeon.com/blog/
Received on Wednesday, 26 April 2006 23:21:28 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 8 January 2008 14:21:47 GMT