Re: [core] draft-bierman-core-yid-00.txt questions

Andy Bierman <andy@yumaworks.com> Wed, 24 August 2016 21:22 UTC

Return-Path: <andy@yumaworks.com>
X-Original-To: core@ietfa.amsl.com
Delivered-To: core@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 43DE812D756 for <core@ietfa.amsl.com>; Wed, 24 Aug 2016 14:22:53 -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, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=yumaworks-com.20150623.gappssmtp.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 lT-f_BoVQmWe for <core@ietfa.amsl.com>; Wed, 24 Aug 2016 14:22:50 -0700 (PDT)
Received: from mail-ua0-x22c.google.com (mail-ua0-x22c.google.com [IPv6:2607:f8b0:400c:c08::22c]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 1984312D124 for <core@ietf.org>; Wed, 24 Aug 2016 14:22:49 -0700 (PDT)
Received: by mail-ua0-x22c.google.com with SMTP id 74so51784085uau.0 for <core@ietf.org>; Wed, 24 Aug 2016 14:22:49 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yumaworks-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=CxbsYuoJtuyPBqGrJbbW6XtBW88wtKzZFqjdEfY4L7Y=; b=ROYO5X5EN36RwcSRyxT6cMmMOntWS001kHcoJjLOizdUhLLoLdmXzmAWNhyEoEHEje wZFda5MPyn+jo7KZPG9uEr3vLhIqQRQ5OsQZs2XfB93Y6Hc5lWi+bg3tpsCUmsgnPiOX KPTdnjvmxmD9e/L/Lq547MNFrI5G/Fkgf950bScTzS3redFb9ZWoNgJhZyPPHoZkMC26 2ia85a+P8jy+bMSRIWs0nRTZL+I9kOGAExuIkAIQmbT1kid43FHcTRQmlMCg9fsUz266 EqK7wArQTg4U3r40VSZ/RorspN323jBji0UgujMiaxn/yMja2RmuGEcoE23SyoZ6gquY Y02Q==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=CxbsYuoJtuyPBqGrJbbW6XtBW88wtKzZFqjdEfY4L7Y=; b=Nc5FPnNctCdY7aaPafQXgig8RA2LG/YvInRG1jjT6Q1bziyeX6oSO1g5Qk5Etuqbf9 jai5+B9BoxNVO4jTH/Plpdvru2O2BvJ2gn3hmglXMV9XS/o/PEMUxjk0hCeQ5S3On0cw g9w+d3MLefrm/3dthWCFJX4YRt4YRakXVLxghipBWmQcB/Rf/b6FVtoswArBDhptP40v iHZm9mxfSrNd6p4YBX3pj2+HjWhmzm155qBFBOl5ePuSzJ7r4/UD6nowbf+C2qMYri5/ TK3L1bBc/EAWP46RSYKttk42C+PkU93M+e0IBoW4Z7tsrGVGX7qRDHwy+OAaW0Ktc9Nz hdZg==
X-Gm-Message-State: AEkoouuep4zfieN25YJLaA0309eNKCaLG1wmYiHe3KlBeG7DrnlRHJh3Chwi+tuqUqd3rXqaFTIn0gStdYUvKw==
X-Received: by 10.31.139.207 with SMTP id n198mr3001678vkd.121.1472073768185; Wed, 24 Aug 2016 14:22:48 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.103.4.134 with HTTP; Wed, 24 Aug 2016 14:22:47 -0700 (PDT)
In-Reply-To: <20160824203526.3B9B45213C4@rh7.snmp.com>
References: <20160824203526.3B9B45213C4@rh7.snmp.com>
From: Andy Bierman <andy@yumaworks.com>
Date: Wed, 24 Aug 2016 14:22:47 -0700
Message-ID: <CABCOCHR63yE=QsCdUmNXAUw9cGgAxugFBqpHwFe9E6Pt25Rc5A@mail.gmail.com>
To: David Reid <reid@snmp.com>
Content-Type: multipart/alternative; boundary="001a114584d009478b053ad7e218"
Archived-At: <https://mailarchive.ietf.org/arch/msg/core/zVZywm6u9zQY0lug8KqZhGZBycg>
Cc: Core <core@ietf.org>
Subject: Re: [core] draft-bierman-core-yid-00.txt questions
X-BeenThere: core@ietf.org
X-Mailman-Version: 2.1.17
Precedence: list
List-Id: "Constrained RESTful Environments \(CoRE\) Working Group list" <core.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/core>, <mailto:core-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/core/>
List-Post: <mailto:core@ietf.org>
List-Help: <mailto:core-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/core>, <mailto:core-request@ietf.org?subject=subscribe>
X-List-Received-Date: Wed, 24 Aug 2016 21:22:53 -0000

On Wed, Aug 24, 2016 at 1:35 PM, David Reid <reid@snmp.com> wrote:

> I read draft-bierman-core-yid-00.txt and have a few questions.
>
> Will all IETF standard yang modules be included in the YANG identifier
> registry or just ones that might be used on constrained devices?
>


I think all modules.
We want to support unconstrained devices on constrained networks.



>
> In order to assign numbers, is it correct that I need the first revision of
> the module or else the current revision and the registry assignments for
> the
> previous revision?
>


I think in all numbering schemes (as Michel pointed out) you need
the current registration entry and the new module revision.



>
> What is the benefit of assigning values using hashing over sequentially
> assigning values?
>

There is overhead ir reading and processing a giant list of mappings.
Automatic assignment is risky because both sides need to agree on
the object to number mapping.  Detecting these issues is very difficult.

The YANG Hash algorithm is designed to use the path string,
which is permanent and cannot change no matter how the
YANG is refactored.  The murmur hash is a stable algorithm.
There is not a lot that can go wrong for the 2 peers to disagree
on the hashes (except for collisions)


>
> When there is a hash collision, would it be possible to rehash the value
> to get a unique number so that we never have to manually assign numbers and
> thus never need to register the numbers in the registry?
>


yes, this has been suggested.
The problem with auto-rehashing before was inter-module clashes.
Now those are not possible so automatic rehashing is feasible.


>
> Why does module-id need to be added to the YANG module names registry since
> it is also in the YANG identifier registry?
>


I guess it is not needed since the module name is in both registries already



>
> Would it make sense to put the module-id inside the yang module with a yid
> extension so that I would not have to go lookup that information from a
> registry?
>


I suppose -- but how to prevent duplicates and cut-and-paste errors?


>
> Would it be possible to assign the module-id based on information in the
> module, for example a hash of the namespace and maybe the revision date.
> That way, a module-id would not have to be assigned and maintained in a
> registry.
>
>

I think private module-id would be better, using a range reserved for
temporary
assignments.

How do you resolve hash collisions for module-id?



> If I want to handle private modules, do I have to create my own registry?
> It seems important that private modules be supported. Could we re-use the
> SMI enterprise number assignments for creating module-ids for private
> modules?
>

The ietf-yid module has a schema for the entire registry.
How to use the registry is a protocol issue that needs to be decided.
If the server advertises  its own registry vs. a public registry,
then it is using a private registry.  If all devices in the system agree
on which registry to use, then everything works.


> Who will assign the local-id numbers? Is that done by the working group
> that
> defines the YANG module?
>

I would expect IETF modules to use hashes by default but for
some modules that seem useful to constrained devices, then
manual numbering could be done instead by the WG.


>
> -David Reid
>

Andy


>
> _______________________________________________
> core mailing list
> core@ietf.org
> https://www.ietf.org/mailman/listinfo/core
>