[hybi] Interface for Large Frames

"Bob Gezelter" <gezelter@rlgsc.com> Wed, 22 June 2011 21:58 UTC

Return-Path: <gezelter@rlgsc.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 DFCFF11E807B for <hybi@ietfa.amsl.com>; Wed, 22 Jun 2011 14:58:50 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.413
X-Spam-Level:
X-Spam-Status: No, score=-2.413 tagged_above=-999 required=5 tests=[AWL=0.186, BAYES_00=-2.599]
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 Qy83rQKF3sJy for <hybi@ietfa.amsl.com>; Wed, 22 Jun 2011 14:58:50 -0700 (PDT)
Received: from smtpoutwbe09.prod.mesa1.secureserver.net (smtpoutwbe09.prod.mesa1.secureserver.net [208.109.78.21]) by ietfa.amsl.com (Postfix) with SMTP id 02D6011E8073 for <hybi@ietf.org>; Wed, 22 Jun 2011 14:58:49 -0700 (PDT)
Received: (qmail 27929 invoked from network); 22 Jun 2011 21:58:48 -0000
Received: from unknown (HELO localhost) (72.167.218.134) by smtpoutwbe09.prod.mesa1.secureserver.net with SMTP; 22 Jun 2011 21:58:48 -0000
Received: (qmail 26488 invoked by uid 99); 22 Jun 2011 21:58:48 -0000
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain; charset="utf-8"
X-Originating-IP: 162.83.149.110
User-Agent: Web-Based Email 5.5.05
Message-Id: <20110622145847.ef1fc80126c74c6c202a919c41c7bb0b.c4cc844e80.wbe@email03.secureserver.net>
From: Bob Gezelter <gezelter@rlgsc.com>
To: hybi@ietf.org
Date: Wed, 22 Jun 2011 14:58:47 -0700
Mime-Version: 1.0
Subject: [hybi] Interface for Large Frames
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 21:58:51 -0000

The FILE methods in stdio.h include a "number of bytes" parameter. In
the context of the WebSocket protocol, the natural unit would appear to
be the frame. Once the frame has been retrieved by a user, then a
character-by-character state machine may (emphasis MAY) be appropriate,
however, the interface is best (most efficient) if entire frames can be
transferred at a time.

If programs must pull one character at a time, the efficiency will be
poor, with a large amount of overhead being consumed moving up and down
the call tree.

For an example of how a past message-based protocol deal with this
issue, Digital's NSP (see citation below) is an example. NSP handled
long messages by segmentation, passing the segments in order to user
program.

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

Digital Equipment Corporation (1984, July) “DECnet DIGITAL Network
Architecture NSP Functional Specification, Phase IV, Version 4.0.1”,
Retrieved from http://linux-decnet.sourceforge.net/docs/nsp401.txt on
March 23, 2011