Subject: Re: [hybi] Binary/Text Distinction (Hybi Volume 30, Number 63, et al)

From: "Bob Gezelter" <[email-masked]>
Date: Mon, 22 Aug 2011 14:04:01 -0700

Stephen,

> -------- Original Message --------
> Subject: Re: Binary/Text Distinction (Hybi Volume 30, Number 63, et al)
> From: Stephen Williams <[email-masked]>
> Date: Mon, August 22, 2011 1:42 pm
> To: Bob Gezelter <[email-masked]>
> Cc: [email-masked], [email-masked], John Tamplin <[email-masked]>, 
> [email-masked], Bjoern Hoehrmann <[email-masked]>
> 
> 
> On 8/22/11 11:24 AM, Bob Gezelter wrote:
> > Stephen,
> >
> > I was responding to an earlier message.
> >
> > My point was that while all UTF-8 can be sent as binary, not all binary
> > can be sent as UTF-8 without appropriate wrapping/encoding.
> >
> > As I have said in other postings, my strong preference is:
> >
> > - a single message type
> > - the protocol be defined as 8-bit transparent octets
> > - a trivial WSAPI-WSAPI protocol be defined that is either pure UTF-8 or
> > message-by-message UTF-8/binary.
> 
> We should acknowledge that we're just finally reimplementing BEEP (BXXP originally) in the web world.  While we're wiser now, and 
> the current level of agreement is nicely concise, BEEP was a direct precursor to WS in some sense and might suggest some ideas or 
> features.
> 
> I would want to suggest that, regardless of the binary/text message tagging, that we strongly suggest the use of UTF-8 for text as a 
> default.
> 

Stephen,

I find the use of UTF-8 for text strings appropriate. It is the
distinction between text/binary within message payloads at the WebSocket
protocol level suboptimal.

The past days of arbitrating character and format transformations at one
(or both) ends of a connection are certainly not fond memories.

That said, the need for that syntactic limit is one level higher than
the WebSocket protocol. The WebSocket protocol is implementing two
levels in the protocol stack, and we all too well know from Internet
history that such mixing of functions often leads us into a deep swamp. 

The WebSocket protocol is best described as a transport protocol, albeit
one layered on top of another transport protocol (at the moment TCP, but
the linkage to TCP is tenuous, to say the least -- any sequential,
essentially error-free pipe/message protocol would serve). 

The actual WSAPI/WSAPI negotiation of character/binary should be left at
that level. For that matter, providing intermixed binary/text messages
has hazards in and of itself. 

- Bob Gezelter, http://www.rlgsc.com

---

From: Stephen Williams <[email-masked]>
Date: Mon, 22 Aug 2011 14:35:57 -0700

On 8/22/11 2:04 PM, Bob Gezelter wrote:
>> From: Stephen Williams<[email-masked]>
>> ...

Well....  TCP/IP and the IETF Internet stack in general mix and merge and bridge levels as far as the ISO OSI stack are concerned.  
And that is a very good thing.  While OSI was elegant, although redudant in some ways, to describe, it was suboptimal in many ways.  
So, I would take the lesson from Internet history that careful analysis and optimization hacking cyccles often leads to a more 
nuanced and effective design.  OSI is more of a guideline.  ;-)

> - Bob Gezelter, http://www.rlgsc.com

sdw
-- 
Stephen D. Williams [email-masked] [email-masked]