[JDEV] Why XML?
qbradley at csc.UVic.CA
qbradley at csc.UVic.CA
Wed Jan 13 14:27:57 CST 1999
Using XML is brilliant. Try writing a client! The packet parsing code
just dissappears. There are scads of libraries around that parse XML and
return a tree to you, which is very easy to extract the information from.
Ease of development of clients will insure Jabber's success and XML vastly
eases the development of clients.
As mentioned earlier, the use of XML also eases debugging. XML allows the
protocol to be used from shell scripts and other surprising places. XML
instantly eliminates all cross platform issues.
Proposal #1: If you really really want a binary protocol, make a server
module to handle it. The server module coul convert from the binary to
XML before passing it up to the JabberBox.
Proposal #2: Use a compressed XML document as your binary representation!
In Java use CompressedOutputStream. From C use zlib. XML documents
compress extremely well. The more supposedly "wasteful" tags you have,
the better it compresses. One XML document I had consisting mostly of
tags compressed to 2% of its original size (from 60k to to less than 2k).
I typically get 15% to 20% compression on small documents.
Have a nice day!
Quetzalcoatl Bradley
qbradley at csc.uvic.ca
More information about the JDev
mailing list