David Legg | 1 Dec 16:35
Picon

Re: [vote] Release Cocoon 3.0.0-alpha-1

Has everyone gone to a party that I don't know about?...  or maybe we're 
all waiting for someone else to vote first ;-)

Regards,
David Legg

Reinhard Pötz wrote:
> Reinhard Pötz wrote:
>   
>> I've prepared the artifacts for the release of Cocoon 3.0.0-alpha-1.
>>
>> You can find the staged files for all modules (sources, binaries,
>> javadocs, checksums, gpg signatures) at
>> http://people.apache.org/builds/cocoon/
>>
>> SVN tags of all these artifacts can be found at
>> http://svn.apache.org/repos/asf/cocoon/cocoon3/tags/
>>
>> The general distribution artifacts (tar, zip) can be found at
>> http://people.apache.org/~reinhard/cocoon-staging/
>>
>> I want to stress again that this is an alpha release. This means that we
>> are free to change contracts without following any deprecation rules.
>>
>> This majority vote stays open for _at least_ 72 hours.
>>     
>
> +1
>
>   
(Continue reading)

Peter Hunsberger | 1 Dec 16:53
Picon
Gravatar

Re: [vote] Release Cocoon 3.0.0-alpha-1

Sorta bad timing for those of us in the US: I haven't had a chance to even glance at the artifacts and I won't until I get caught up from Thanksgiving..

On Mon, Dec 1, 2008 at 9:35 AM, David Legg <david.legg <at> searchevent.co.uk> wrote:
Has everyone gone to a party that I don't know about?...  or maybe we're all waiting for someone else to vote first ;-)

Regards,
David Legg


Reinhard Pötz wrote:
Reinhard Pötz wrote:
 
I've prepared the artifacts for the release of Cocoon 3.0.0-alpha-1.

You can find the staged files for all modules (sources, binaries,
javadocs, checksums, gpg signatures) at
http://people.apache.org/builds/cocoon/

SVN tags of all these artifacts can be found at
http://svn.apache.org/repos/asf/cocoon/cocoon3/tags/

The general distribution artifacts (tar, zip) can be found at
http://people.apache.org/~reinhard/cocoon-staging/

I want to stress again that this is an alpha release. This means that we
are free to change contracts without following any deprecation rules.

This majority vote stays open for _at least_ 72 hours.
   

+1

 



--
Peter Hunsberger
Favicon
Gravatar

[C3] What's the purpose of StatusCodeCollector?

Hello,

The subject says all. I would like to know something about this class and convert this knowledge
into some documentation. Introduction of ThreadLocal always deserves at least a few bits of explanation.

--

-- 
Best regards,
Grzegorz Kossakowski

Favicon
Gravatar

Re: [vote] Release Cocoon 3.0.0-alpha-1

Reinhard Pötz pisze:
> I've prepared the artifacts for the release of Cocoon 3.0.0-alpha-1.
> 
> You can find the staged files for all modules (sources, binaries,
> javadocs, checksums, gpg signatures) at
> http://people.apache.org/builds/cocoon/
> 
> SVN tags of all these artifacts can be found at
> http://svn.apache.org/repos/asf/cocoon/cocoon3/tags/
> 
> The general distribution artifacts (tar, zip) can be found at
> http://people.apache.org/~reinhard/cocoon-staging/
> 
> I want to stress again that this is an alpha release. This means that we
> are free to change contracts without following any deprecation rules.
> 
> This majority vote stays open for _at least_ 72 hours.

Tested already Maven artifacts, and now distribution artifacts. Everything looks fine, here is mine:
+1

--

-- 
Best regards,
Grzegorz Kossakowski

Favicon
Gravatar

Re: [vote] Release Cocoon 3.0.0-alpha-1

David Legg pisze:
> Has everyone gone to a party that I don't know about?...  or maybe we're
> all waiting for someone else to vote first ;-)

I wish it had been a party. ;-)

Some of us are doing freaky-crazy probability theory these days!

Anyway, it would be good if more people could find some time and test this work even briefly. It's
has an alpha status and lots of warnings so it does not have to be perfect.

--

-- 
Grzegorz Kossakowski

David Crossley | 2 Dec 02:39
Picon
Favicon

Re: Where is Cocoon 3 going to?

Simone Tripodi wrote:
> Hi everybody,
> I'm the younger person - in therms of cocoon's experience - who
> recently joined Reinhard and Steven in their enthusiasm about Cocoon3.
> 
> Please let me spend my 0.2??? too, feel free moving this email in the
> spam or trash box :)

Thanks for your comments. Very important.

> Just a prelude: I've never experienced using oldest Cocoon's release,
> but months ago, while I was working on an important OpenID provider
> (for the biggest Italian Telecommunication company), I had the need to
> generate , manipulate, validate, transform and serialize large XML
> data set in various format.
> So I felt the need to use a solid framework able to help me in a quick
> and clear way... so, the miracle happened when I found "accidentally"
> the Reinhard's blog.
> My first word was just a "wow!", so I wrote an email to him. I was
> totally charmed, not only about Cocoon, but above all the
> collaborative way that both Reinhard and Steven demonstrated in
> explaining me how the new Cocoon works, helping me in adopting it in
> the way to resolve my problems and involving me in the development,
> exhorting me in "bombing" the Issue Tracker :)

It would be better if we all heard those explanations
here on the dev list.

> Starting from that time, I've been evangelizing new Pipeline APIs, our
> customer are satisfied by the product we developed on top of them...
> and finally, also some friend of mine started being Cocoon3's users.
> Everybody agree that's a nice framework with - more important - an
> excellent community behind.

Please encourage your collaborators to join us.

-David

> So, in my humble opinion, Cocoon3 has sense to exist. I like it, I
> adore it, it resolved my problems and makes me enthusiastic. Reinhard
> is a great leader, and Steven an excellent guide, and this justifies -
> at least, for me - that Cocoon3's community MUST exist. I'm sure
> there's someone that, like me, one day will need joining this great
> community.
> 
> Best regards, sorry for the spam :)
> Simone

David Crossley | 2 Dec 02:55
Picon
Favicon

Re: Where is Cocoon 3 going to?

Grzegorz Kossakowski wrote:
> Steven Dolg pisze:
> >>
> >> I second this ask. Bombing us with patches that are not discussed here
> >> is what we all want to avoid.
> >>   
> > The number of patches from Simone hardly qualifies for being called
> > "bombing". Actually the issue mentioned has exactly one patch.
> > 
> > Furthermore I doubt every single change needs to be discussed here
> > before it is made.
> > Something as straightforward as "cache the XSLT to avoid parsing it
> > every single time the pipeline is executed" is IMO one of those things
> > that should be obvious to everyone.
> 
> The idea is obvious, the implementation details as we can see are not so obvious.
> 
> > Especially since - as Sylvain pointed out - "this feature has been
> > available in Cocoon for ages".
> 
> Yep, but if the sequence of events had been a little bit different then the patch wouldn't have to
> be rewritten. The idea is not to write detailed plan that is almost comparable with final
> implementation but simple saying "I'm going to implement this and this, using this and this. If
> someone wants to comment. Go ahead."
> 
> A few sentences, right?

I too was concerned when i saw new patches to re-implement
something that Cocoon has already spent years developing.

A little bit of discussion is a good thing. It enables the rest
of the community to feel that they are still in touch with
the direction of the project.

-David

> > Not everyone is fond of reading long emails that sketch a vague picture.
> > A clear description of the problem, a suggested solution and a patch
> > that provides a working implementation is IMO sometimes preferable.
> > Everyone is able to have a look at the jira issues and the posted
> > patch(es) and comment on them just like Sylvain did.
> 
> After studying recent issues on COCOON3 I have to admit that level of discussions has increased
> which makes me happy. There are several reasons why things should be discussed here.
> 
> One of them is that one can grasp what has happened during his offline period.
> 
> As for now let's move on more specific things. I'd like to hear your opinion on functional sitemap,
> Steven!
> 
> -- 
> Grzegorz

Reinhard Pötz | 2 Dec 12:54
Picon
Favicon

[cocoon3] Stax Pipelines


I've had Stax pipelines on my radar for a rather long time because I
think that Stax can simplify the writing of transformers a lot.
I proposed this idea to Alexander Schatten, an assistant professor at
the Vienna University of Technology and he then proposed it to his
students.

A group of four students accepted to work on this as part of their
studies. Steven and I are coaching this group from October to January
and the goal is to support Stax pipeline components in Cocoon 3.

So far the students learned more about Cocoon 3, Sax, Stax and did some
performance comparisons. This week we've entered the phase where the
students have to work on the actual Stax pipeline implementation.

I asked the students to introduce themselves and also to present the
current ideas of how to implement Stax pipelines. So Andreas, Killian,
Michael and Jakob, the floor is yours!

--

-- 
Reinhard Pötz                           Managing Director, {Indoqa} GmbH
                         http://www.indoqa.com/en/people/reinhard.poetz/

Member of the Apache Software Foundation
Apache Cocoon Committer, PMC member                  reinhard <at> apache.org
________________________________________________________________________

Favicon
Gravatar

Re: [cocoon3] Stax Pipelines

Reinhard Pötz pisze:
> I've had Stax pipelines on my radar for a rather long time because I
> think that Stax can simplify the writing of transformers a lot.
> I proposed this idea to Alexander Schatten, an assistant professor at
> the Vienna University of Technology and he then proposed it to his
> students.
> 
> A group of four students accepted to work on this as part of their
> studies. Steven and I are coaching this group from October to January
> and the goal is to support Stax pipeline components in Cocoon 3.
> 
> So far the students learned more about Cocoon 3, Sax, Stax and did some
> performance comparisons. This week we've entered the phase where the
> students have to work on the actual Stax pipeline implementation.
> 
> I asked the students to introduce themselves and also to present the
> current ideas of how to implement Stax pipelines. So Andreas, Killian,
> Michael and Jakob, the floor is yours!

Wow, what a surprise, Reinhard!

I won't comment on actual proposal until I hear some details from the research that students have
made but I would like to say "Thank you" to all people involved into this effort.

It's nice to hear that there will be more students involved in Cocoon!

--

-- 
Best regards,
Grzegorz Kossakowski

Sylvain Wallez | 2 Dec 17:16
Picon
Favicon

Re: [cocoon3] Stax Pipelines

Reinhard Pötz wrote:
> I've had Stax pipelines on my radar for a rather long time because I
> think that Stax can simplify the writing of transformers a lot.
> I proposed this idea to Alexander Schatten, an assistant professor at
> the Vienna University of Technology and he then proposed it to his
> students.
>
> A group of four students accepted to work on this as part of their
> studies. Steven and I are coaching this group from October to January
> and the goal is to support Stax pipeline components in Cocoon 3.
>
> So far the students learned more about Cocoon 3, Sax, Stax and did some
> performance comparisons. This week we've entered the phase where the
> students have to work on the actual Stax pipeline implementation.
>
> I asked the students to introduce themselves and also to present the
> current ideas of how to implement Stax pipelines. So Andreas, Killian,
> Michael and Jakob, the floor is yours!
>   

I have spent some cycles on this subject and came to the surprising 
conclusion that writing Stax _pipelines_ is actually rather complex.

A Stax transformer pulls events from the previous component in the 
pipeline, which removes the need for the complex state machinery often 
needed for SAX (push) transformers by transforming it in a simple 
function call stack and local variables. This is the main interest of 
Stax vs SAX.

But how does a transformer expose its result to the next component in 
the chain so that this next component can also pull events in the Stax 
style?

When it produces an event, a Stax transformer should put this event 
somewhere so that it can be pulled and processed by the next component. 
But pulling also means the transformer does not suspend its execution 
since it continues pulling events from the previous component. This is 
actually reflected in the Stax API which provides a pull-based 
XMLStreamReader, but only a very SAX-like XMLStreamWriter.

So a Stax transformer is actually a pull input / push output component.

To allow the next component in the pipeline to be also push-based, there 
are 3 solutions (at least this is what I came up with) :

Buffering
---------
The XMLStreamWriter where the transformer writes to buffers all events 
in a data structure similar to our XMLByteStreamCompiler, that can be 
used as a XMLStreamReader by the next component in the chain. The 
pipeline object then has to call some execute() method on every 
component in the pipeline in sequence, after having provided them with 
the proper buffer-based reader and writer.

Execution is single-threaded, which fits well with all the non 
threadsafe classes and threadlocals we usually have in web applications, 
but requires buffering and thus somehow defeats the purpose of 
stream-based processing and can be simply not possible to process large 
documents.

Note however that because it is single-threaded, we can work with two 
buffers (one for input, one for output) that are reused whatever the 
number of components in the pipeline.

Multithreading
--------------
Each component of the pipeline runs in a separate thread, and writes its 
output into an event queue that is consumed asynchronously by the next 
component in the pipeline. The event queue is presented as an 
XMLStreamReader to the next component.

This approach requires very little buffering (and we can even have an 
upper bound on the event queue size). It also uses nicely the parallel 
proccessing capabilities of multi-core CPUs, although in web apps the 
parallelism is also handled by concurrent http requests. This is 
typically the approach that would be used with Erlang or Scala actors.

Multithreading has some issues though, since the servlet API more or 
less implies that a single thread processes the request and we may have 
some concurrency issues. Web app developers also take single threading 
as a basic assumption and use threadlocals here and there.

This approach also prevents the reuse of char[] buffers as is usually 
done by XML parsers since events are processed asychronously. All char[] 
have to be copied, but this is a minor issue.

Continuations
-------------
When a transformer sends an event to the next component in the chain, 
its execution is suspended and captured in a continuation. The 
continuation of the next pipeline component is resumed until it has 
consumed the event. We then switch back to the current component until 
it produces an event, etc, etc.

This approach is single-threaded and so avoids the concurrency issues 
mentioned above, and also avoids buffering. But there is certainly a 
high overhead with the large number of continuation capturing/resuming. 
This number can be reduced though is we have some level of buffering to 
allow processing of several events in one capture/resume cycle.

It also requires all the bytecode of transfomers to be instrumented for 
continuations, which in itself adds quite some memory and processing 
overhead. Torsten also posted on this subject quite long ago [1].

Conclusion
----------
All things considered, I came to the conclusion that a full Stax 
pipeline either requires buffering to be reliable (but we're no more 
streaming), or requires very careful inspection of all components for 
multi-threading issues.

So in the end, Stax probably has to be considered as a helper _inside_ a 
component to ease processing : buffer all SAX input, then pull the 
received events to avoid complex state automata.

Looks like I'm in a "long mail" period and I hope I haven't lost anybody 
here :-)

So, what do you think?

Sylvain

[1] http://vafer.org/blog/20060807003609

--

-- 
Sylvain Wallez - http://bluxte.net


Gmane