Re: [Netconf] activate-configured-subecription - WGLC subscribed-notifications-16

Martin Bjorklund <mbj@tail-f.com> Wed, 19 September 2018 06:38 UTC

Return-Path: <mbj@tail-f.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 318D2130F66 for <netconf@ietfa.amsl.com>; Tue, 18 Sep 2018 23:38:12 -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, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
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 H7qtTNptshvf for <netconf@ietfa.amsl.com>; Tue, 18 Sep 2018 23:38:09 -0700 (PDT)
Received: from mail.tail-f.com (mail.tail-f.com [46.21.102.45]) by ietfa.amsl.com (Postfix) with ESMTP id A529912008A for <netconf@ietf.org>; Tue, 18 Sep 2018 23:38:09 -0700 (PDT)
Received: from localhost (unknown [173.38.220.61]) by mail.tail-f.com (Postfix) with ESMTPSA id 5E69B1AE02EF; Wed, 19 Sep 2018 08:38:06 +0200 (CEST)
Date: Wed, 19 Sep 2018 08:38:05 +0200
Message-Id: <20180919.083805.1103902318002046181.mbj@tail-f.com>
To: evoit@cisco.com
Cc: douglas@hubler.us, andy@yumaworks.com, j.schoenwaelder@jacobs-university.de, netconf@ietf.org
From: Martin Bjorklund <mbj@tail-f.com>
In-Reply-To: <48e4aac958d142669f4032737cdc4373@XCH-RTP-013.cisco.com>
References: <20180918.214022.2268667197465086195.mbj@tail-f.com> <CALAkb6cfiFugMpSdU+FUhu9zRsWkXttGRZq80VQtD9kM+wM4bg@mail.gmail.com> <48e4aac958d142669f4032737cdc4373@XCH-RTP-013.cisco.com>
X-Mailer: Mew version 6.7 on Emacs 24.5 / Mule 6.0 (HANACHIRUSATO)
Mime-Version: 1.0
Content-Type: Text/Plain; charset="utf-8"
Content-Transfer-Encoding: base64
Archived-At: <https://mailarchive.ietf.org/arch/msg/netconf/Jfr7PSuN3lQtceih74h9lfNZF2k>
Subject: Re: [Netconf] activate-configured-subecription - WGLC subscribed-notifications-16
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 06:38:12 -0000

Hi,

"Eric Voit (evoit)" <evoit@cisco.com> wrote:
> Hi Douglas,
> 
> From: Douglas Hubler, September 18, 2018 5:35 PM
> 
> 
> On Tue, Sep 18, 2018 at 3:40 PM Martin Bjorklund
> <mbj@tail-f.com<mailto:mbj@tail-f.com>> wrote:
> So it seems you support my point to make this draft use SSE.  Then if
> you use HTTP/2 you (the client) can simply create one HTTP/2 stream
> per
> notification stream.  This just falls out for free with HTTP/2.
> 
> yes, with caveat that I haven't attempted actual implementation yet.
> 
> <Eric> Agree that SSE over HTTP2 should work.  However to me using SSE
> here seems redundant as HTTP2 provides the necessary mechanisms.

Eric, can you explain how this would work w/o SSE?  Which mechanism in
HTTP/2 are you referring to?

> But
> I won’t get in the way if people really do want to go in this
> direction.
> 
> > I don't understand the details surrounding using an RPC to make a
> > dynamic
> > subscription.  Unless it's optional, then I can start to understand.
> 
> The client would POST to the "rpc" establish-subscripion, and in the
> reply to the POST is a "location" leaf (*) that contains a URI.  The
> client then GET this URI; this is the SSE event stream.
> 
> I see.  But if a client reads the YANG as
> 
>  module my-module {
>     ...
>     notification my-event {
>     }
> }
> 
> and client knew base stream URI was:
> 
>    /restconf/my-streams
> 
> Couldn't the client then deduce SSE URL as:
> 
>  GET  /restconf/my-streams/my-module:my-event?...

No.

With RFC 8040, the SSE URL is "stable", and if the client has read it
onve, it doesn't have to read it again (modulo some definition of
"stable").  The client can pass a filter in the GET request for the
SSE stream.

With the mechanism in this draft, the SSE URL will vary for each
request that has a different filter (at a minimum), since the filter
is passed a parameter to "establish-subscription" and the SSE URL is
sent back in the reply to "establish-subscription".  With the SSE URL,
the server may hide some state that corresponds to the filter params
etc.  (NOTE the word *may* in the previous sentence.  A server could
as well send back a SSE URL with the filter parameters embedded in the
URL...)

So in general, a client cannot assume that it can re-use a SSE URL
that was returned from a call to "establish-subscription".

> Thereby saving a trip to server?
> 
> <Eric> Yes, it would be possible to set something up to deduce the
> URL.  draft-ietf-netconf-restconf-notif doesn’t currently attempt this
> as being able to deduce the URL doesn’t stop the extra trip to the
> server.
> 
> The reason it doesn’t get rid of the extra round trip has to do with
> HTTP2 streams.  If we are going to use HTTP2, there is still a need to
> initiate the GET (or POST) in a separate stream other than the one
> being used for RESTCONF signaling.

I disagree.  If the client wants to have a separate HTTP/2 stream for
the notifs, then it should start such a stream.  If the client doesn't
want a separate HTTP/2 stream then that should be ok too.

Compare to NETCONF.  HTTP/2 streams are similar to SSH channels.  A
NETCONF client can open a separate SSH channel for each subscription,
or it can use a single channel.  Up to the client.

> Someone could write a specification which gets around this by forcing
> every RESTCONF transaction on its own HTTP2 stream.  But nobody has
> proposed such a specification.  Plus there are QoS scenarios where you
> might want multiple subscriptions on the same HTTP2 stream.

How would this work?  Once you start SSE on a stream, that stream is
"blocked", right?

> So if
> someone wanted this, we would still need to refine
> draft-ietf-netconf-restconf-notif requirements with the ability to
> modify or delete an existing subscription on a different HTTP2 stream.

Isn't this how it is supposed to work?  The draft is silent on how to
delete a subscription, and also on how modify-subscription is supposed
to work.

The draft is also silent on the lifetime of the result of
"establish-subscription".  With NETCONF, the subscription ends if the
session ends, but in RESTCONF there are no sessions, so how long does
the subscription live after it has been created?

Note that the approach in RFC 8040 is doesn't have this issue.


/martin


> This could be done of course, but someone would need to drive the
> definition.
> 
> Eric
> 
> 
> Would it be wrong for a client to make any assumptions?  I realize
> this ASSUMEs a transport protocol, but could/would there be a
> one-time, capability check the client could make to test for available
> transports?
> 
> I really appreciate your time explaining, I have been following the
> emails best I could but I think some basic things are still eluding
> me.
>