OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   Re: [xml-dev] Streaming XML (WAS: More on taming SAX (was Re: [xml-dev]

[ Lists Home | Date Index | Thread Index ]

On Mon, 27 Dec 2004 12:00:18 -0800, Daniela Florescu <dflorescu@mac.com> wrote:

> Could you guys please try to clarify for me the answer to the following
> question: instead
> hand coding steaming applications using SAX, couldn't you write some
> XQuery code (with external functions probably) to do the same thing ?
> Did you try at least ? Did you try and fail ? If yes, why did it fail ?

It depends on what you're trying to do.  For many applications, it's
perfectly acceptable to have a 1 or 2 second overhead for processing
the XML (think of a simple XML publishing system); for many others,
it's necessary to handle hundreds or thousands of XML documents every
second (think of a busy application server, for example, or a network
appliance).  So far, no one has shown me a DOM, XSLT, or XQuery-based
app that is not at least an order of magnitude or two slower than a
hand-rolled streaming application, and that's not even considering the
memory overhead.  As a matter of fact, many XML consultants get called
in precisely because someone designed a prototype using XSLT that ran
just fine in the demo but melted in a puff of goo and smoke on the
first load test.  Unfortunately, the ones who do not call in the
consultants simply conclude that XML is too slow and abandon it
completely.

Right now, those streaming applications are very difficult to write,
because (as you suggest) SAX and STAX are low-level APIs.  Coming up
with commonly-accepted streaming subsets of XPath or XQuery might give
the best of both worlds: fast prototyping, as with XSLT or XQuery,
*and* decent performance in a real, production-grade system.


All the best,


David

-- 
http://www.megginson.com/




 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS