Subject: Re: [netconf] Adoption call for draft-wang-netconf-adaptive-subscription

From: kun xie <[email-masked]>
Date: Sat, 5 Feb 2022 22:18:10 +0800

Hi WG,

Very useful work.
I support this draft, we are working on implementation of this draft.

Best Regards,
Kun Xie
Hunan University

----------------------------------------------------------------------------------------------
From: netconf [mailto:[email-masked]] On Behalf Of Mahesh
Jethanandani
Sent: Tuesday, January 11, 2022 6:07 AM
To: Netconf <[email-masked]<mailto:[email-masked]>>
Cc: [email-masked]<mailto:
[email-masked]>
Subject: [netconf] Adoption call for
draft-wang-netconf-adaptive-subscription

Hi WG,

The authors posted -08 version of the draft just before the new year, which
addressed the comments they received in IETF 112.

https://www.ietf.org/archive/id/draft-wang-netconf-adaptive-subscription-08.txt

This starts a 2 week poll ending on January 24, to decide whether this
document should be made a WG document or not. Please reply to this email
whether or not you support adoption of this draft by the WG. Indications
that the draft has been read will be also be appreciated. The Intended
Status of the draft is Standards Track.

A separate IPR call will be issued on the draft.

Thanks.

Mahesh Jethanandani
[email-masked]<mailto:[email-masked]>

---

From: Andy Bierman <[email-masked]>
Date: Sat, 5 Feb 2022 10:49:21 -0800

> I support this draft, we are working on implementation of this draft.
The problem statement seems to be that there is a need
to automatically change the "period" and "anchor-time" parameters for a
periodic datastore subscription.
The full functionality of <modify-subscription> is not being proposed here.

Here are a few technical issues to consider in your implementation.
Hopefully it will help you refine the draft and address these issues.

1) use of watermark not clear

It seems there is a "targeted data object" with a uint32 value that can be
used
to compare to this value to enable the XPath evaluation.
There is nothing in YANG Push that mentions any targeted data object.
It is not clear how this requirement is implemented (e.g. which instance
of the targeted data object is compared, and how often?)

In the example it appears there is a targeted data object:
/example-wifi-network-diagnostic

     <yp:datastore-xpath-filter
      xmlns:wnd="https://example.com/sample-data/1.0">
             /wnd:example-wifi-network-diagnostic
     </yp:datastore-xpath-filter>

The watermark value "-65" does not seem to match the targeted data object.

2) Evaluation of xpath-external-eval not clear

            leaf xpath-external-eval {
               type string;
               description
                 "A XPath string, representing a logical expression,
                  which can contain comparisons of datastore values
                  and logical operations in the XPath format.";
             }

It is not clear at all how to evaluate the XPath expression.
I assumed the context node=docroot and the server used
the boolean() function (if needed) to convert the result to
a true or false value. The draft says the targeted data node
is the context node but the example shows an absolute-path expression.

3) XPath is not stateful (and therefore not very useful for this problem)

The problem statement seems to be limited to absolute values of specific
leaf or leaf-list
data nodes.  The example uses the raw value of the "rssi" leaf within the
"server" list.
The program logic used by a client application is rarely this simple.
Usually at least a rate (e.g., two values retrieved at a known time
interval) is needed.

4) XPath instance information needed (but not shown here)

     /wnd:server[rssi&lt;-65]

The example shows a node-set expression that will evaluate to 'true'
if the one and only instance of the "rssi" leaf in the server container
passes the predicate test.

In any real use-case there will be list instances to handle.
I do not see how it works if any list keys are needed.
I guess you could limit the subscription so it never selected
more than one list entry.

5) Multiple adaptive-period entries per subscription can conflict

     <as:adaptive-subscriptions
      xmlns:as="urn:ietf:params:xml:ns:yang:ietf-adaptive-subscription">
      <as:adaptive-period>
       <as:xpath-external-eval>
             /wnd:server[rssi&lt;-65]
      </as:xpath-external-eval>
      <as:watermark>-65</as:watermark>
       <as:period>5</as:period>
      </as:adaptive-period>
      <as:adaptive-period>
       <as:xpath-external-eval>
             /wnd:server[rssi&gt;=-65]
          </as:xpath-external-eval>
       <as:watermark>-65</as:watermark>
       <as:period>60</as:period>
      </as:adaptive-period>
     </as:adaptive-subscriptions>

The example shows one entry setting the period to 5 and the other
setting it to 60.  What if both expressions are true (in a real YANG module
with list entries this is possible). Is there an expectation that the
expressions will never overlap value-sets?  How would the
server enforce that?

How often does the server check if the period should change?
How does the server evaluate multiple expressions over a stable dataset?
That seems very expensive to implement correctly.

Andy

Best Regards,
> The authors posted -08 version of the draft just before the new year,
> which addressed the comments they received in IETF 112.
>
>
> _______________________________________________
> netconf mailing list
> [email-masked]
> https://www.ietf.org/mailman/listinfo/netconf
>

---

From: "maqiufang (A)" <[email-masked]>
Date: Mon, 7 Feb 2022 14:09:30 +0000

Hi, Andy and Kun Xie:
Thank Kun for help implement this work.
Sorry for late reply, we have just got back from holiday. Thanks Andy for your valuable comments, much appreciated. Please also see my reply inline.

From: Andy Bierman [mailto:[email-masked]]
Sent: Sunday, February 6, 2022 2:49 AM
To: kun xie <[email-masked]>
Cc: Netconf <[email-masked]>; [email-masked]
Subject: Re: [netconf] Adoption call for draft-wang-netconf-adaptive-subscription

On Sat, Feb 5, 2022 at 6:18 AM kun xie <[email-masked]<mailto:[email-masked]>> wrote:
Hi WG,

Very useful work.

The problem statement seems to be that there is a need
to automatically change the "period" and "anchor-time" parameters for a periodic datastore subscription.
The full functionality of <modify-subscription> is not being proposed here.

[Qiufang] Yes, you are right. The intention here is to install subscription policy and allow a publisher to automatically adjust
the reporting period, e.g., the publisher automatically streams the telemetry data faster If the monitored metric is observed
to be degrading/worsening, rather than waiting for subscriber applications to feel it and deliver a modified subscription policy.

It seems there is a "targeted data object" with a uint32 value that can be used

[Qiufang] The targeted data object is specified as part of the “xpath-external-eval” in the YANG PUSH extension model,
which is a standard XPATH expression to be evaluated to true or false. Xpath itself has the capability to select a particular
data instance, e.g., /ex:system/ex:user[ex:name='fred']/ex:age.
I have to admit that it is confusing to set watermark as uint32 data type in the current model, which make people believe
the targeted data object is only allowed to be set to unint32 value, but watermark can be scalar variable of any data type
consistent with target data object. If we still keep it, I think we might consider to define watermark as a union data type.
Another choice is just to take watermark out.

Regarding which instance of the targeted data object is compared, I’d like to quote alarm list example in section 10.5.1.1 of RFC7950 to explain
"
     list alarm {
       ...
       leaf severity {
         type enumeration {
           enum cleared {
             value 1;
           }
           enum indeterminate {
             value 2;
           }
           enum minor {
             value 3;
           }
           enum warning {
             value 4;
           }
           enum major {
             value 5;
           }
           enum critical {
             value 6;
           }
         }
       }
     }
"
In this example, you will see XPath expression "/alarm[enum-value(severity) >= 5]" can selects multiple instance of alarms that are of
severity "major" or higher. So I think it is fine to return multiple instance of targeted data object using XPATH expression.

Regarding how often should a server compare the targeted data node with a watermark value,
I think it should be done at the end of each update period. That said, the server can capture stable
dataset using, e.g.,"datastore-subtree-filter" in each update period and then filter for the second time
using "xpath-external-eval" by comparing the targeted data object with the watermark.

[Qiufang] In the above example, "wnd:example-wifi-network-diagnostic" is the existing selection filter
(i.e., datastore-xpath-filter) defined by RFC8641, we can use this selection filter to get a stable dataset.
The targeted data object to be compared with “-65” is /wnd:server/rssi value.
It is a leaf with int8 data type. I think we need to change the type of watermark with any type of data
or union, rather than uint32 to make data type consistent.

               type string;

               description

             }

[Qiufang] If our understanding is correct, I think the context node should be root node in the
datastore, i.e., /wnd:example-wifi-network-diagnostic.
As we clarified above, the targeted data object is /wnd:example-wifi-network-diagnostic/wnd:server/wnd:rssi.
We can make this clear in the next version.

The problem statement seems to be limited to absolute values of specific leaf or leaf-list
data nodes.  The example uses the raw value of the "rssi" leaf within the "server" list.
The program logic used by a client application is rarely this simple.
Usually at least a rate (e.g., two values retrieved at a known time interval) is needed.

[Qiufang]First, the ”server” in our example is defined as a container here, rather than a list.
Second, we want to follow pragmatic approach and design XPATH expression based on current server capability
on XPATH parsing. Setting boundary or range for a target data object  seems a sensible use case.
But I am not sure we should make the time interval part of XPATH expression, we can discuss and consider if
there is a clear use case to understand how it works.
4) XPath instance information needed (but not shown here)

     /wnd:server[rssi&lt;-65]

[Qinfang]Take alarm list example in section 10.5.1.1 of RFC7950,
XPath expression "/alarm[enum-value(severity) >= 5]" can return mutiple instance of alarms that are of
severity "major" or higher.  I think it is okay to return multiple list instances.
In addition, in our case, we only care about whether XPATH expression is evaluate to be TRUE or FALSE,
whether it is one instance or multiple instance, it doesn't matter.

      <as:adaptive-period>

       <as:xpath-external-eval>

             /wnd:server[rssi&lt;-65]

       <as:period>5</as:period>

      </as:adaptive-period>

      <as:adaptive-period>

       <as:xpath-external-eval>

      </as:adaptive-period>

[Qiufang] Theoretically, there should be only one condition expression evaluated to true.
It is recommended for the xpath expression to be mutually exclusive, e.g., the watermark is a specific constant value,
a measured value is either higher or lower than the configured watermark or higher than the preconfigured watermark
or lower than preconfigure another watermark value.
If a client configures an adaptive subscription policy to include more than one conditions corresponding to different
update intervals, when all these conditions are evaluated to true or all the condition expressions are evaluated to false,
a server should flag with a RPC error. We will define one more RPC error in the next version. Thanks.

How often does the server check if the period should change?
How does the server evaluate multiple expressions over a stable dataset?
That seems very expensive to implement correctly.
[Qiufang] As I clarified earlier, a server can compare the targeted data object with watermark at the end of each streaming update period,
and switch to the corresponding period automatically if another XPath expression is evaluated to true. But in order to reduce CPU power
consumption, we can also allow the server to check it every two or three periods based on configuration.
When there are multiple XPATH expression corresponding to different update intervals, as we clarified earlier,
the multiple expressions can  be evaluated one by one.
For example, firstly using datastore-xpath-filter to get a stable dataset, and then evaluate the 1st external XPATH expression
and then evaluate the 2nd external XPATH expression, note that the 1st external XPATH expression and 2nd external XPATH
expression evaluation will not change the output dataset to be reported, we only care about the expression to be evaluate
to be true or false, and decide whether to switch to new update interval.
Note that we will not allow both 1st external XPATH expression and 2nd external XPATH expression to be evaluated to be true or false.

Best Regards,
Qiufang Ma

Andy

Best Regards,
Kun Xie
Hunan University

----------------------------------------------------------------------------------------------
From: netconf [mailto:[email-masked]<mailto:[email-masked]>] On Behalf Of Mahesh Jethanandani
Sent: Tuesday, January 11, 2022 6:07 AM
To: Netconf <[email-masked]<mailto:[email-masked]><mailto:[email-masked]<mailto:[email-masked]>>>
Cc: [email-masked]<mailto:[email-masked]><mailto:[email-masked]<mailto:[email-masked]>>
Subject: [netconf] Adoption call for draft-wang-netconf-adaptive-subscription

Hi WG,

The authors posted -08 version of the draft just before the new year, which addressed the comments they received in IETF 112.

This starts a 2 week poll ending on January 24, to decide whether this document should be made a WG document or not. Please reply to this email whether or not you support adoption of this draft by the WG. Indications that the draft has been read will be also be appreciated. The Intended Status of the draft is Standards Track.

Thanks.

Mahesh Jethanandani
[email-masked]<mailto:[email-masked]><mailto:[email-masked]<mailto:[email-masked]>>
_______________________________________________
netconf mailing list
[email-masked]<mailto:[email-masked]>
https://www.ietf.org/mailman/listinfo/netconf