Utterances of a Zimboe

Programming the Internet.

A Bit More on Binary Encoding

with 3 comments

Update 09/25: A related article in Java Developer’s Journal.

Oh, word got around more easily than I dared to anticipate. Embrace the tubes. Yes, I see now that this issue has been discussed way back then. That’s good, I’ll now try to add only new content on top of what is already said.

My point merely was that as EXI will probably emit some spec at some point in the future, there should be a way to advertise such an encoding feat in the XMPP stream; equivalently to the compression. I’m really not expecting that the group is planning to come up with a pure XML-way to do such a thing, it should be out of their scope. So, nothing too fancy for XMPP, just a basic, minimal advertising feat. And, as a draft can be made (thanks llama for the comment!), more important could be to see if this kind of development would interest the community.

Just to note, I do like the XML data model, about it’s structure and extensibility. And, I must resist the binary XML being the claimed ice cream delicacy (note: this goes a bit beyond XMPP): yes, the binary format is a totally different kind of data, but it still represents the same information – content in some ‘potentially-schema-defined-kind’ of a structure. We’re just not using the debug mode any more (visiting my poor metaphor). And, as the binary format should be the most efficient way to represent that data, it really is the leanest ad-hoc binary format. (No, it won’t be anything absolute in any sense, I’ll be just trying to grasp the basic idea.) It should then be the leanest way to represent XMPP also. Only minor improvements should be able to be gained with further ad hoc binary formats, as the qualitative improvement in reducing the parsing complexity is already achieved. Thus, there should be no room for more efficient ad hoc formats, considering the structure of XMPP.

Irrelevancy prevails: Despite the weaknesses, which of course must be considered, in the evaluation was noted some significant improvements in parsing times. (“2 times faster”, whatever that means.) The article by Sun presented pretty much the same results. And, those gains don’t yet include the impact on software development effort (the error handling I mentioned in the last post); I believe XML parsing could be more robust than what is is today, especially for stream parsing. Well, there might always be tons of perfect solutions hidden inside closed systems or otherwise undiscovered…

It’s the protocol nature where I see a good fit for binary encoding and thus could like to see it supported in the XMPP. Furthermore, the real-timeliness of XMPP could justify RTT improvements.

(Note: There are some comments on the previous post and further commenting is welcome.)


cool hit counter


Written by Janne Savukoski

September 13, 2006 at 11:44 pm

Posted in Technology

3 Responses

Subscribe to comments with RSS.

  1. Just whip up a JEP that references JEP-138, specify a new compression method and what gets registered here: http://www.jabber.org/registrar/compress.html, and you’re done. One page.

    It *would* be cool to do some testing, and prove that it out-compresses zlib by enough to matter, but that isn’t required.

    Joe Hildebrand

    September 15, 2006 at 6:50 am

  2. FWIW, when we designed the new (V2) JAX-WS implementation in GlassFish, we took into consideration that an additional encoding might come from EXI, so, if that comes, and it is not FastInfoset, we will be able to add it pretty easily (we hope!) – eduard/o

    Eduardo Pelegri-Llopart

    September 18, 2006 at 12:29 am

  3. […] Quoting myself: ;) And, as the binary format should be the most efficient way to represent that data, it really is […]

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: