Re: [hybi] Max frame size

Scott Ferguson <ferg@caucho.com> Wed, 22 June 2011 15:58 UTC

Return-Path: <ferg@caucho.com>
X-Original-To: hybi@ietfa.amsl.com
Delivered-To: hybi@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id EF6C911E8125 for <hybi@ietfa.amsl.com>; Wed, 22 Jun 2011 08:58:40 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -0.185
X-Spam-Level:
X-Spam-Status: No, score=-0.185 tagged_above=-999 required=5 tests=[BAYES_40=-0.185]
Received: from mail.ietf.org ([64.170.98.30]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 7RFhyMiVFsjG for <hybi@ietfa.amsl.com>; Wed, 22 Jun 2011 08:58:40 -0700 (PDT)
Received: from nm5-vm0.bullet.mail.sp2.yahoo.com (nm5-vm0.bullet.mail.sp2.yahoo.com [98.139.91.204]) by ietfa.amsl.com (Postfix) with SMTP id 7E3D311E80C7 for <hybi@ietf.org>; Wed, 22 Jun 2011 08:58:40 -0700 (PDT)
Received: from [98.139.91.68] by nm5.bullet.mail.sp2.yahoo.com with NNFMP; 22 Jun 2011 15:58:40 -0000
Received: from [98.139.91.10] by tm8.bullet.mail.sp2.yahoo.com with NNFMP; 22 Jun 2011 15:58:40 -0000
Received: from [127.0.0.1] by omp1010.mail.sp2.yahoo.com with NNFMP; 22 Jun 2011 15:58:40 -0000
X-Yahoo-Newman-Id: 422962.8506.bm@omp1010.mail.sp2.yahoo.com
Received: (qmail 13752 invoked from network); 22 Jun 2011 15:58:40 -0000
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1308758320; bh=OXkfMCfrliYiPB3xId7pqe764cPara8Jp09KG/UhinE=; h=X-Yahoo-Newman-Property:X-YMail-OSG:X-Yahoo-SMTP:Received:Message-ID:Date:From:User-Agent:MIME-Version:To:Subject:References:In-Reply-To:Content-Type:Content-Transfer-Encoding; b=gaL+qSPYpdZxbmeG3Ix0MznLH8h+p+evfHaJnDxIaz9RCtAi/5BMry7kj6mDQ3ns2dpdygdN0LSsGuiYmMB3zu5QZEQhiRnuyPjMxA/kMa29g3eVH4imqXvtVwy7akFycUOXIehde5IcPAVEiHNu8Fc3oOd4RrOeWcZtqR2XiCg=
X-Yahoo-Newman-Property: ymail-3
X-YMail-OSG: IYJDEwMVM1k5LkMbn9pW0gUxWevI93P_7Ax9O3gushCtNMt A5fbFmQlq3omSMChgT5DvrQZG_ef__ewAHq6z6rmLoWp6GzzCwogRbzvpZK. 6AyNTf2yr1xosapCmuQuVoRBlR8NKWjLKQF4qGHr8DLXt3tdO_UnK.G.oCd6 lKo8z81m98a2zKIbeySVsgas6F3C.cQc01uE6q0R9OSoM.Tnm5WditexWaxm _7lFyGD7uQ_1S_wFbAESDbqyC8FIz7nZfRYdMjo5wcSdGTR3s8depYaGBgPH SXNGCp2Fo6sOurRqCRltEDSt2egsZ5O8fjMlyuvvaYJnPDJ.umXRZbWhF5kB u2MtEvwrXaLWunwKKe.mgxHUlx740zjZBOwknNUoI5w--
X-Yahoo-SMTP: L1_TBRiswBB5.MuzAo8Yf89wczFo0A2C
Received: from [192.168.1.11] (ferg@66.92.8.203 with plain) by smtp111.biz.mail.sp1.yahoo.com with SMTP; 22 Jun 2011 08:58:40 -0700 PDT
Message-ID: <4E021121.5050409@caucho.com>
Date: Wed, 22 Jun 2011 08:58:25 -0700
From: Scott Ferguson <ferg@caucho.com>
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.13) Gecko/20101208 Thunderbird/3.1.7
MIME-Version: 1.0
To: hybi@ietf.org
References: <1308720860.5393.18.camel@tot.local> <20110622060514.GF18843@1wt.eu> <1308738811.11941.704.camel@vulcan.aspl.local> <20110622122521.GA22198@1wt.eu> <1308756913.11941.823.camel@vulcan.aspl.local>
In-Reply-To: <1308756913.11941.823.camel@vulcan.aspl.local>
Content-Type: text/plain; charset="ISO-8859-15"; format="flowed"
Content-Transfer-Encoding: 7bit
Subject: Re: [hybi] Max frame size
X-BeenThere: hybi@ietf.org
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: Server-Initiated HTTP <hybi.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/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: Wed, 22 Jun 2011 15:58:41 -0000

On 06/22/2011 08:35 AM, Francis Brosnan Blazquez wrote:
>
>> I don't see the difference with frames. You can call the application saying
>> "hey, here come 5 GB of data, please read them from this connection handle".
> Ok, the way it should be done, assuming we have a message/frame oriented
> protocol, is that the app level register a handler which is called every
> time a single frame is received.

No. It's like a HTTP chunked POST, where the application receives a 
stream of data, not the underlying HTTP chunks.

A server (or client) which exposes the frames as its primary API is 
doing it wrong.

> This way, the handler is called, for example, each 4k, so the handler
> can receive those 5GB with minimum memory allocation and with the
> security it handles messages not raw access to a file descriptor (with
> the security and code complexity implications it has).

See stdio.h, specifically the FILE methods like fdopen, fread, fgets, 
etc. That's the level of abstraction the application needs to see.

-- Scott

>> Regards,
>> Willy
>>