Subject: RE: IPP>PRO: sorry, binary is better (?)

From: Paul Moore <[email-masked]>
Date: Mon, 23 Jun 1997 19:22:24 -0700

The extensibility argument was why we changed in the first re-rev from
32-bit numbers to length prefaced Strings.

> -----Original Message-----
> From:	Larry Masinter [SMTP:[email-masked]]
> Sent:	Monday, June 23, 1997 5:32 PM
> To:	Paul Moore
> Cc:	'Scott Isaacson'; [email-masked]; [email-masked]
> Subject:	Re: IPP>PRO: sorry, binary is better (?)
> 
> > -If the protocol is going to be read by a program then the encodings
> are
> > just 'magic numbers' regardless of text or binary. We could choose
> the
> > number '42' to mean 'copies' or we could choose numbers 'COPIES' to
> mean
> > copies just so long as we (the implementors) all agree. 
> > 
> 
> One of the things that is affected by this choice is the extension
> mechanism. Suppose I want to try out a new feature. I'll do it
> privately, and then I want to register it and make it public. If
> I just pick a number, '43', I'm likely to hit someone else's number.
> So maybe I'll use a number out of the private extension space, e.g.,
> '123451'. But then when I change from 'private extension' to 
> 'public', I have to go back and recompile all my test code.
> 
> With strings, I can pick a string that isn't used by anyone now,
> and most likely won't have to change it by the time I register it.
> 
> This sounds pretty sloppy, but it's mainly what's done now for
> many protocols and it's much more robust than numbers.
> 
> The protocol strings aren't human-language, they're just close enough
> to
> language to believe that they're extensible in a more distributed
> fashion.
> 
> In addition, the debugging and testing aspects shouldn't be ignored;
> it's useful to be able to write a test program in a scripting language
> or even to telnet to port 80 at a host and just type "GET url
> HTTP/1.0"
> without having to count bytes.
> 
> Larry
> 
> -- 
> http://www.parc.xerox.com/masinter

---

From: Larry Masinter <[email-masked]>
Date: Mon, 23 Jun 1997 19:29:37 PDT

> 32-bit numbers to length prefaced Strings.

Right, so the question isn't 'text vs. binary', it's
'length-prefaced strings' vs. 'delimited strings', and

if length-prefaced, whether it is ascii-decimal-length or binary-length

and if delimited, whether it's
escaped delimiters or encoded delimiters

The argument against length-prefaced is that there might
be some errors if some of the characters might be accidentally
transformed (e.g., space & tab, CR & LF & CRLF).

The argument against delimited strings is that it takes
more time to scan or parse. (You have to parse if the
delimiters are escaped when not used as a delimiter, and
scan and decode if the delimiters are encoded.)

HTTP is mainly delimited (by CRLF) and escaped (for comment
strings) but sometimes encoded (e.g., in URLs).

Larry