Re: [Netconf] RESTCONF/Notif/SSE payload delimiter question

Andy Bierman <andy@yumaworks.com> Wed, 19 September 2018 16:44 UTC

Return-Path: <andy@yumaworks.com>
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 E587A130E12 for <netconf@ietfa.amsl.com>; Wed, 19 Sep 2018 09:44:32 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.909
X-Spam-Level:
X-Spam-Status: No, score=-1.909 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, SPF_PASS=-0.001, 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=yumaworks-com.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 ApBC1Eg0Aof7 for <netconf@ietfa.amsl.com>; Wed, 19 Sep 2018 09:44:30 -0700 (PDT)
Received: from mail-lj1-x233.google.com (mail-lj1-x233.google.com [IPv6:2a00:1450:4864:20::233]) (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 56405130E18 for <netconf@ietf.org>; Wed, 19 Sep 2018 09:44:30 -0700 (PDT)
Received: by mail-lj1-x233.google.com with SMTP id q127-v6so5660351ljq.11 for <netconf@ietf.org>; Wed, 19 Sep 2018 09:44:30 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yumaworks-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=Sl3rdG6Zb9gMEY4hCBqvCKt5yS+YhSNaqt5cVT8C/fY=; b=fJeMDhLXMHNVO5Qhka4kmYSD8AF/we5CbpAXvLu3RVg7SQQdGUDbaQCz2OyelAwDWS dfTU8zfs5CSmQKFQAHLL466F1FyiEeR+Vrh/yfFP5iBabmnyD/6ShcPWG9pgrO0AhU2B 7OB2dGn4FZ2i9RKRDIclkXOGPd07tZaMj20YWNYv7195nWtm1DcB6NXLKGnvSPN1pW3X VCr/yIruc+K9nZl/xGtUTzNs76bR991U9/mSMkzUqskKn4LBmqFMte21Mw5gxLFBYk3K f+gMZ8HFy+lPvfjm6PX4wgTSjNhKFKecWDTSpMjoFtgklWFPMxio3CY1zM73xOZ78hEA 6eJw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=Sl3rdG6Zb9gMEY4hCBqvCKt5yS+YhSNaqt5cVT8C/fY=; b=hekHYT6SUgBerMcWOyft+grAckHEKx4SIY4QwDuxZKD8t3H2C/LUZMlP+2IxtsK0aN 0fc0dH8x2QWRiMV5JG4EJ+vGsgCqO7jN7cRH9ZHYd7wD8HUKqWVjZFk/mR6BkspacKwn L5gyfWCuTiHcxfJV4O2Sq8VxSfBwbRoB9Su6AQPdt9m5MZxxLD0L+16J5cY2m/5LGjKC xjlVzfdB0GVxXDUKHq6pcZ1I1RWxJdXWYP+Y1v5qqu569NNCQNuOk6lDIxf690t0h6Br cZ5cV0k0jo4TA+U8S6Hpa5Ce+zTX9TQuIj9EVp6QtfgEGUcmuTPfyW4eMNfQ7aUGCaHR WA4A==
X-Gm-Message-State: APzg51AVBW8Q2nSdITqoLdpytOEf8bJWCH3WfYE5QMDBF8MDQ0o1nC1x O8SwF+8vQEkbcbXfPvGEqFYDoe5Eb8e+AXV04jnjrMCvn/A=
X-Google-Smtp-Source: ANB0VdaO6FuNkPfD7hLuZ0thJZFVyIUSSje7S7Kq8KppvWKwc8iEeXTMLIroaRL3ekbvA7LXkeE/Y6Las1SdNWbODtg=
X-Received: by 2002:a2e:5687:: with SMTP id k7-v6mr22852526lje.105.1537375468309; Wed, 19 Sep 2018 09:44:28 -0700 (PDT)
MIME-Version: 1.0
Received: by 2002:a19:6a19:0:0:0:0:0 with HTTP; Wed, 19 Sep 2018 09:44:27 -0700 (PDT)
In-Reply-To: <CALAkb6dvinW1SoWOhXKDKAwHYx2n5AnbRY7mUn29gZhJxhf3jA@mail.gmail.com>
References: <CALAkb6dvinW1SoWOhXKDKAwHYx2n5AnbRY7mUn29gZhJxhf3jA@mail.gmail.com>
From: Andy Bierman <andy@yumaworks.com>
Date: Wed, 19 Sep 2018 09:44:27 -0700
Message-ID: <CABCOCHSu20MtQ4w=o4HObi3KQi6O5Aa-gSmaSSRmBd97jfXSJA@mail.gmail.com>
To: Douglas Hubler <douglas@hubler.us>
Cc: Netconf <netconf@ietf.org>
Content-Type: multipart/alternative; boundary="000000000000acf92a05763c1e8b"
Archived-At: <https://mailarchive.ietf.org/arch/msg/netconf/PQ6_6UakV3QnLmY6lvvPTBsrQU0>
Subject: Re: [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:44:33 -0000

On Wed, Sep 19, 2018 at 9:38 AM, Douglas Hubler <douglas@hubler.us> wrote:

> 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.
>
>
>
>
You use a blank line for this purpose:

 https://www.w3.org/TR/eventsource/


Andy


> _______________________________________________
> Netconf mailing list
> Netconf@ietf.org
> https://www.ietf.org/mailman/listinfo/netconf
>
>