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

"Eric Voit (evoit)" <evoit@cisco.com> Wed, 19 September 2018 22:59 UTC

Return-Path: <evoit@cisco.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 1705C130DCE for <netconf@ietfa.amsl.com>; Wed, 19 Sep 2018 15:59:14 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -14.51
X-Spam-Level:
X-Spam-Status: No, score=-14.51 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_HI=-5, SPF_PASS=-0.001, T_DKIMWL_WL_HIGH=-0.01, URIBL_BLOCKED=0.001, USER_IN_DEF_DKIM_WL=-7.5] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=cisco.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 FoGJ9q6sNdy7 for <netconf@ietfa.amsl.com>; Wed, 19 Sep 2018 15:59:11 -0700 (PDT)
Received: from alln-iport-3.cisco.com (alln-iport-3.cisco.com [173.37.142.90]) (using TLSv1.2 with cipher DHE-RSA-SEED-SHA (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 446D0130EA0 for <netconf@ietf.org>; Wed, 19 Sep 2018 15:59:11 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=@cisco.com; l=10228; q=dns/txt; s=iport; t=1537397951; x=1538607551; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=0Edly1B7H1f5T78FPMMJqzbcwHv42FmbNx7wlSoAOFU=; b=M7q2iv9vRRIuUCv6XP/uwM3KaYBvpP4OtVFZ1Q5lW9Yxh5ejshRUMWsh hMfjIZBDXh/8bxxJA8ppzm6whydNHcv9u3//cDGgl7Pa/YRV8b0ljDp4/ t5ylW+KnC3ni7tXj30ciqLp3KT0At55b6d+Etl9jLlRwz+mFMUu4CX2fC Q=;
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: A0AzAQAe1KJb/5hdJa1dGQEBAQEBAQEBAQEBAQcBAQEBAYFTgVsqZX8oCoNplEaCDYM9lQkLGAuESQIXgyQhNxUBAwEBAgEBAm0cDIU4AQEBAQIBIxFDAgULAgEIDgcDAgIJGgMCAgIwFAEQAgQOAQQIARaCN0yBeQgPpHmBLooUgQuJYheBQT+BEoMShGgdM4JHglcCiC2ULAkCiUWGUx+BQ4dThgSUSAIRFIElMyKBVXAVgycJghwXEYhIhT0BbwEOjDCBHgEB
X-IronPort-AV: E=Sophos;i="5.53,395,1531785600"; d="scan'208";a="174254625"
Received: from rcdn-core-1.cisco.com ([173.37.93.152]) by alln-iport-3.cisco.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 19 Sep 2018 22:59:10 +0000
Received: from XCH-RTP-015.cisco.com (xch-rtp-015.cisco.com [64.101.220.155]) by rcdn-core-1.cisco.com (8.15.2/8.15.2) with ESMTPS id w8JMx9ac018968 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=FAIL); Wed, 19 Sep 2018 22:59:10 GMT
Received: from xch-rtp-013.cisco.com (64.101.220.153) by XCH-RTP-015.cisco.com (64.101.220.155) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Wed, 19 Sep 2018 18:59:09 -0400
Received: from xch-rtp-013.cisco.com ([64.101.220.153]) by XCH-RTP-013.cisco.com ([64.101.220.153]) with mapi id 15.00.1395.000; Wed, 19 Sep 2018 18:59:09 -0400
From: "Eric Voit (evoit)" <evoit@cisco.com>
To: Martin Bjorklund <mbj@tail-f.com>
CC: "douglas@hubler.us" <douglas@hubler.us>, "andy@yumaworks.com" <andy@yumaworks.com>, "j.schoenwaelder@jacobs-university.de" <j.schoenwaelder@jacobs-university.de>, "netconf@ietf.org" <netconf@ietf.org>
Thread-Topic: [Netconf] activate-configured-subecription - WGLC subscribed-notifications-16
Thread-Index: AQHUSpBZpYtwPWXE1k2ur9Y/QhScQaTs+hAAgAKoIwCAAAD0gIAFUEkAgAG9N4CAAAwmAIAAICCA//++5KCAANjAgIAAa7UQ
Date: Wed, 19 Sep 2018 22:59:09 +0000
Message-ID: <1f83e10a61fc4a89bf5e1264566a3e29@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> <20180919.083805.1103902318002046181.mbj@tail-f.com>
In-Reply-To: <20180919.083805.1103902318002046181.mbj@tail-f.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
x-ms-exchange-transport-fromentityheader: Hosted
x-originating-ip: [10.118.56.234]
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: base64
MIME-Version: 1.0
X-Outbound-SMTP-Client: 64.101.220.155, xch-rtp-015.cisco.com
X-Outbound-Node: rcdn-core-1.cisco.com
Archived-At: <https://mailarchive.ietf.org/arch/msg/netconf/_t6I4A1Q5HEwn-YdNLlNdL_GuFc>
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 22:59:14 -0000

> From: Martin Bjorklund, September 19, 2018 2:38 AM
> 
> 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?

After an HTTP2 OK, the HTTP2 server has the ability to forward an unbounded number of HTTP2 Data Frames on the HTTP2 stream.  The stream is not considered complete until an END_STREAM is passed.   (Note this is independent of anything regarding HTTP2's PUSH_PROMISE.)

You can see an example flow in Figure 1 of draft-ietf-netconf-restconf-notif.  At IETF 97 we asked for some Feedback on this proposal. 
http://www.voit.org/IETF/Subscriptions-NETCONF-IETF97.ppt (see slide 14).
But I am not sure how much effort the WG should place here.   The work here is several years old, and the market has moved substantially since then.

> > 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.

Per your below, once SSE is applied a stream is blocked.  For that subscription, you still need to support 'modify-subscription' and 'delete-subscription' rpcs.

Beyond that, one thing to keep an eye on is the potential for bundling of event records from different subscriptions into a single transmittable notification message.  (Something like in draft-ietf-netconf-notification-messages.)   Anywhere such bundling occurs, the publisher will have to use a consistent HTTP2 stream across a set of subscriptions in order to preserve event record ordering.  In addition, all event records bundled will have to consistently use the same DSCP.

Note: this is another reason why it is a good idea to use separate HTTP2 streams for RESTCONF subscription RPC interactions, and for the streaming of event records.

> 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.

HTTP2 streams have far less overhead, lower setup latency, and more scalability than separate SSH channels.
 
> > 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?

And per above, this is a good reason to separate RESTCONF subscription RPCs from the HTTP2 stream used for events.   (The way it could be done is have modify-subscription and delete-subscriptions come in on a different stream, impacting the HTTP2 stream where establish-subscription started things off.  Again I am not recommending this for multiple reasons.)
 
> > 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? 

Yes.  My point was that nobody has proposed refining the spec to forcing of each RESTCONF transaction on different HTTP2 streams.

> The draft is silent on how to delete a
> subscription, and also on how modify-subscription is supposed to work.

Certainly these can come in on a different HTTP2 stream.
 
> 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?

There are mechanisms defined.  See 
draft-ietf-netconf-restconf-notif, Section 3.1. 
and
draft-ietf-netconf-subscribed-notifications, sections 1.3 & 5.3.

Eric

> 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.
> >