Re: [core] πŸ”” WG adoption of draft-veillette-core-yang-cbor-mapping-00

Paul Duffy <paduffy@cisco.com> Thu, 21 April 2016 18:30 UTC

Return-Path: <paduffy@cisco.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 E965B12E210 for <core@ietfa.amsl.com>; Thu, 21 Apr 2016 11:30:34 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -15.517
X-Spam-Level:
X-Spam-Status: No, score=-15.517 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_HI=-5, RCVD_IN_MSPIKE_H4=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RP_MATCHES_RCVD=-0.996, SPF_HELO_PASS=-0.001, SPF_PASS=-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 k8zpCVoseXzG for <core@ietfa.amsl.com>; Thu, 21 Apr 2016 11:30:32 -0700 (PDT)
Received: from aer-iport-1.cisco.com (aer-iport-1.cisco.com [173.38.203.51]) (using TLSv1.2 with cipher DHE-RSA-SEED-SHA (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 3029F12DE9E for <core@ietf.org>; Thu, 21 Apr 2016 11:30:31 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=@cisco.com; l=20729; q=dns/txt; s=iport; t=1461263431; x=1462473031; h=reply-to:subject:references:to:from:message-id:date: mime-version:in-reply-to; bh=6EUQ6eWbf9KliMKTSzDDm5arYv1abkDHnjDg8A2VqEs=; b=ed3eDPmD1x5tIhtOfkjl+BkDN3M7RAdKlrp+9wN9dM3LjalioaC6f9w9 r9EaHMNDMbikMY2m4bmYyBWAyd1X/s6PyPGbGYxsuEcqWM7GJwPbtlLCQ CDk7lqdIF6XnqNtgP7edIfGyHPXPjdS7gvlb6Ah4Z+NchOZeffZm88W1k Q=;
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: A0BIAgD7GxlX/xbLJq1ehAt9tQmDfHYBDYF0FwEOgiiDQAKBahQBAQEBAQEBZSeEQgEBBAEBARoKRwoRCQIYCRYPCQMCAQIBFTATBgIBAQUTiA4OkXGjOIsAAQEBAQYBAQEBARuGIYRLhCOFcgWYD4V7iBmBZk6Df4MGI4U0jy4eAQFChAUgMIc7JYEWAQEB
X-IronPort-AV: E=Sophos;i="5.24,513,1454976000"; d="scan'208,217";a="676859129"
Received: from aer-iport-nat.cisco.com (HELO aer-core-1.cisco.com) ([173.38.203.22]) by aer-iport-1.cisco.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 21 Apr 2016 18:30:24 +0000
Received: from [10.131.65.152] (dhcp-10-131-65-152.cisco.com [10.131.65.152]) by aer-core-1.cisco.com (8.14.5/8.14.5) with ESMTP id u3LIUOin013862 for <core@ietf.org>; Thu, 21 Apr 2016 18:30:24 GMT
References: <570A4583.2030100@tzi.org> <5718A09E.7040607@gmx.net>
To: core@ietf.org
From: Paul Duffy <paduffy@cisco.com>
Organization: Cisco Systems
Message-ID: <57191C3F.6030004@cisco.com>
Date: Thu, 21 Apr 2016 14:30:23 -0400
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.7.2
MIME-Version: 1.0
In-Reply-To: <5718A09E.7040607@gmx.net>
Content-Type: multipart/alternative; boundary="------------020503060707070602090602"
Archived-At: <http://mailarchive.ietf.org/arch/msg/core/6Q9nDXRtEd8i6xsZoLLzBtvN-YA>
Subject: Re: [core] πŸ”” WG adoption of draft-veillette-core-yang-cbor-mapping-00
X-BeenThere: core@ietf.org
X-Mailman-Version: 2.1.17
Precedence: list
Reply-To: paduffy@cisco.com
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: Thu, 21 Apr 2016 18:30:35 -0000

Thanks Hannes

A few related comments....

re: 2 and 3.  I do see a machine consumable interface / resource 
definition as useful.  At least as the contract both ends of the 
communication will code.  Recent Cisco experience underlines 
co-developing using prose based descriptions is highly error prone (I 
not surprised).  I'm further an advocate of using these interface 
descriptions for code gen, doc gen, and conformance testing tools (when 
certification is being performed).  The pro IDL macro points have not 
changed over the years: Corba, COM, WSDL, WADL, and now the IoT space.

re: 4.  This is a tough one.  I struggle with YANG for IoT. 
Acknowledging it is the IETF's baby.  But I see no traction out at the 
far edge of IoT.   Different dialects?  Tooling support (editors, 
validators, code gen, doc gen, etc)? Cisco is putting effort into the 
RAML ecosystem, OCF being a first example of that.

http://www.oneiota.org/documents?filter[media_type]=application%2Framl%2Byaml

I better understand RAML, but am happy to be enlightened re: YANG for 
IoT endpoints.  Does anyone have a side by side example worked out?  
Interface definition to running code?

Cheers


On 4/21/2016 5:42 AM, Hannes Tschofenig wrote:
> Hi Carsten, Hi all,
>
> I think we are going to fast here.
>
> We hardly make any progress with the existing WG items but then we add a
> number of new items that are barely understood.
>
> This call for adoption is not a call for this document this is a
> question whether we want to work on the following two types of things:
>
> a) a data modelling language (Yang) for use with IoT objects (which in
> case of IoT are largely defined elsewhere), and
>
> b) re-use a protocol machinery originally defined for network management
> around Netconf (which may now be converted to CoAP and CBOR usage).
>
> I have spent some time trying to figure out what the implications are
> and (that's a bold statement) doubt that most WG participants (except
> for the authors of the documents) really understand what this really means.
>
> Here are the claims:
>
> 1) IoT will re-use many of the objects defined for network management.
>
> 2) There is a need for a formal language to describe the data model.
>
> 3) There is a value in generating code using that formal data model
> description.
>
> 4) Yang (as a data modelling language) and the related protocols are a
> good match for the requirements people have.
>
> Are these claims actually true?
>
> Given that we are late at the party and other organizations have done a
> fair amount of work in that space already I am wondering whether we have
> done our home work of analysis the existing landscape or whether we are
> just interested to add another set of standards to the mix.
>
> I have my opinion about the claims and I would like to share them with you.
>
> Regarding (1) on the re-use argument. I do not believe that the
> existing, already standardized objects defined for network management
> are a good fit for what we are doing in IoT. I have not seen the
> examples where there is re-use. As illustrated below, I am exposing my
> sensors, buttons, and LEDs to outside world rather than network
> interfaces and alike. I fully understand that the world is far more
> complex with routers and switches that have many ports and lots of
> configuration parameters. They are also running regular operating
> systems, like Linux.
>
> Regarding (2) on the use of formal languages. It seems that most
> organizations are using formal languages for describing their object
> definitions already today. I personally believe that these formal
> languages do not provide a lot of value in general but using something
> that is easy for humans to write and read is something I may be OK with.
> Particularly the example below shows that all I need as a developer is
> very little. IoT devices typically do not have many sensors and the
> implementation complexity is elsewhere (with the operating system, the
> tool chain, and various low power settings).
>
> Regarding (3) on the value of code generation.
>
> I am currently in the process of writing a new tutorial for a developer
> workshop hosted by the Open Mobile Alliance (OMA), see
> http://openmobilealliance.org/free-hands-on-training-for-iot-developers-with-oma-lwm2m-and-arm-based-microprocessors/
>
> I am using regular IoT hardware, namely the K64F board with onboard
> sensors, namely an accelerometer and magnetometer, an RGB LED, and two
> buttons. The sensors are connected using I2C and are certainly not among
> the most simplistic (which the data sheet of almost 100 pages can easily
> tell you).
>
> In the process of writing code I need to do the following:
>
> * Figure out how to connect to the sensors using I2C.
>
> * Learn how the sensor works, how to configure the sensor to do what I
> want, and to convert the raw sensor data into something suitable for my
> application. One can only hope to find a library that does these things
> already and to only have to adjust the settings rather than writing
> everything from scratch. That typically takes a lot of time.
>
> * Determine whether is a suitable object definition already available.
> In my case I am looking at the OMNA registry (which has also been
> populated with the objects from the IPSO Alliance). Here are the
> registered objects:
> http://technical.openmobilealliance.org/Technical/technical-information/omna/lightweight-m2m-lwm2m-object-registry
>
> In case of the Accelerometer and the Magnetometer I am lucky since those
> have already been defined. I don't need to define my own objects, which
> is a simple task given the new OMA object editor
> http://devtoolkit.openmobilealliance.org/OEditor/Default
>
> * Then, I need to add the code for use with them. Here is where the
> formal description of the data model could help me to automatically
> produce code.
>
> Now, this is the funny thing: this code amounts for around 5 lines,
> depending on the API and programming language you are using. Most likely
> the code generation will produce some code that you cannot directly use.
>
> Here is what I have to write on the IoT side:
>
> ----
>
> // Create object '3313' = 'Accelerometer'
> acc_object = M2MInterfaceFactory::create_object("3313");
>
> M2MObjectInstance* acc_inst = acc_object->create_object_instance();
>
> M2MResource* acc_x_res = acc_inst->create_dynamic_resource("5702", "X
> Value",M2MResourceInstance::FLOAT, true /* observable */);
>
> M2MResource* acc_y_res = acc_inst->create_dynamic_resource("5703", "Y
> Value",M2MResourceInstance::FLOAT, true /* observable */);
>
> M2MResource* acc_z_res = acc_inst->create_dynamic_resource("5704", "Z
> Value",M2MResourceInstance::FLOAT, true /* observable */);
>
> -----
>
> I fear that we are optimizing for something that does not take a long
> time anyway. It will take longer to fetch the relevant Yang file, to use
> the tools to generate the code and to integrate it into the existing
> code than to just write these few lines yourself.
>
> What the above example does not utilize potential code generation for
> the actual interaction model. In my case my code is hard-wired to use
> LWM2M.
>
> Since I have not yet seen a meaningful example of Yang for the IoT
> environment I also haven't seen one that produces meaningful code for
> the interaction model either.
>
> Regarding (4) concerning Yang as a data modelling language (vs. other
> languages also considered by the IoT communities). As Paul noted there
> are other languages in town and I personally do not know whether the
> features offered by Yang are better or equal to those offered by the
> other languages. I certainly haven't done that analysis.
>
> As a concluding remark I would like to say that while my current
> assessment may sound negative I am happy to learn more about this topic
> and might get convinced that Yang is the right tool. Currently, I just
> haven't reached that level yet and I can claim that I have spent some
> time looking at this topic already.
>
> Ciao
> Hannes
>
>
> On 04/10/2016 02:22 PM, Carsten Bormann wrote:
>> In Buenos Aires, we discussed the adoption of
>> draft-veillette-core-yang-cbor-mapping-00 but not enough people had read
>> the document to go for an in-room consensus call.
>>
>> This is a two-week call for adoption of
>> draft-veillette-core-yang-cbor-mapping-00 as a WG document of CoRE.
>> Specifically, if you (1) support or (2) have an objection to this
>> decision, please speak up on the mailing list by 2016-04-24.
>>
>> Note that this work is explicitly covered by our charter, so discussions
>> of which WG should work on this are off-topic.
>>
>> As always, adoption of a document as a WG document is not a vote on
>> whether we already have reached last-call state; the intention is to
>> work on the WG document after adoption for a while to get it ready for
>> last call.  If you want to combine your support/objection with technical
>> comments, this is certainly welcome so we can accelerate that process.
>>
>> Grüße, Carsten
>>
>> _______________________________________________
>> core mailing list
>> core@ietf.org
>> https://www.ietf.org/mailman/listinfo/core
>>
>
>
> _______________________________________________
> core mailing list
> core@ietf.org
> https://www.ietf.org/mailman/listinfo/core