Carsten Ziegeler pisze:
We should first think of the intended behaviour and then think of the
implementation.
I would expect that the ObjectModel stays the same during one single
request which might end up to be served through a pipeline consisting of
several pipeline components.
If a sub request is started (internal call through one of our protocols)
this gets a new object model which might inherit the values from the
parent or not - this is something we have to decide.

I expressed my view on ObjectModel sharing between subrequests in "[RT] The big picture of Servlet Service Framework" mail[1]. It was when I discussed statelessness.

So, technically speaking, we might end up with more than one ObjectModel
per thread when sub requests are involved. The problem now is the
possible sax streaming from a sub request to the parent request where
the ObjectModel has to be changed on-the-fly.

I don't see why we would have to change Object Model on-the-fly if there are two separate intances - one for subrequest and one for request. Could you give an example?

While this direct streaming seems to be very cool in terms of
performance, it created so many problems over the past years, that I
think we should forget about this direct streaming. A sub request writes
its content to a temporary buffer (being this a byte array or a
recording of sax streams) and when its finished, the content is streamed
from this buffer. This allows to change the whole execution context only
twice. But it creates a clean separation between the request and makes
implementing things much easier. It also allows to cache sub requests
completly and directly stream from the cache

Although we have to think about subrequests we need to think about components executed in the original request. As I stated in my first mail I think we need several Object Model instances even if there are no subrequests. It is caused by the fact that components are executed simultaneously and my very own opinion is we should not try to change this.

I think if we find solution for this we will get solution for subrequests as 
well.

[1] http://article.gmane.org/gmane.text.xml.cocoon.devel/74571

--
Grzegorz Kossakowski
http://reflectingonthevicissitudes.wordpress.com/
*** My Internet Service Provider breaks my internet connection                
***
*** incessantly so I'll not be able to respond to e-mails                     
***
*** regularly and my work will be somehow irregular.                          
***
*** I'm already trying to switch ISP but it will take handful amount of time. 
***

Reply via email to