Re: [hybi] Framing take IV [why fragment]

Scott Ferguson <ferg@caucho.com> Thu, 05 August 2010 16:07 UTC

Return-Path: <ferg@caucho.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 522103A69A9 for <hybi@core3.amsl.com>; Thu, 5 Aug 2010 09:07:10 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.599
X-Spam-Level:
X-Spam-Status: No, score=-2.599 tagged_above=-999 required=5 tests=[AWL=0.000, 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 Tw2P-pZeKISD for <hybi@core3.amsl.com>; Thu, 5 Aug 2010 09:07:09 -0700 (PDT)
Received: from smtp111.biz.mail.re2.yahoo.com (smtp111.biz.mail.re2.yahoo.com [66.196.116.96]) by core3.amsl.com (Postfix) with SMTP id 318A73A67C3 for <hybi@ietf.org>; Thu, 5 Aug 2010 09:07:09 -0700 (PDT)
Received: (qmail 67907 invoked from network); 5 Aug 2010 16:07:37 -0000
Received: from [192.168.1.11] (ferg@66.92.8.203 with plain) by smtp111.biz.mail.re2.yahoo.com with SMTP; 05 Aug 2010 09:07:36 -0700 PDT
X-Yahoo-SMTP: L1_TBRiswBB5.MuzAo8Yf89wczFo0A2C
X-YMail-OSG: 8Tb0x80VM1llnEd99DUldZ8W_j1yl1tkj6C3Ndzt5GaOZyV s192Fd2swuZc784ZT9S4RCAw59TV2TMMXXm1_v3BAc6ve.xq6M4R2Ju5twZd 7cIlozEACjI26iQiI1zBKottLVCSMHQTVLF5ANDkx.IwbetGGu.2gDQDzAcE QfT4prnOtH7pKeiInGC6UlL8IoSEa_LDqc1r0aZ6SX58FZqRapL13cOUFVoU 1i__RH4coATVZ20BjLublsXiIp1OTNGWHl4Rw8VYMvArazDoOYF5jt.7z50g g9W62OOSXu3SC1LqzsACLHXSDxECK8STTupJe8bTsPiHoryOFwt9fDWsnq7P BejfDyILatikK731aVWAb3qx_r4_JmDUjdofaO8yGhy5s.nKM1EpSzVjbOW0 uAcK9GKAWNFP9PTz3kA--
X-Yahoo-Newman-Property: ymail-3
Message-ID: <4C5AE1C2.7080607@caucho.com>
Date: Thu, 05 Aug 2010 09:07:30 -0700
From: Scott Ferguson <ferg@caucho.com>
User-Agent: Thunderbird 2.0.0.24 (X11/20100411)
MIME-Version: 1.0
To: Dave Cridland <dave@cridland.net>
References: <AANLkTinyrDoG5d_Ur6HVRy=SgMPjLzJtpJ++Ye=1DQdj@mail.gmail.com> <Pine.LNX.4.64.1008040050040.5947@ps20323.dreamhostps.com> <1280932393.7561.271.camel@tng> <2286.1281017237.786534@puncture> <4C5AD81F.8080800@caucho.com> <2286.1281023378.491785@puncture>
In-Reply-To: <2286.1281023378.491785@puncture>
Content-Type: text/plain; charset="ISO-8859-1"; format="flowed"
Content-Transfer-Encoding: 7bit
Cc: Server-Initiated HTTP <hybi@ietf.org>
Subject: Re: [hybi] Framing take IV [why fragment]
X-BeenThere: hybi@ietf.org
X-Mailman-Version: 2.1.9
Precedence: list
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: Thu, 05 Aug 2010 16:07:10 -0000

Dave Cridland wrote:
> On Thu Aug  5 16:26:23 2010, Scott Ferguson wrote:
>> Dave Cridland wrote:
>>> On Wed Aug  4 15:33:13 2010, Patrick McManus wrote:
>>>
>>>> Benefits of streaming:
>>>>
>>>> * Reduced memory consumption on the sender in cases where the 
>>>> message is
>>>> being "passed through". A service that does a large database query 
>>>> is a
>>>> good example here - the results can be passed back as they are found
>>>> even before you know how many there are.
>>>>
>>>>
>>> No, because the receiver cnnot process portions of messages - at 
>>> least with our current API. And you can achieve this behaviour by 
>>> sending multiple messages anyway.
>>
>> Of course it can. Browser writers are fully capable of buffering the 
>> frames until the message is complete and then giving the complete 
>> string to the application.
>>
> Right, giving no benefit to the application, which was my point.

The bulk of the application is on the server.

The browser has infinite memory, infinite CPU, and a single user. That's 
why they could chose a string-based API instead of a streaming API.

The bulk of any websocket application will be on the server, just like 
the bulk of any HTTP application is on the server now. The bulk of 
application developers will be on the server, just like HTTP now. The 
bulk of the application complexity will be on the server.  Anything that 
makes the server application easier to develop is a benefit to the 
application.

Server code like PHP scripts are built around a solid streaming 
programming model, and that's been enormously successful, particularly 
for the "amateur" programmers. Throwing that successful programming 
model away with no good reason is absurd.

-- Scott

>
>> The browser developers never complained about the sentinel framing 
>> and it has the exact same buffering requirement.
>
> I'm not saying it doesn't. :-)
>
> I am saying that this means this is not a good argument for chunking.
>
> Dave.