You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Reinhard Poetz <re...@apache.org> on 2007/11/05 08:37:17 UTC
Re: [cocoon-2.2] Deprecation
Reinhard Poetz wrote:
> Vadim Gritsenko wrote:
>> Grzegorz Kossakowski wrote:
>>> Vadim, have you seen our whiteboard with the list of things people
>>> have been wondering about when it
>>> came to deprecation?
>>
>> Seen it but I would not be able to recall it.
>>
>> I remember though that it was acknowledged that some of the stuff
>> written on the sheet of deprecated things really had no substitutes or
>> migration path towards 'new stuff'. Which only means that either it
>> was on the list by mistake or because 'new stuff' is half baked at the
>> moment.
>
> I think that you refer to the idea of deprecating sub-sitemaps which
> isn't an as good idea as it seemed from a quick glance because there is
> no equivalent to get the same functionality if you have to replace it
> with servlet-services and Spring AOP. Hence I won't suggest sub-sitemaps
> for deprecation.
>
> IIRC it wasn't the functionality of <map:mount> that made some people
> think that we should deprecate sub sitemaps but the <map:components>
> part of sitemaps which causes a lot of complicated code that we have to
> maintain. However, deprecating <map:components> shouldn't be a problem
> because there already exists a migration path of putting your component
> definitions into META-INF/cocoon/spring or META-INF/cocoon/avalon.
>
> The second "big thing" for deprecation that we discussed in Rome was
> the cocoon:/ protocol and the the servlet:/ protocol instead. AFAIU the
> servlet:/ protocol doesn't provide all the "features" of the cocoon:/
> protocol but that's mostly caused by getting rid of side-effects.
>
> Can somebody who knows the code and the functionality of
> <map:components> and cocoon:/ in more detail than me comment on this?
>
> - o -
>
> I think we should discuss these two big topics first and then we can
> continue with smaller things like the SimpleFormsTransformer, obsolete
> input modules, etc. I hope that I find some time soon to write a summary
> that contains a list with all those components.
>
> P.S. to Vadim: Of course we will give you a chance to comment on this :-)
More thoughts? Carsten, Daniel, Grek, ...?
--
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, PMC Chair reinhard@apache.org
_________________________________________________________________________
Re: [cocoon-2.2] Deprecation
Posted by Grzegorz Kossakowski <gk...@apache.org>.
Carsten Ziegeler pisze:
> Hmm, no, I don't think so :(
> I think most of the relevant code is in the SitemapHelper class.
Thanks, I'll have a look.
>> Is the context really changed for each sax events? I thought that cocoon: protocol creates some kind
>> of derived environment for each cocoon: call and this way (some) separation is assured.
>>
>> Can you point me to relevant place?
> It's in the SitemapSource. There is a special sax event wrapper which is
> placed around the receiving sax handler:
> EnvironmentHelper.createEnvironmentAwareConsumer(consumer)
> So for each sax event the environment is changed back and forth.
You are right. Argh, SitemapSource is even more complicated than I thought...
>> I agree. The servlet: protocol does buffering but it does something more: it serializes and parsers
>> XML each time servlet request is made. This really affects performance and must be changed but it's
>> not that hard and the change would limited to only cocoon-servlet-* modules.
> Yepp, I think we should support the extensions of the
> HttpServletResponse which we discussed
> a long time ago and which can be found in the processor module of our
> whiteboard.
> The buffering could be a recording of sax events with the sax buffer.
I was discussing very similar idea with Leszek at GT and he expressed interest in implementing such
behaviour for respone/request classes used by servlet protocol. Leszek, do you still plan to
implement this in a foresable future?
When it comes to the request being SAX aware there is a small problem. There was a common agreement
that we should implement fall-back mechanism in case that called servlet does not support SAX-aware
request/response combo. The fall-back mechanism would work the way as reqest/reponse classes work
now so the incoming SAX stream is serialized into request's body and produced SAX stream is
serialized to response's body. However, at the same time we agreed that we would like to forward
request data (including parameters, uploaded files) from original request. Then there is a clash
between data coming from SAX events and uploaded files that must be included in the same request
body. I don't know any good solution for this problem apart from encoding serialized SAX stream as
another uploaded file.
Any ideas on this?
--
Grzegorz Kossakowski
Committer and PMC Member of Apache Cocoon
http://reflectingonthevicissitudes.wordpress.com/
Re: [cocoon-2.2] Deprecation
Posted by Carsten Ziegeler <cz...@apache.org>.
Grzegorz Kossakowski wrote:
>> Please note, that with 2.2 there is an auto include for per sitemap
>> components which reads configurations from some sub directories. This is
>> a very nice feature which makes packaging very easy :) But perhaps with
>> using blocks this is not that important.
>
> I agree with you that blocks packaging should be our main focus. However, is the technique you are
> talking about described somewhere?
Hmm, no, I don't think so :(
I think most of the relevant code is in the SitemapHelper class.
>
>> I haven't looked at the implementation of the servlet: protocol, but I
>> know the (old) implementation of the cocoon: protocol. One of the main
>> problems are the sax events combined with the required context changes.
>> As sax events are directly send from a cocoon: call to the parent call
>> the context of execution has to change back and forth for each sax
>> events. A lot of things have to change and this was always a place for
>> interesting bugs and errors.
>
> Is the context really changed for each sax events? I thought that cocoon: protocol creates some kind
> of derived environment for each cocoon: call and this way (some) separation is assured.
>
> Can you point me to relevant place?
It's in the SitemapSource. There is a special sax event wrapper which is
placed around the receiving sax handler:
EnvironmentHelper.createEnvironmentAwareConsumer(consumer)
So for each sax event the environment is changed back and forth.
>
>> While directly sending sax events seems to provide more performance I
>> actually would not care about this today anymore. The context switch
>> should be done once, the result from the call should be buffered and
>> that's it. But I think the servlet: protocol is doing this already.
>
> I agree. The servlet: protocol does buffering but it does something more: it serializes and parsers
> XML each time servlet request is made. This really affects performance and must be changed but it's
> not that hard and the change would limited to only cocoon-servlet-* modules.
Yepp, I think we should support the extensions of the
HttpServletResponse which we discussed
a long time ago and which can be found in the processor module of our
whiteboard.
The buffering could be a recording of sax events with the sax buffer.
Carsten
--
Carsten Ziegeler
cziegeler@apache.org
Re: [cocoon-2.2] Deprecation
Posted by Grzegorz Kossakowski <gk...@apache.org>.
Carsten Ziegeler pisze:
> Hmm, as long as you just have one sitemap in your block this works. But
> as soon as you are using sub sitemaps in your block it's not the same.
> If people are fine with the change that all components are visible for
> the whole block this is no problem.
> Please note, that with 2.2 there is an auto include for per sitemap
> components which reads configurations from some sub directories. This is
> a very nice feature which makes packaging very easy :) But perhaps with
> using blocks this is not that important.
I agree with you that blocks packaging should be our main focus. However, is the technique you are
talking about described somewhere?
> I haven't looked at the implementation of the servlet: protocol, but I
> know the (old) implementation of the cocoon: protocol. One of the main
> problems are the sax events combined with the required context changes.
> As sax events are directly send from a cocoon: call to the parent call
> the context of execution has to change back and forth for each sax
> events. A lot of things have to change and this was always a place for
> interesting bugs and errors.
Is the context really changed for each sax events? I thought that cocoon: protocol creates some kind
of derived environment for each cocoon: call and this way (some) separation is assured.
Can you point me to relevant place?
> While directly sending sax events seems to provide more performance I
> actually would not care about this today anymore. The context switch
> should be done once, the result from the call should be buffered and
> that's it. But I think the servlet: protocol is doing this already.
I agree. The servlet: protocol does buffering but it does something more: it serializes and parsers
XML each time servlet request is made. This really affects performance and must be changed but it's
not that hard and the change would limited to only cocoon-servlet-* modules.
--
Grzegorz Kossakowski
Committer and PMC Member of Apache Cocoon
http://reflectingonthevicissitudes.wordpress.com/
Re: [cocoon-2.2] Deprecation
Posted by Carsten Ziegeler <cz...@apache.org>.
>> IIRC it wasn't the functionality of <map:mount> that made some people
>> think that we should deprecate sub sitemaps but the <map:components>
>> part of sitemaps which causes a lot of complicated code that we have
>> to maintain. However, deprecating <map:components> shouldn't be a
>> problem because there already exists a migration path of putting your
>> component definitions into META-INF/cocoon/spring or
>> META-INF/cocoon/avalon.
>>
Hmm, as long as you just have one sitemap in your block this works. But
as soon as you are using sub sitemaps in your block it's not the same.
If people are fine with the change that all components are visible for
the whole block this is no problem.
Please note, that with 2.2 there is an auto include for per sitemap
components which reads configurations from some sub directories. This is
a very nice feature which makes packaging very easy :) But perhaps with
using blocks this is not that important.
>> The second "big thing" for deprecation that we discussed in Rome was
>> the cocoon:/ protocol and the the servlet:/ protocol instead. AFAIU
>> the servlet:/ protocol doesn't provide all the "features" of the
>> cocoon:/ protocol but that's mostly caused by getting rid of
>> side-effects.
>>
>> Can somebody who knows the code and the functionality of
>> <map:components> and cocoon:/ in more detail than me comment on this?
>>
I haven't looked at the implementation of the servlet: protocol, but I
know the (old) implementation of the cocoon: protocol. One of the main
problems are the sax events combined with the required context changes.
As sax events are directly send from a cocoon: call to the parent call
the context of execution has to change back and forth for each sax
events. A lot of things have to change and this was always a place for
interesting bugs and errors.
While directly sending sax events seems to provide more performance I
actually would not care about this today anymore. The context switch
should be done once, the result from the call should be buffered and
that's it. But I think the servlet: protocol is doing this already.
Carsten
--
Carsten Ziegeler
cziegeler@apache.org