Subject: Re: [netmod] identifier length survey

From: Gerhard Muenz <[email-masked]>
Date: Thu, 02 Apr 2009 10:34:56 +0200

Hi all,

Just a small comment from an outsider and mere module author:

Arguments like "we must add a restriction because we currently do not
see a use-case where this restriction hurts" do not convince me.
Rather, it seems to me that this might provoke a new kind of Y2K-problem
in future.

Valid arguments would sound like "we must make this restriction because
otherwise we cannot guarantee compatibility".

Regards,
Gerhard

> Andy Bierman <andy at netconfcentral.com> wrote:
>> Martin Bjorklund wrote:
>> > Andy Bierman <andy at netconfcentral.com> wrote:
>> >> If the limit of 63 is too short then suggest a higher number.
>> >> How about 1023? That is fine with me too.
>> >>
>> >> But nobody has an actual use-case for anything above 63.
>> >> Pick a positive finite number, because infinite length
>> >> strings are hard to store on small embedded devices ;-)
>> > Of course.  But the point is that even with 63 bytes (or whatever
>> > fixed length) a small embedded device cannot handle an infinite number
>> > of identifiers.  So should we also limit the total number of
>> > identifiers?
>> 
>> I think a small embedded device is unlikely to have even
>> a 1000 identifiers, let alone a billion or so.
>> Although saving memory is the reason for some
>> other YANG decisions, it is not the reason for this one.
>> 
>> IMO, the only answer is, for all strings defined in a YANG file
>> while are used in the protocol (module-name, namespace-stmt, identifier),
>> a fixed length for all implementation MUST be specified.
> 
> I understand that this is your proposal.  But if saving memory is not
> the reason for this rule, then what is the reason?
> 
> In an earlier email in this thread you wrote:
> 
> andy> Code is generated using these descriptors.
> andy>
> andy> The memory impact from these descriptors is already
> andy> non-trivial at 63 chars.
> 
> I assume it boils down to code generation, which also David Reid
> listed as the reason for having a fixed limit.
> 
>> > I really do not understand this memory allocation argument.
>> > 
>> 
>> I don't understand the 'put the keys first' argument,
>> but they are about the same I think.
> 
> The difference is that the 'put the keys' first argument *is* about
> saving memory, which apparently the identifier rule is not.  To be
> even more specific, it is about saving *dynamic* memory.
> 
> 
> /martin

---

From: Andy Bierman <[email-masked]>
Date: Thu, 02 Apr 2009 03:28:39 -0700

> otherwise we cannot guarantee compatibility".

We not only would like NETCONF/YANG to be
compatible, we want it to be implementable.
Simply stating that everybody MUST support
infinite length strings, yet not ONE vendor
says they can implement that, does not help solve
any real problems.

> Gerhard

Andy