You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Mariano Kamp <mk...@codamax.com> on 2001/08/24 15:27:05 UTC

Content aggregation in separate Threads?

Hi there,

  I was thinking about content aggregation. We do some portal like 
aggregation of different resources. Some of them are pretty slow, like 
querying email accounts or aggregating content from different sites 
(sometimes more than a second for one <map:part>). It would be quite nice if 
the different "parts" were to be aggregated in different threads. So that if 
I put the slowest resource in the last <map:part> then the total time of the 
aggregation should be almost equal to the slowest resource but not the sum of 
all resources. Is this something planned or at least something which would be 
possible to implement?

Mariano

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


RE: Content aggregation in separate Threads?

Posted by Vadim Gritsenko <vg...@hns.com>.
AFAIK, this is not planned,

but it is possible to implement.
Only take in account that you would need to buffer SAX events:
events from second part could be received before you get last event from
first part.

Vadim

> -----Original Message-----
> From: Mariano Kamp [mailto:mkamp@codamax.com]
> Sent: Friday, August 24, 2001 9:27 AM
> To: cocoon-dev@xml.apache.org
> Subject: Content aggregation in separate Threads?
> 
> 
> Hi there,
> 
>   I was thinking about content aggregation. We do some portal like 
> aggregation of different resources. Some of them are pretty slow, like 
> querying email accounts or aggregating content from different sites 
> (sometimes more than a second for one <map:part>). It would be quite nice if 
> the different "parts" were to be aggregated in different threads. So that if 
> I put the slowest resource in the last <map:part> then the total time of the 
> aggregation should be almost equal to the slowest resource but not the sum of 
> all resources. Is this something planned or at least something which would be 
> possible to implement?
> 
> Mariano
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
> For additional commands, email: cocoon-dev-help@xml.apache.org
> 

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


Re: Content aggregation in separate Threads?

Posted by Mariano Kamp <mk...@codamax.com>.
On Saturday 25 August 2001 12:25, giacomo wrote:
> On Fri, 24 Aug 2001, Mariano Kamp wrote:
> > Hi there,
> >
> >   I was thinking about content aggregation. We do some portal like
> > aggregation of different resources. Some of them are pretty slow, like
> > querying email accounts or aggregating content from different sites
> > (sometimes more than a second for one <map:part>). It would be quite nice
> > if the different "parts" were to be aggregated in different threads. So
> > that if I put the slowest resource in the last <map:part> then the total
> > time of the aggregation should be almost equal to the slowest resource
> > but not the sum of all resources. Is this something planned or at least
> > something which would be possible to implement?
>
> There is nothing planned in that direction. Also your "total time of the
> aggregation should be almost equal to the slowest resource" isn't really
> true because of event ordering you will have to take care about when
> multiple threads will fire events down the SAX pipeline.

Sorry for not beeing more specific. I was thinking about for example two 
contents to be aggregated, like

  <map:aggregate element="xyz">
        <map:part src="cocoon://takes500.xml"/>
        <map:part src="cocoon://takes1000WithLoadsOfNetworkTrafficms.xml"/>
  </map:aggregate>

which should yield in something like 1500ms. Whereby 

  <map:aggregate element="xyz" THREADED="YES">
        <map:part src="cocoon://takes500.xml"/>
        <map:part src="cocoon://takes1000WithLoadsOfNetworkTrafficms.xml"/>
  </map:aggregate>

should yield in something like 1000ms. Both parts should be started 
simultanously and resource part(2) to part(n) should write into some kind of 
buffer. At the end part(2) to part(n) should be outputed. 

But well I don't know much, to say the least, from the internals of cocoon. 
We have a pretty tough time at the company at the moment (business is not too 
well at the moment), but if I get some spare time I will probably go for it. 
Can somebody tell me if I am supposed to start a thread inside cocoon like in 
Java, or if there is something in the framework for multithreading and if 
there is some kind of sax event buffer in place already?

Mariano




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


Re: Content aggregation in separate Threads?

Posted by giacomo <gi...@apache.org>.
On Fri, 24 Aug 2001, Mariano Kamp wrote:

> Hi there,
>
>   I was thinking about content aggregation. We do some portal like
> aggregation of different resources. Some of them are pretty slow, like
> querying email accounts or aggregating content from different sites
> (sometimes more than a second for one <map:part>). It would be quite nice if
> the different "parts" were to be aggregated in different threads. So that if
> I put the slowest resource in the last <map:part> then the total time of the
> aggregation should be almost equal to the slowest resource but not the sum of
> all resources. Is this something planned or at least something which would be
> possible to implement?

There is nothing planned in that direction. Also your "total time of the
aggregation should be almost equal to the slowest resource" isn't really
true because of event ordering you will have to take care about when
multiple threads will fire events down the SAX pipeline.

Giacomo


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