Re: [hybi] hum #3: Message

Julian Reschke <julian.reschke@gmx.de> Fri, 06 August 2010 11:45 UTC

Return-Path: <julian.reschke@gmx.de>
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 C03943A69E8 for <hybi@core3.amsl.com>; Fri, 6 Aug 2010 04:45:27 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -104.04
X-Spam-Level:
X-Spam-Status: No, score=-104.04 tagged_above=-999 required=5 tests=[AWL=-1.441, BAYES_00=-2.599, USER_IN_WHITELIST=-100]
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 VWgE-Z99joV9 for <hybi@core3.amsl.com>; Fri, 6 Aug 2010 04:45:24 -0700 (PDT)
Received: from mail.gmx.net (mailout-de.gmx.net [213.165.64.22]) by core3.amsl.com (Postfix) with SMTP id 9CB023A6984 for <hybi@ietf.org>; Fri, 6 Aug 2010 04:45:16 -0700 (PDT)
Received: (qmail invoked by alias); 06 Aug 2010 11:45:41 -0000
Received: from mail.greenbytes.de (EHLO [192.168.1.147]) [217.91.35.233] by mail.gmx.net (mp022) with SMTP; 06 Aug 2010 13:45:41 +0200
X-Authenticated: #1915285
X-Provags-ID: V01U2FsdGVkX19upRFDyC5uvT15agzPPAheu6l9Xl2nFhUsd0LIMM ljbnSMtqVrrDl5
Message-ID: <4C5BF5DB.1010400@gmx.de>
Date: Fri, 06 Aug 2010 13:45:31 +0200
From: Julian Reschke <julian.reschke@gmx.de>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.1.11) Gecko/20100711 Lightning/1.0b1 Thunderbird/3.0.6
MIME-Version: 1.0
To: Arman Djusupov <arman@noemax.com>
References: <4C5AE93D.4040803@ericsson.com> <Pine.LNX.4.64.1008051758290.5947@ps20323.dreamhostps.com> <AANLkTik0kbh14s2JZARY2MFh0iNGV7H+B4Px4yG+wX44@mail.gmail.com> <71BCE4BF-D3F6-4F94-BE76-306BDF6A2E67@apple.com> <Pine.LNX.4.64.1008051930160.5947@ps20323.dreamhostps.com> <4C5B1695.6070704@gmx.de> <F8E2F702-9F74-4316-B3B2-D5A731409ABF@apple.com> <AANLkTin=gO9D8K5NVhqCRKki-jrDmTYqF-gBjp9X41GN@mail.gmail.com> <4C5BF15E.1090608@noemax.com>
In-Reply-To: <4C5BF15E.1090608@noemax.com>
Content-Type: text/plain; charset="ISO-8859-1"; format="flowed"
Content-Transfer-Encoding: 7bit
X-Y-GMX-Trusted: 0
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] hum #3: Message
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: Fri, 06 Aug 2010 11:45:28 -0000

On 06.08.2010 13:26, Arman Djusupov wrote:
> Pieter Hintjens wrote:
>> Agree with both these points. If a sender does fragment a large
>> message, they ALSO need to specify the full size up front, for the
>> same reasons we specify the frame size up front. You want to avoid
>> sentinel-based reads.
>
> If the sender knows the size of the message upfront then there is no
> point to fragment it. The sender can just specify the total length of
> the message and keep pumping data into the connection, while the reader
> can count the received bytes and so know where the message ends. The
> whole reason of having fragmentation and framing is to remove the need
> to know the full size of the message prior to sending it.
> Arman

There are more reasons. Just stating the length upfront and then sending 
the data as-is does not allow signaling an error when something bad 
happens (except by dropping the connection). This requires chunking, or 
some other way to signal the error condition.

Best regards, Julian