[standards-jig] The Jabber Transport, and File Transfer Too

Mike Lin mlin at mlin.net
Tue Jun 11 08:53:53 UTC 2002


On Tue, 2002-06-11 at 02:55, Jeremie wrote:
> I understand the logic, I guess I just don't see why that is useful, or at
> least not nearly useful enough to warrant such a change.  The entity that
> will be making the most use of the XML is likely to be the same one that
> won't consider the binary data opaque.  When it comes to the 80/20 rule,
> I'll happily sacrifice complexity and take the 80% :)
> ...
> My full intent with XATP has always been to, whenever necessary, leverage
> XIB as a generic internal framing mechanism.  The only XATP namespace
> might be a simple <route to="" from=""
> type="">\134<message><body>hi</body></message></route> that wraps all xml
> chunks (just as a quick example).  Since XIB is just a raw block
> definition, you can always have blocks within blocks, or successive
> blocks, allowing any type of framing necessary.
> 

This is cool, and basically gets me what I want when I say it would be
nice to factor envelope out of payload.

But I would ask you to really think about what is actually easier or
simpler to implement. In a binary wire protocol such as the one I
sketched out, you pull integers off the stream in very specific places
to get the frames of all blocks, and then the structure of the packet is
completely determined. You just read a ulong off, and it tells you where
the next ulong is. Really can't get much simpler than that. If you
really, really, want to, I guess it's OK to scanf(printf(len)).

In the system you're describing, you have to search through all your
payloads for XIB blocks and gut the XML before giving it to your XML
parser. I don't think this is comparatively simpler or less complex at
all, and certainly it's less efficient. You're probably going to end up
storing the XIB blocks in memory in something that looks a lot like a
binary wire protocol anyway. What if something that looks exactly like a
XIB block shows up inside an attribute value or a comment? Does that
count? If not, you have to write your stream processor to count quotes
and brackets and so on. (OK, in fairness there's no reason to be using
comments in a XATP stream, but my point is that there is added
complexity and room for error where there doesn't need to be.)

I take your other points about scalability. But I hope I am making
somewhat of a decent case for binary wire framing protocols. I know it
is a lost cause already. But somebody had to say it: <whisper>don't tell
the W3C or most parts of the IETF I said this, but sometimes, just
sometimes, they are a better way to do things!</whisper> =)

-Mike





More information about the Standards mailing list