Re: [hybi] frame length encoding
"Shelby Moore" <shelby@coolpage.com> Sun, 22 August 2010 08:36 UTC
Return-Path: <shelby@coolpage.com>
X-Original-To: hybi@core3.amsl.com
Delivered-To: hybi@core3.amsl.com
Received: from localhost (localhost [127.0.0.1]) by core3.amsl.com (Postfix) with ESMTP id 492073A682A for <hybi@core3.amsl.com>; Sun, 22 Aug 2010 01:36:03 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.138
X-Spam-Level:
X-Spam-Status: No, score=-2.138 tagged_above=-999 required=5 tests=[AWL=0.461, BAYES_00=-2.599]
Received: from mail.ietf.org ([64.170.98.32]) by localhost (core3.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id C5o5o0q7+ZyP for <hybi@core3.amsl.com>; Sun, 22 Aug 2010 01:35:55 -0700 (PDT)
Received: from www5.webmail.pair.com (www5.webmail.pair.com [66.39.3.83]) by core3.amsl.com (Postfix) with SMTP id B76883A6781 for <hybi@ietf.org>; Sun, 22 Aug 2010 01:35:54 -0700 (PDT)
Received: (qmail 888 invoked by uid 65534); 22 Aug 2010 08:36:27 -0000
Received: from 121.97.54.174 ([121.97.54.174]) (SquirrelMail authenticated user shelby@coolpage.com) by sm.webmail.pair.com with HTTP; Sun, 22 Aug 2010 04:36:27 -0400
Message-ID: <b95f074b65875865802f532bb5668ff2.squirrel@sm.webmail.pair.com>
In-Reply-To: <AANLkTimo0MwZEMn1t1vrASfwC1bx82Q9Z_Ls3wVb-zUS@mail.gmail.com>
References: <AANLkTimKbmcpgx8k0uXUWvCO=8w9pPrtV=3y4qh6363k@mail.gmail.com> <alpine.DEB.2.00.1008212037190.27211@tvnag.unkk.fr> <AANLkTinrsT+wV48nHvVW_1ChGYffkq7jisU2-PZnMyKg@mail.gmail.com> <alpine.DEB.2.00.1008212123460.27211@tvnag.unkk.fr> <20ef7ed5e135c57c1ee5a741658b9d98.squirrel@sm.webmail.pair.com> <1282423311.2014.6.camel@tng> <224b9ed365bd78fd5e316b8cb5f3f837.squirrel@sm.webmail.pair.com> <1282435214.2014.14.camel@tng> <AANLkTimo0MwZEMn1t1vrASfwC1bx82Q9Z_Ls3wVb-zUS@mail.gmail.com>
Date: Sun, 22 Aug 2010 04:36:27 -0400
From: Shelby Moore <shelby@coolpage.com>
To: Brian <theturtle32@gmail.com>
User-Agent: SquirrelMail/1.4.20
MIME-Version: 1.0
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: 8bit
X-Priority: 3 (Normal)
Importance: Normal
Cc: Hybi <hybi@ietf.org>
Subject: Re: [hybi] frame length encoding
X-BeenThere: hybi@ietf.org
X-Mailman-Version: 2.1.9
Precedence: list
Reply-To: shelby@coolpage.com
List-Id: Server-Initiated HTTP <hybi.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/listinfo/hybi>, <mailto:hybi-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/hybi>
List-Post: <mailto:hybi@ietf.org>
List-Help: <mailto:hybi-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/hybi>, <mailto:hybi-request@ietf.org?subject=subscribe>
X-List-Received-Date: Sun, 22 Aug 2010 08:36:03 -0000
Hi Brian, Although I do appreciate your sentiments and also appreciate John and others for trying to move towards concensus, I have some feedback to you. > As much as I feel that 63-bits is ridiculously large for the frame length, > I'd be happy to accept it and just move on to the next item of discussion > -- Noted. > though the WS server I'm writing right now will consider any frame with a > non-zero bit in the high 31-bits of the long long length field to be an > error condition, and immediately drop the rogue/attacking/misbehaving > client. 64-bit computing is rogue? I thought it was a desired advancement. > I don't want to be bound to treat absurdly large frames as > potentially legitimate by an overzealous specification. You do not want to ever be bound to moving to 64-bit computing? And if you do one day accept the need to move to 64-bit computing, how difficult will it be to come back and redo WS and get the new version adopted in reasonable time? I say the push to 64-bit is now and we are derelict in our duties if release a new protocol that is looking backwards about 2 decades. I relented on my 128-bit suggestion. > Furthermore, I'm > writing my server with Node.js, which, being a JavaScript-based > environment > itself, doesn't even have a 64-bit integer type of any sort. Javascript will never support 64-bit? In meantime, WS browser code can do the re-fragmentation, you will never see larger than 32-bit frame in Javascript, until that browser's Javascript is 64-bit. > I *can't* > correctly handle a 63-bit frame. Yes you can. See above. > Ah, the irony of a protocol meant for > JavaScript applications that's impossible to fully implemented in > JavaScript > (at least efficiently -- no bignum libraries allowed.) And who knows what > would happen with the actual frame data in, say, a JavaScript String, with > a > frame of a few terabytes? Assuming anyone had that much RAM? We're > talking about JavaScript clients here, so no streaming to disk, etc.... Again see above, you will never have to store something that Javascript can't store. > In my not-so-humble opinion, trying to accommodate sending large files > through WebSockets is a complete and utter misdirection. The protocol > exists to provide real-time interactivity support to browsers. That's > what > it's meant for. If someone wants to send large chunks of data (>4GB) in > one > frame, they should find another protocol, because they're clearly not > planning to process it in JavaScript in a web-browser client. And if > they're not running in the browser, there's no reason they have to use WS. > Making abusers of the protocol chunk at 4GB boundaries is more than > reasonable when you consider that the vast majority of users won't begin > to > consider sending fragments anywhere near even a fraction of that size. I deduce/conjecture that WS will also be used to replace Flash in HTML5, so that users can get video streaming without a plugin or Flash server license. And I think we also need to consider the amateur webserver programmers who simply want to dump a sendFile() of their DVD to client who can display it. We don't want to limit the simple optimization (DMA -> NIC, no CPU load) that capability to sysadmins who understand low-level TCP tricks. It doesn't cost you anything on the intermediary or client side, as we have to support re-fragmentation (and/or negotiation on handshake) any way (because no matter what maximum size we choose, not all intermediaries will necessarily support it). > This > is not and should not be an all-things to all-people protocol. Why not? > We > shouldn't > be designing for these edge cases just because the protocol could > theoretically enable any number of diverse applications. Web video is going to be edge case? I don't think so! It may end up being the majority of the traffic (if measured in bytes, not frames) for WS. > Lets get back to basics! WebSockets was conceived to provide super-simple > bi-directional persistent communications on a platform -- the browser -- > that had no such pre-existing canonical ability. What is not simple that could be designed away from our frame header? > It's meant exclusively > for > communicating with JavaScript-based applications running in a web browser. Disagree as noted above. > WebSockets may end up being used or abused for other things, but that is > not the intended purpose and, in my opinion, such uses shouldn't be the > concern of this working group. Web video is an abuse of WS? > Pedantic discussion of details and attempting to figure out how to > accomodate theoretical (ab)uses of this protocol has become a very real > distraction to the group. The volume of mail generated by this list has > skyrocketed in the last week or so and most of the content can really be > summed up as quibbling over minutia. Disagree with that "quibbling over minutia" characterization. I showed that for the bi-direction events you are batting for, that "minutia" could cause a doubling of network traffic in the extreme case. Good design is a lot of work. > Let's pick a reasonable solution and > move forward, even if a tiny subset of people who want to abuse WS for > something outside the browser don't like it. Agreed! But I think the abusers are the ones who argue they can't check one bit in the header and switch to 64-bit processing. > > > For the record, my vote for frame size encoding goes to John's > original option #2. It's simple, clean, easy, and efficient. The only > change I'd make is to go to a 32-bit maximum, but I'm happy to accept a > 63-bit field in the spec if it means we can move on. Noted. I am obviously arguing for the 63-bit field. > Also, thank you, > John, > for taking the time to attempt to steer this issue to consensus! It's > hard > to keep up with the current theoretical consensus of where the spec is > going > with all the pedantry on the list at the moment. > > As for the concern about keeping a sufficient number of reserved bits... > throw in a whole reserved byte and put a bow on it. :-) That might not be a bad idea. But I think we will know that more as we move forward on designed the extensions? 1 byte is not that ridiculous, because we already have 3 bytes minimum including a 1 byte payload. > > > Cheers, > Brian McKelvey > > > > > On Sat, Aug 21, 2010 at 5:00 PM, Patrick McManus > <mcmanus@ducksong.com>wrote: > >> On Sat, 2010-08-21 at 17:25 -0400, Shelby Moore wrote: >> > [snip] >> > >> > > 32 bits with chunking would be fine to accommodate zero copy. >> > > >> > > there are some folks that want to be able to send any message in one >> > > chunk for unrelated reasons. >> > >> > How can they send in one chunk if their file size is greater than 32 >> bit >> > length, if you limit the size to 32bit? >> >> I did not say they could fit 33 bits of stuff in a 32 bit bucket. >> >> I said that some folks want a >32 bit chunk size for reasons unrelated >> to zero copying performance. >> >> >> >> >> _______________________________________________ >> hybi mailing list >> hybi@ietf.org >> https://www.ietf.org/mailman/listinfo/hybi >> > _______________________________________________ > hybi mailing list > hybi@ietf.org > https://www.ietf.org/mailman/listinfo/hybi >
- [hybi] frame length encoding John Tamplin
- Re: [hybi] frame length encoding Shelby Moore
- Re: [hybi] frame length encoding gustav trede
- Re: [hybi] frame length encoding Willy Tarreau
- Re: [hybi] frame length encoding Scott Ferguson
- Re: [hybi] frame length encoding Roderick Baier
- Re: [hybi] frame length encoding Pieter Hintjens
- Re: [hybi] frame length encoding Shelby Moore
- Re: [hybi] frame length encoding Shelby Moore
- Re: [hybi] frame length encoding John Tamplin
- Re: [hybi] frame length encoding Pieter Hintjens
- Re: [hybi] frame length encoding Shelby Moore
- Re: [hybi] frame length encoding Shelby Moore
- Re: [hybi] frame length encoding Daniel Stenberg
- Re: [hybi] frame length encoding John Tamplin
- Re: [hybi] frame length encoding John Tamplin
- Re: [hybi] frame length encoding gustav
- Re: [hybi] frame length encoding Pieter Hintjens
- Re: [hybi] frame length encoding Daniel Stenberg
- Re: [hybi] frame length encoding John Tamplin
- Re: [hybi] frame length encoding John Tamplin
- Re: [hybi] frame length encoding Shelby Moore
- Re: [hybi] frame length encoding Pieter Hintjens
- Re: [hybi] frame length encoding Pieter Hintjens
- Re: [hybi] frame length encoding John Tamplin
- Re: [hybi] frame length encoding Shelby Moore
- Re: [hybi] frame length encoding John Tamplin
- Re: [hybi] frame length encoding Pieter Hintjens
- Re: [hybi] frame length encoding Shelby Moore
- Re: [hybi] frame length encoding Patrick McManus
- Re: [hybi] frame length encoding Shelby Moore
- Re: [hybi] frame length encoding Shelby Moore
- Re: [hybi] frame length encoding John Tamplin
- Re: [hybi] frame length encoding Shelby Moore
- Re: [hybi] frame length encoding Pieter Hintjens
- Re: [hybi] frame length encoding John Tamplin
- Re: [hybi] frame length encoding John Tamplin
- Re: [hybi] frame length encoding Pieter Hintjens
- Re: [hybi] frame length encoding gustav
- Re: [hybi] frame length encoding Shelby Moore
- Re: [hybi] frame length encoding Shelby Moore
- Re: [hybi] frame length encoding Pieter Hintjens
- Re: [hybi] frame length encoding Shelby Moore
- Re: [hybi] frame length encoding Patrick McManus
- Re: [hybi] frame length encoding Patrick McManus
- Re: [hybi] frame length encoding Shelby Moore
- Re: [hybi] frame length encoding Brian
- Re: [hybi] frame length encoding Roberto Peon
- Re: [hybi] frame length encoding Shelby Moore
- Re: [hybi] frame length encoding Shelby Moore
- Re: [hybi] frame length encoding Roberto Peon
- Re: [hybi] frame length encoding Shelby Moore
- Re: [hybi] frame length encoding Shelby Moore
- Re: [hybi] frame length encoding gustav
- [hybi] Fwd: frame length encoding Brian
- Re: [hybi] frame length encoding Shelby Moore
- Re: [hybi] frame length encoding Shelby Moore
- Re: [hybi] frame length encoding gustav
- Re: [hybi] frame length encoding Shelby Moore
- Re: [hybi] Fwd: frame length encoding Shelby Moore
- Re: [hybi] frame length encoding Shelby Moore
- Re: [hybi] frame length encoding John Tamplin
- Re: [hybi] frame length encoding gustav
- Re: [hybi] frame length encoding John Tamplin
- Re: [hybi] frame length encoding John Tamplin
- Re: [hybi] frame length encoding Shelby Moore
- Re: [hybi] frame length encoding John Tamplin
- Re: [hybi] frame length encoding John Tamplin
- [hybi] max frame size, was: frame length encoding Julian Reschke
- Re: [hybi] max frame size, was: frame length enco… John Tamplin
- Re: [hybi] frame length encoding Shelby Moore
- Re: [hybi] max frame size, was: frame length enco… gustav
- Re: [hybi] frame length encoding Shelby Moore
- Re: [hybi] frame length encoding gustav
- Re: [hybi] frame length encoding Salvatore Loreto
- Re: [hybi] frame length encoding John Tamplin
- Re: [hybi] frame length encoding Shelby Moore
- [hybi] frame length encoding Brian
- Re: [hybi] frame length encoding Scott Ferguson
- Re: [hybi] frame length encoding Salvatore Loreto
- Re: [hybi] frame length encoding John Tamplin
- Re: [hybi] frame length encoding John Tamplin
- [hybi] Fwd: frame length encoding Brian
- Re: [hybi] frame length encoding Shelby Moore
- Re: [hybi] frame length encoding John Tamplin
- Re: [hybi] frame length encoding Scott Ferguson
- Re: [hybi] frame length encoding Shelby Moore
- Re: [hybi] frame length encoding John Tamplin
- Re: [hybi] frame length encoding John Tamplin
- Re: [hybi] frame length encoding Salvatore Loreto
- Re: [hybi] max frame size, was: frame length enco… Pieter Hintjens
- Re: [hybi] frame length encoding Shelby Moore
- Re: [hybi] frame length encoding Shelby Moore
- Re: [hybi] frame length encoding John Tamplin
- Re: [hybi] max frame size, was: frame length enco… Scott Ferguson
- Re: [hybi] frame length encoding Brian
- Re: [hybi] frame length encoding Pieter Hintjens
- Re: [hybi] max frame size, was: frame length enco… Brian
- Re: [hybi] frame length encoding Shelby Moore
- Re: [hybi] frame length encoding Shelby Moore
- Re: [hybi] frame length encoding Shelby Moore
- Re: [hybi] frame length encoding gustav
- Re: [hybi] frame length encoding Shelby Moore
- Re: [hybi] frame length encoding Shelby Moore
- Re: [hybi] max frame size, was: frame length enco… Shelby Moore