ietf-822
[Top] [All Lists]

Re: 8-bit transmission in NNTP

1994-09-13 17:16:34
It is not totally clear to me that doing Base64 encoding on binary
attachments is the right long term thing to do.  I've seen criticism
of MIME (as compared to X.400) in that MIME requires such an encoding.

Such criticism of MIME is entirely unjustified, since MIME does not require any
encoding per se.

MIME is a transport neutral protocol. If you have a binary transport you can
use MIME and not have to encode anything. If you have an 8bit-capable transport
you will have to encode binary objects. If you have a 7bit-capable transport
you have to encoding anything that isn't 7bit text.

The use of SMTP for MIME transport is what imposes the encoding requirement,
not MIME itself. Moreover, a means of negotiating 8bit transport over SMTP is
already defined, and work is underway in the MAILEXT Working Group to define
binary transport. Once this in place the need to encode binary in MIME goes
away.

Given this trend towards 8bit and possibly binary SMTP transport in the future,
your statements that encoding may not be the right thing to do in the long term
follows directly as a corollary. However, at the present time the ability to
operate over the current infrastructure is well worth the cost of encoding, in
my opinion.

X.400 has its own ASN.1 encoding, but that does not involve translating
every byte of a (potentially large) binary attachment.

In practice the encoding requirements of binary MIME are substantially simpler
than those of ASN.1 encoding. This is especially true on the receiving end.

Are there any comparisons of performance of X.400 and SMTP/text
and SMTP/MIME/Base64 on similar hardware?

Sure. I have done full implementations of both MIME and X.400, using hand-coded
parsers in both cases for maximum performance. On the transmit side 7bit MIME
costs more because of the need to encode every octet. On the receive side,
however, the difficulties of handling all the flexibility in ASN.1 offset most
if not all of the gains X.400 gets from its lighter encoding. (And this is with
all the tricks in place like comparing tags values as a whole instead of
breaking them down into subfields, use of proper language constructs to get
optimized code, direct comparison of encoded OIDs, and so on. Without these
tricks ASN.1 processing overhead can increase by a factor of 5 or more.)

Complexity is another matter, however, and to my mind it is usually more
important. On the transmit side MIME is trivial. No other word suffices to
describe it -- the construction of 7bit MIME messages is so easy its  almost
embarassing. And receiving and handling 7bit MIME is harder, but still pretty
simple. 

X.400, on the other hand, is substantially more complex, especially on the
receiving side. I'd say a factor of 4 increase in complexity at a minimum,
although I only needed about 2 times as many lines of code.

                                Ned 


<Prev in Thread] Current Thread [Next in Thread>