cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Donald Ball <ba...@webslingerZ.com>
Subject Re: Using custom producer to handle DB query results in XML format - handling large result sets
Date Fri, 01 Sep 2000 17:24:33 GMT
On Thu, 31 Aug 2000, Frank Olsen wrote:

> 1. Is Cocoon performant enough for handling large result sets?

how large? if you're talking thousands of rows, then yes, cocoon1 is
probably not for you - try cocoon2. (cocoon1 is DOM based which means your
whole XML document must exist in memory. cocoon2 is SAX based which means
it's streamed around).

> Will it help to replace Xalan and/or Xerces with, for instance, XT/XP?

possibly.

> If even that isn't performant enough I might end up by creating my custom
> parser for my XML results. Do you think that even the parsing is too
> expensive? I guess another alternative is parsers that do not use SAX/DOM,
> for instance NanoXML or BoostXML...

parsing is pretty cheap.

> 2. How do I present the result set in pieces of, say, 10 (or 25, ...)?
> 
> My idea would be to store the results in the HTTP session object and to
> provide some kind of indexing for the results with a cursor telling me where
> I am.
> 
> The question is, what do I store in the HTTP session? Storing the XML string
> would require reparsing it; but, how can I access the object representation
> of the parsed XML result string from a custom producer? I looked at the
> APIs, but couldn't see any way of getting hold of the individual,
> intermediate results used by Cocoon.
> 
> Can I divide the result string into pieces that are handed over to XSLT? If
> I do, how can I then have a cursor to find out where I am in the data?
> 
> Maybe it would be an idea to do the parsing myself and then present parts of
> it to the XSLT transformation?

the sql logicsheet offers some help along those lines - give your query
two extra parmeters - number of rows to return, and number of rows to
skip.

> 3. Is the Cocoon cache system useful in the case presented above?

only if you using the sql logicsheet and have your XSP page agree to cache
its results for some amount of time.

> 4. Should I really be using XSP or my own processor instead of custom
> producers?

XSP. you can't mix producers on the same page, but you can mix XSP
logicsheet calls.

- donald


Mime
View raw message