cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefano Mazzocchi <stef...@apache.org>
Subject Re: [control flow] changes and new sample
Date Fri, 20 Sep 2002 09:15:26 GMT
Christian Haul wrote:
> 
> On 10.Sep.2002 -- 11:19 AM, Stefano Mazzocchi wrote:
> 
> > This said, I'm entirely in favor of making it as simple as possible to
> > call actions from the flow layer or viceversa (even if I don't know
> > how). Just understand that in order to have continuations, we need an
> > interpretation layer on top of the JVM. This is a fact. So we can't
> > simply attach continuations to actions and forget about the flow.
> 
> (I'm still on the road and will need to read this thread again in more
> detail next week. Damn why are the interesting parts always discussed when
> I'm offline?!)

The murphy law of email discussions :)

> Stefano, you can call your action from flow as simple as
> 
>    result = act("action-name", { "foo" : value, "bar" : value2 });
> 
> and result will contain all the values that would be available
> when this was part of the sitemap
> 
>   <act type="action-name">
>      <map:parameter name="foo" value="{value}"/>
>      <map:parameter name="bar" value="{value2}"/>
>      <!-- result contains sitemap parameters set by action -->
>   </act>

My point was different: Ivelin pointed out several times that, in his
opinion, it's a mistake (or at least, a waste of effort) to have such a
fundamental part of cocoon written using a scripting language.

I noted that in order to have continuations, we needed *something* in
between the flow layer and the JVM, since it doesn't offer
continuations.

This *something* can be either:

 - an interpretation layer (as we have today)
 - an instrumentation layer (as Brakes) [this could be based on bytecode
rewriting or source code rewriting]

Both have severe performance penalties compared to regularly executed
bytecode, but since the flow layer should not contain any business logic
(where we could suppose the heavy operations reside), I personally think
that the tradeoff between performance and ease of use (due to
continuations) makes the deal interesting.

It is true, that using Brakes, we could instrument the actions bytecode
to be 'continuation-aware', but are we sure we want that?

-- 
Stefano Mazzocchi                               <stefano@apache.org>
--------------------------------------------------------------------



---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Mime
View raw message