[Netconf] RESTCONF/Notif/SSE payload delimiter question

Douglas Hubler <douglas@hubler.us> Wed, 19 September 2018 16:38 UTC

Return-Path: <douglas@hubler.us>
X-Original-To: netconf@ietfa.amsl.com
Delivered-To: netconf@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 6D7621310F1 for <netconf@ietfa.amsl.com>; Wed, 19 Sep 2018 09:38:42 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.908
X-Spam-Level:
X-Spam-Status: No, score=-1.908 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, T_DKIMWL_WL_MED=-0.01, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=hubler-us.20150623.gappssmtp.com
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id hoxA5pxLhtAm for <netconf@ietfa.amsl.com>; Wed, 19 Sep 2018 09:38:40 -0700 (PDT)
Received: from mail-it0-x22b.google.com (mail-it0-x22b.google.com [IPv6:2607:f8b0:4001:c0b::22b]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id E9919131106 for <netconf@ietf.org>; Wed, 19 Sep 2018 09:38:39 -0700 (PDT)
Received: by mail-it0-x22b.google.com with SMTP id p79-v6so9166058itp.3 for <netconf@ietf.org>; Wed, 19 Sep 2018 09:38:39 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hubler-us.20150623.gappssmtp.com; s=20150623; h=mime-version:from:date:message-id:subject:to; bh=tDQ+xvxemThywc/Y9Ko23rc5OHE8Y0SiPf3md0dFww4=; b=05ZKenD3GpghdllOBNpHPBzq1nJpf8iN4xBoyp5ljrl5G6tUSGEUoN2zr6Jhd+4n4A CDf3iLNsDZExZ5KWsl5q3zZZigF3BcqHx0NxYXjWr0DG9ewlIJLi70/obR0U8RRswosA pnOuUWYVaJD+HRMhOZzeDNj38AXjPf0WMnRMg1ByHYRZYHI/CtjYq+CuAuBO8ovWTwvb kHXFRdu8R8Z06z4QJ1RAR1vaxVS0cfesgwgmUvOSnLwhXlgbElVLAOFVejpZstY48DWR w9z9BqPs8TyhrQd8y3X7T+Z1Znrfxyx2DmtQepFT/PQuotc5eLMlOsK/hYL/mIj1JWVK UB0w==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=tDQ+xvxemThywc/Y9Ko23rc5OHE8Y0SiPf3md0dFww4=; b=JzrDKO/yZ8HJ/gBlkEGr7lh5RjlAGUIl9BlRZwjBkGGUQB9fT9WDMAANdsWeBqfmq+ meNTKOx/fpc2j/6YtxpvQ/q8alfPbJtwuOMz8eAp7gZ1hsiG/Irq+RRGEvCMcB9ZEmE0 /OpjzCouemI4Ji4PoIumkTuAPxU8IUVQUmluEuUi6PKBMyVRsASqqn2PtCHuPshmeLtL qoHoD24cMZVaCVwQ5ODeDjpxeh/SPLDOGKrCTz/c14yopaH/56m2yWVb7G9MRgxu0f88 2xvU83UsE2IaWHWQrMuMhk3Q7ozdDDIJABEOVj+45aBmV0udL9QdS2PcTx9ynLx1sW2J 3s1A==
X-Gm-Message-State: APzg51CjIy1eCnn57z2d7FGRKaL3zoQKW5cGGkV+o1GOId/RdB3SOmfh mb09MyKk98SUTcszJdP8ne9WbZIhLao=
X-Google-Smtp-Source: ANB0VdZoasUaamYLLvx3m8FDV02BzgysS1CMgR8Lg/W/yFznzTs226C1fxIjjPETFCC5Jy/gYUfsLg==
X-Received: by 2002:a24:c48a:: with SMTP id v132-v6mr23058330itf.72.1537375118937; Wed, 19 Sep 2018 09:38:38 -0700 (PDT)
Received: from mail-it0-f49.google.com (mail-it0-f49.google.com. [209.85.214.49]) by smtp.gmail.com with ESMTPSA id a11-v6sm6001162ita.21.2018.09.19.09.38.37 for <netconf@ietf.org> (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 19 Sep 2018 09:38:37 -0700 (PDT)
Received: by mail-it0-f49.google.com with SMTP id d10-v6so9137393itj.5 for <netconf@ietf.org>; Wed, 19 Sep 2018 09:38:37 -0700 (PDT)
X-Received: by 2002:a24:d651:: with SMTP id o78-v6mr21372312itg.140.1537375117431; Wed, 19 Sep 2018 09:38:37 -0700 (PDT)
MIME-Version: 1.0
From: Douglas Hubler <douglas@hubler.us>
Date: Wed, 19 Sep 2018 12:38:26 -0400
X-Gmail-Original-Message-ID: <CALAkb6dvinW1SoWOhXKDKAwHYx2n5AnbRY7mUn29gZhJxhf3jA@mail.gmail.com>
Message-ID: <CALAkb6dvinW1SoWOhXKDKAwHYx2n5AnbRY7mUn29gZhJxhf3jA@mail.gmail.com>
To: Netconf <netconf@ietf.org>
Content-Type: multipart/alternative; boundary="000000000000c2da6705763c09f3"
Archived-At: <https://mailarchive.ietf.org/arch/msg/netconf/mygrHP2ythnNg3LZBka3_mpLJm8>
Subject: [Netconf] RESTCONF/Notif/SSE payload delimiter question
X-BeenThere: netconf@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: Network Configuration WG mailing list <netconf.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/netconf>, <mailto:netconf-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/netconf/>
List-Post: <mailto:netconf@ietf.org>
List-Help: <mailto:netconf-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/netconf>, <mailto:netconf-request@ietf.org?subject=subscribe>
X-List-Received-Date: Wed, 19 Sep 2018 16:38:48 -0000

While implementing client reader for notification events in an SSE stream,
I believe I need to know where one event payload ends and another event
payload starts.  I don't believe I can rely on zero bytes left in buffer
should the events be back-to-back.

While reading RESTCONF RFC
   https://tools.ietf.org/html/rfc8040#section-6.4
It mentions a server *could* use a line terminator, but doesn't not specify
the server *must* use one.

Stream-based XML/JSON reader, while possible, might be putting a burden on
client readers.