Interpretation of "updates_only" flag in the gnmi subscription request

29 views
Skip to first unread message

Ashutosh Maheshwari

unread,
Feb 16, 2022, 7:36:29 AM2/16/22
to grpc.io
Hello folks,

Referring to the grpc specification of updates_only flag here - https://github.com/openconfig/reference/blob/master/rpc/gnmi/gnmi-specification.md

I would like to learn from the creator and users of grpc, what is the correct interpretation of updates_only flag w.r.t sample and onchange based subscriptions.

My first interpretation: 
If "updates_only" flag is set/provided in the gnmi subscription request, then grpc server should send sync_response=false without any additional "update" packet carrying the initial value of the managed resource.
And if this flag is reset/not provided in the subscription request, the grpc server should send an "update" packet with initial value of the managed resource followed by a sync_response=true packet. 
Query: The periodic updates would follow in case of sample subscription.  Does this flag apply to onchange subscription as well ? Does it require grpc server to send an initial value "update" packet for onchange resource as well? I understand, subsequent packet would come when there is a "change".

My further interpretation:
In case of Sample subscription, the periodic update from grpc server is guaranteed if and only if there is a change in the previous sample and the current sample.  There is no point in sending same sample of data, again. That would be waste of network resources and processing power at both grpc client and server side.
I assume onchange subscription response would carry a change everytime by definition. 


Would you please clarify from GRPC standpoint, what is the right interpretation ?

Eric Anderson

unread,
Feb 16, 2022, 10:50:59 AM2/16/22
to Ashutosh Maheshwari, grpc.io
On Wed, Feb 16, 2022 at 4:36 AM Ashutosh Maheshwari <ashutosh....@gmail.com> wrote:
Referring to the grpc specification of updates_only flag here - https://github.com/openconfig/reference/blob/master/rpc/gnmi/gnmi-specification.md

I would like to learn from the creator and users of grpc, what is the correct interpretation of updates_only flag w.r.t sample and onchange based subscriptions.

...
Would you please clarify from GRPC standpoint, what is the right interpretation ?

I don't see anything there really from the "gRPC standpoint." Yes, it uses gRPC, but the concepts it is discussing are gNMI concepts built on top. It seems to be gNMI-specific, which this list probably can't help you much with.

Ashutosh Maheshwari

unread,
Feb 23, 2022, 11:17:58 PM2/23/22
to grpc.io
Hi Eric,

I posted my question in the open config google group as well but did not get any response.

Regards
Ashutosh

Reply all
Reply to author
Forward
0 new messages