Re: [Netconf] SSE and HTTP/2 in restcon-notif

Andy Bierman <andy@yumaworks.com> Thu, 27 September 2018 21:33 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 5645D130E8F for <netconf@ietfa.amsl.com>; Thu, 27 Sep 2018 14:33:37 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.9
X-Spam-Level:
X-Spam-Status: No, score=-1.9 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIMWL_WL_MED=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, 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 qPlWZuxpGrIL for <netconf@ietfa.amsl.com>; Thu, 27 Sep 2018 14:33:34 -0700 (PDT)
Received: from mail-lf1-x136.google.com (mail-lf1-x136.google.com [IPv6:2a00:1450:4864:20::136]) (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 9EA56130F1C for <netconf@ietf.org>; Thu, 27 Sep 2018 14:33:33 -0700 (PDT)
Received: by mail-lf1-x136.google.com with SMTP id g89-v6so3361639lfl.5 for <netconf@ietf.org>; Thu, 27 Sep 2018 14:33:33 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yumaworks-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=+ITM2pg4YQJqgDJ7dRjwFGvOsiLOSRFGyrlTTgcn6QI=; b=jFM+Q/9YDaTd//HUUSdJ1y6KsIMSHHX8tYvlFZMjBxTsF56I5YG0dn4/MToanWzCqP RtVfUOx9JUb6G3I+Fb/L/nxt4QnkCEthtENd70LT7Uu44Y/jUfBEQiZo2PLqOozyWaED c7T39yo3HUi+t9PbfJ8PQ5kAVdgbEE14UYsBkd3YIz4DXPTWfQwtX7jArJ6+zbcNGGs0 isdD+897kWssodEm6sXzTXISOlh4GwLz5YQe/Y9tFxmrGu8PEA/gA7V1g5YuPjjHi+NR /5+C3daszBF9HIF+fnmzjsPINpFLpa6YMeze9yJIHuoboERavRdCa58f6qUCJ1BmNI1h 2v/A==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=+ITM2pg4YQJqgDJ7dRjwFGvOsiLOSRFGyrlTTgcn6QI=; b=I/MwF8suw7lRciACa5hoANXJlENyuT2zVnxM/QqjvBKYG32NAzxKjtMNH+n5mzv0QR 9Bgs2wQDXfFobhWkP5VZN8oEjMc+XWr3+nq3jhVsZVfF5QoMo9mAgpHyucSQH49kea7s Q0xLXSiSDr4fb+tQek4QjCh34QVgJ9gO913WmtdfrkHD28mIYcHrwpJugJh8u1na6rDD pfwB0UeFoy8SngM4y67oCszHG24TGR0D0F+235Zhcyjm8vDLjDL+EO8o98OFLp5COWBu ntyahoi8p2IcK19sMf44L60Qw/yuJyVl+KVdU6LUGvrJ2vUCMyJUNsZqHBv4/vdIcznb 7Brg==
X-Gm-Message-State: ABuFfoiX/hHcgsK6zaXyez/RvEf4NJ9BQetrNYczK15COf8KIxr5ixbP HhMJtli//uv7Wm/l0SIHQaO7f5ml4T9zUqMo0QZutQ==
X-Google-Smtp-Source: ACcGV62fcHQVOYvlJDrsXopTRwbx4OrK+Y3imz3Ab3M5LL0EG7FJNOdrlrpcMUN8DYo7OWG8G41Euy+skDsTiGUz23w=
X-Received: by 2002:a19:3bcf:: with SMTP id d76-v6mr8296722lfl.126.1538084011535; Thu, 27 Sep 2018 14:33:31 -0700 (PDT)
MIME-Version: 1.0
References: <B51DAF9C-4294-44BF-9138-7145E61F42AB@juniper.net> <20180927.224854.1626742691261140238.mbj@tail-f.com>
In-Reply-To: <20180927.224854.1626742691261140238.mbj@tail-f.com>
From: Andy Bierman <andy@yumaworks.com>
Date: Thu, 27 Sep 2018 14:33:20 -0700
Message-ID: <CABCOCHSrEiibcUp99ho60FJr37RDLho+H14oc4htELjSHZqKvg@mail.gmail.com>
To: Martin Bjorklund <mbj@tail-f.com>
Cc: Kent Watsen <kwatsen@juniper.net>, Netconf <netconf@ietf.org>, rrahman=40cisco.com@dmarc.ietf.org
Content-Type: multipart/alternative; boundary="00000000000024832e0576e117bf"
Archived-At: <https://mailarchive.ietf.org/arch/msg/netconf/BcIO7WAWCFBAJ7_troniKF6C3dM>
Subject: Re: [Netconf] SSE and HTTP/2 in restcon-notif
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: Thu, 27 Sep 2018 21:33:37 -0000

On Thu, Sep 27, 2018 at 1:49 PM Martin Bjorklund <mbj@tail-f.com> wrote:

> Hi,
>
> Kent Watsen <kwatsen@juniper.net> wrote:
> >
> > <chair plea>
> >   Can we try to have a Last Call worthy version on the restcon-notif
> >   draft by mid next week?  The chairs would like to Last Call both
> >   NN + RN together if possible...
> > </chair plea>
> >
> >
> > As I understand it, there are three issues (any others?) as follows:
> >
> > 1) SSE
> >
> >    Actually, with Reshad's last response, this may not be an issue
> >    anymore.  Just in case, I also feel that the *restconf*-notif draft
> >    needs to align as closely as possible to the RFC 8040 notification
> >    solution.  Ideally, we just use SSE outright and we're done.
>
> +1
>

+1


>
> > 2) HTTP/2
> >
> >    Not sure where this landed, but my thoughts are this draft needs to
> >    support both 1.1 and 2.0.
>
> Why?  I don't really understand why restconf-notif, or RESTCONF for
> that matter, need special handling for HTTP/2.  Won't RESTCONF "just
> work" with HTTP/2?


Agreed


>
>
>    I envision the variation being relatively
> >    minor, something along the line of:
> >
> >      if 1.1, then SSE.
> >      if 2.0, client MAY open a stream first.
> >
> > 3) resource URIs
> >
> >    This is likely where we need to spend the most time. We know that
> >    establish-subscription returns a dynamically created URI, comparable
> >    to what a client might get from
> ietf-restconf-monitoring:restconf-state\
> >    /streams/stream/access/location.
>
> But it is not quite comparable.  In the 8040 solution, the location
> url is static, and then query parameters are provided by the client
> in the POST to the SSE location.  Thus, the server can free any
> resources associated with the filter when the connection is
> terminated.
>
>

The RESTCONF procedure starts with the client
examining /restconf-state/streams to determine stream and its location URL
How does this monitoring information relate to the new solution?
I assume both the old and new procedures can be supported by the same
server.
Is it just ignored for a new subscription?

Since all SSE data is always media type test/event-stream, each stream
entry indicates
its secondary encoding format. This leaf is type string, and only 'xml' and
'json' are supported
in RFC 8040. The establish-subscription RPC has its own leaf for this
purpose.



>
> > Are there just two issues?
> >
> >    a) how does the server ensure only said client accesses the resource?
>
> The server cannot know this.  I guess it can verify the username.  But
> does it matter?
>


It matters if the server wants to pre-check the subscription for NACM issues
when it is created.

I want to make sure the same username is used, and only 1 session
is doing a GET on the subscription resource.



>
> >    b) how does the server know when it's okay to reclaim the resource,
> >       when a client doesn't "delete" or "kill" the subscription?
>
> Yes this is not clear.
>
>

Note that the RESTCONF solution avoids this problem because
only the GET on the SSE URI causes resources to be allocated for a
subscription.

One solution proposal:
  - use a timeout and if the client does not connect within that time, the
subscription
    will be suspended or deleted.
 - if the client terminates the SSE GET then either suspend or terminate
the subscription



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