Re: Calabash: cache the compiled pipeline

On 17 November 2010 21:29, Norman Walsh wrote:

  Hi,

> Assuming I wanted to make caching compiled pipeline easier in
> V2, what would you suggest?

  From a user point of view, I think all I want is something
similar to the model introduced by JAXP and extended by S9API:
you compile the pipeline to an in-memory representation of the
pipeline, without anything supporting a specific one evaluation
(like the JAXP's Templates, or Saxon's XsltExecutable).

  Then from this compiled pipeline, you get a runtime object, an
object which is based on the compiled pipeline, with in addition
everything needed to its evaluation (like the JAXP's Transformer,
or Saxon's XsltTransformer).  This object cannot be reused, and
cannot be used from within several threads.  Basically you can
only do:

    evaluator = compiled.getEvaluator();
    // here, can set options, inputs, etc.
    evaluator.eval();
    // here, can use output, etc.
    // after, have to throw the evaluator object away

  Whilst the compiled object can be compiled only once then used
by several threads at several times to get different evaluator
objects.

  But I am not going to explain to you how JAXP works :-)

> [1] http://norman.walsh.name/2010/11/11/xprocpipes

  BTW, it seems your server is down...

  Regards,

-- 
Florent Georges
http://fgeorges.org/

Received on Thursday, 18 November 2010 11:04:25 UTC