cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "McCoy, David" <>
Subject RE: C2: trouble getting streaming to work as expected
Date Wed, 28 Mar 2001 17:50:40 GMT
Could you elaborate on what would be necessary to install a
DeterministicXMLSerializer in to Cocoon?

-----Original Message-----
From: Berin Loritsch []
Sent: Tuesday, March 27, 2001 12:09 PM
Subject: Re: C2: trouble getting streaming to work as expected

"Lock, Fred" wrote:
> Hello,
> My partner and I are using the enclosed XSP (see below) to experiment with
> the streaming capabilities of C2. We are applying the
> which comes with the C2 distribution to format the output. We are using IE
> version 5.5 to view the output. C2 is running on Tomcat 3.2.1.
> We expect that when we hit the XSP we should see the browser displaying a
> new integer number on successive lines every 0.5 seconds.
> However, what actually happens is that we wait approximately 70 seconds,
> then integers 0 through 131 are displayed. We then wait another 70 seconds
> and integers 132 through 268 are displayed, etc.
> It appears that the output is being cached, then streamed out, cached,
> Is there some way to reduce this cache, or force a flush?

Cocoon will use the BufferedOutputStream in just about every circumstance
it is faster to the end user.  If you need deterministic timing on the
then you need a "DeterministicXMLSerializer" or something like that and
flush()es on each nugget of information.  Since Cocoon is designed for a
oriented environment, the notion of what you are trying to due goes against
Cocoon is designed to be used.

This is the same with most Server Side Processing in a Web environment.  A
occurs from request to response.  Once the response is fully sent, the
is done.  There really isn't the notion of a progressive transaction.

What is the end result that you envision by having a deterministic response
the client browser?  I guarantee that once you start embedding that
in tables, Netscape won't display the information until the table is closed
at once).

> Thanks,
> Fred
> =================================================================
> XSP file to experiment with C2 streaming.
> dynamic-page2html.xsl is used to style the output.
> =================================================================
> <?xml version="1.0" encoding="ISO-8859-1"?>
> <xsp:page
>   language="java"
>   xmlns:xsp=""
> >
>   <page>
>    <title>A Simple XSP Page</title>
>    <content>
>      <para>Some page content</para>
>      <xsp:logic>
>        for (int i = 0 ; i &lt; 500 ; i++) {
>          <para>
>            <xsp:expr>i</xsp:expr>
>          </para>
>          try {
>            Thread.sleep(500);
>          } catch (Exception e) {}
>        }
>      </xsp:logic>
>    </content>
>   </page>
> </xsp:page>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, email:

To unsubscribe, e-mail:
For additional commands, email:

To unsubscribe, e-mail:
For additional commands, email:

View raw message