Post by Generic Usenet AccountGreetings,
Have there been any studies done on the overhead imposed by XML? We
are evaluating whether or not XML imposes an unacceptable overhead for
severely resource constrained devices in M2M (Machine-to-Machine)
deployments. These devices are expected to be very cheap (< $10) and
are expected to run on battery power for years.
Any pointers will be appreciated.
I think it depends how *much* XML is "unacceptable". Parsing a very
small, well-formed instance, with no reference to DTDs or Schemas, such
as a simple config file, would not appear to present much difficulty,
and there are libraries for the major scripting languages that could be
cut down for the purpose.
Larger files of the "Data" genre may also be "acceptable", as they do
not typically use mixed content, and rarely descend much below 4-5
levels IMHE. "Document" files (eg DocBook, XHTML, TEI, etc) by contrast
can be arbitrarily complex and may nest markup to a considerable depth;
TEI in particular. In both cases, a definition of "severely restrained"
would be needed: is this memory, speed, bandwidth, or what? (or all three?).
You might want to talk to some of the utility and application authors
who have implemented some very fast XML software, and see what their
approach was. I'm not a computer scientist, so I don't know how you
would measure the balance between the demands of XML and the demands of
the implementation language, but I would expect that there are metrics
for this which would let you take the platform restrictions into account.
There was some discussion of performance and resources at last year's
XML Summerschool in Oxford, mostly in the sessions on JSON vs XML. I'm
not sure that there was a formal conclusion at that stage, but the
consensus seemed to be that they weren't in competition; rather, that
they addresses different requirements. There was also a recent tweet
from Michael Kay implying that there may be JSON support in Saxon 3.x,
which would make serialisation easier.That, however, doesn't address the
problem for small devices that Java is a hog :-)
(http://xmlsummerschool.com)
The underlying implication of the XML Spec is that resources (disk
space, bandwidth, processor speed) would become less and less of a
factor: I'm not sure that we envisaged severely resource-constrained
devices as forming part of the immediate future. But perhaps someone out
there has indeed tested and measured the cycles and bytes needed.
///Peter
--
XML FAQ: http://xml.silmaril.ie/