Subject: Re: Text vs. Binary (was Re: Results from the ITU SG16 Berlin mtg)

From: Christian Huitema <[email-masked]>
Date: Tue, 17 Aug 1999 11:53:58 -0400

On Aug 10, 10:17pm, Paul E. Jones wrote:
>
> 1) Binary encoding can result in smaller packets

"can" ?  Maybe.  And text encoding can also results in small packets.  For
example, the text encoded SGCP packets were smaller than the equivalent
binary encoded IPDC packets.  The difference in length mostly results from
the way the encoding encodes options.  Text delimiters tend to be single
characters (e.g a line feed), while binary delimiters tend to be of the
type-length variety. When the designers of binary syntaxes aim for the
"fast processing" result that you quote later, they typcally want a fixed
length type field and a fixed length length field. That means at least 16
bits of type and 16 bits of length, which is longer than your typical text
delimiter. On average, the length of encoding tend to be pretty much the
same.

> 2) Binary encoding can be processed faster

This is in fact a fallacy, at least for the type of protocols we envision,
which mostly carry "tags" and "options", very few integers, and no
floating point numbers. The speed of processing essentially depends on the
quality of the encoding decoding code, and whether such techniques as fast
path prediction or code pagination can be successfully applied.

> 3) Binary encoding may be more difficult to debug
>    (but, a product spends a small percentage of its life in debug mode)

Well, some of us believe that debugging and interoperability are extremely
important, specially during the "adoption curve" of a protocol.

> 4) Binary protocols have proven themselves where it counts-- performance
>    (as a good example: IP)

But IP is a very different animal!  Basically, an IP packet has no
options, no negotiation, very few parameters, and a structure that has not
changed for the last 20 years. Besides, one could revert your argument and
mentions that text protocol have been successfully used for e-mail for
more than 20 years, and that the text based SMTP/RFC-822/MIME combination
actually wiped the binary competition (X.400) out of the Internet. The
proposition here is to use text where it is useful, i.e. during the
option-rich negotiation phase of a call, and binary where it is useful,
i.e. when sending fixed format RTP packets.

--
Christian Huitema
------------------------------
Please note my new address: [email-masked]
http://www.telcordia.com/