Re: [netmod] metadata in JSON
Reinaldo Penno <rapenno@gmail.com> Tue, 26 August 2014 15:14 UTC
Return-Path: <rapenno@gmail.com>
X-Original-To: netmod@ietfa.amsl.com
Delivered-To: netmod@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id B67A71A871F for <netmod@ietfa.amsl.com>; Tue, 26 Aug 2014 08:14:38 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -0.999
X-Spam-Level:
X-Spam-Status: No, score=-0.999 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, J_BACKHAIR_44=1, SPF_PASS=-0.001] autolearn=no
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 Xu_5FXtGxnLe for <netmod@ietfa.amsl.com>; Tue, 26 Aug 2014 08:14:36 -0700 (PDT)
Received: from mail-pa0-x229.google.com (mail-pa0-x229.google.com [IPv6:2607:f8b0:400e:c03::229]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id B73BF1A8728 for <netmod@ietf.org>; Tue, 26 Aug 2014 08:14:25 -0700 (PDT)
Received: by mail-pa0-f41.google.com with SMTP id rd3so23452282pab.0 for <netmod@ietf.org>; Tue, 26 Aug 2014 08:14:25 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type; bh=QmjEPrSjXOmsvfrYUqV7ovnbeDITny9eNuxlSI3lHTQ=; b=VBIpCTGsQsKR07a8cecsL2XyVrAIkbu0Lht6rINCeAAWf3CzUllNOn5XRaKwBcPsW2 FhZ2pVL5EPcKVwLfLqXrsJJLfgGP7gi0a30OIxGaz/0QsQl4Z++xm9gyes8I2mxRF6U/ MccQbAXv0sZzOoXJ3WTA7Lg8HpqmY+wRiZIv5WJQ8p/ZmI3iysHBFSbzR1aPFi5w8l2V KPlnDhChdjZM5etsQN2+WvfnXAo9iQSKloI77Yo2XpXqoT1Op4gDRyJXKqEaTJJyNLLt 9tAcBoxyPyDahJ+5FF5IRtxDINQSMCwNh/CxbqbWJzMoErj6BClAiyRH0K7nuNX0ZcVb IIhw==
X-Received: by 10.66.176.97 with SMTP id ch1mr37127795pac.101.1409066065309; Tue, 26 Aug 2014 08:14:25 -0700 (PDT)
Received: from ?IPv6:2001:420:c0c8:1007::67f? ([2001:420:c0c8:1007::67f]) by mx.google.com with ESMTPSA id s8sm5192386pdj.54.2014.08.26.08.14.22 for <multiple recipients> (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 26 Aug 2014 08:14:24 -0700 (PDT)
Message-ID: <53FCA44E.3020105@gmail.com>
Date: Tue, 26 Aug 2014 08:14:22 -0700
From: Reinaldo Penno <rapenno@gmail.com>
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:31.0) Gecko/20100101 Thunderbird/31.0
MIME-Version: 1.0
To: Andy Bierman <andy@yumaworks.com>
References: <CABCOCHS8aXQKMqq+h=7fvjhpdiBpR8PbCT5QkwM3Y9KKyV0=eQ@mail.gmail.com> <E0C7A946-BB33-493C-BD95-B3BFC3EC11DF@nic.cz> <CABCOCHTOYqBe1dVAJA2CmBhho2AG68nEg9o5pPwQavvDHy=3Vg@mail.gmail.com> <m2bns7qfno.fsf@nic.cz> <20140730110826.GE61382@elstar.local> <DB5305F2-2BE1-44FC-A8AA-648E4633F85E@nic.cz> <20140730130412.GB61698@elstar.local> <E3612646-17B9-44FA-8C4C-9C2F3FA1C67E@nic.cz> <20140731055201.GC63208@elstar.local> <5BA7630E-B06F-47B5-9ACD-92D9A3512864@nic.cz> <20140731122200.GC64359@elstar.local> <m2zjer2yga.fsf@nic.cz> <CABCOCHQEwamRQ3AC6NCTTi0UGa553gfkVmc4XnjsRE4MHxqLmQ@mail.gmail.com> <53FC9E15.6060301@gmail.com> <CABCOCHTCLCuf7zZYgGaVbvbkm+08Rme=HWztNC-WuRHkP4gHjA@mail.gmail.com>
In-Reply-To: <CABCOCHTCLCuf7zZYgGaVbvbkm+08Rme=HWztNC-WuRHkP4gHjA@mail.gmail.com>
Content-Type: multipart/alternative; boundary="------------050605090908080100020406"
Archived-At: http://mailarchive.ietf.org/arch/msg/netmod/eBUjjDJhxr19Ngn0sf50ikj_aP4
Cc: "netmod@ietf.org" <netmod@ietf.org>
Subject: Re: [netmod] metadata in JSON
X-BeenThere: netmod@ietf.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: NETMOD WG list <netmod.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/netmod>, <mailto:netmod-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/netmod/>
List-Post: <mailto:netmod@ietf.org>
List-Help: <mailto:netmod-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/netmod>, <mailto:netmod-request@ietf.org?subject=subscribe>
X-List-Received-Date: Tue, 26 Aug 2014 15:14:39 -0000
On 8/26/14 8:06 AM, Andy Bierman wrote: > > > > On Tue, Aug 26, 2014 at 7:47 AM, Reinaldo Penno <rapenno@gmail.com > <mailto:rapenno@gmail.com>> wrote: > > I agree that vendors could define metadata as long as there is a > procedure for that such as a IETF document and a IANA registry. > > > We don't need this for XML. Why do we need it for JSON? [RP] Because the metadata work for JSON is being done in the IETF > > > My reasoning is that I see this metadata is much like decorators > in Java. In the case of JAVA<->JSON there are multiple libraries > that can do serialization and they use different decorators, > therefore not very interoperable. So, we I would suggest > metadata/decorators are registered somewhere and there is > possibility for standard, experimental and private notations. > > > The client parser does not need to understand the semantics of an > attribute in order to be able > to parse it in a reply. [RP] That should be true. > The client won't be sending any requests with attributes unless > it is programmed to understand specific attributes. [RP] Yes... > > I see JSON attributes being used the same way XML attributes are being > used now > to represent meta-data associated with datastores. (with-defaults, > enabled, etc.) > If the feature is designed correctly, then it won't break clients that > don't > know about the attribute (client has to ask in the request for certain > attributes > to be present in the reply). [RP] Standards based attributes could be present in request or response without necessary a previous request, much like certain HTTP headers, or X-based HTTP headers. This goes back to my previous point about IANA registry. > > I don't see how Java programming practices impact the operational > requirements for datastores. > Vendors are going to use datastore meta-data whether the standard > supports it or not. > > > Andy > > > On 8/26/14 7:19 AM, Andy Bierman wrote: >> Hi, >> >> This issue and been opened and closed again at least 3 times. >> Are we spinning on this issue until you get the answer you like? >> Which choice is the solution from Martin we already agreed to use? >> That is the one I prefer. The namespace URI is much longer than >> the module-name, and not easy to remember like the module name. >> But if YANG will not have attributes, then there may be no other >> choice. >> >> I do not agree with the CLR that only the RESTCONF protocol doc >> can define meta-data. What is the purpose of that rule? NETCONF >> has "with-defaults" in a separate document. The protocol >> needs to be modular so new optional features can be added over time. >> Vendors should be able to add meta-data as well. >> >> >> Andy >> >> >> On Tue, Aug 26, 2014 at 6:05 AM, Ladislav Lhotka <lhotka@nic.cz >> <mailto:lhotka@nic.cz>> wrote: >> >> Hi, >> >> I would like to resolve the issue of metadata encoding in >> JSON, so let >> me summarize the options we have. There are actually two >> valid questions: >> >> 1. Does the specification of the mapping of XML attributes in >> JSON >> belong to the yang-json document, and if so, in what form? >> >> Possible answers: >> >> 1.1. No, as YANG doesn't model XML attributes. >> 1.2. Yes, as normative text. >> 1.3. Yes, as non-normative text. >> >> For 1.2 and 1.3, we have to answer the second question >> because I assume >> most XML attributes in use with YANG-modelled data will have >> non-null namespace: >> >> 2. How do we represent the namespace of an attribute in JSON? >> >> Possible answers, using >> >> <elem xmlns:x="http://example.com/ns/URI" >> x:attr="foo">bar</elem> >> >> as an example: >> >> 2.1. Use Clark's notation [1]: >> >> "elem": "bar", >> "@elem": { >> "{http://example.com/ns/URI}attr >> <http://example.com/ns/URI%7Dattr>": "foo" >> } >> >> 2.2. Associate somehow every attribute with a YANG module, >> and then use >> the same notation as for encoding the namespace of YANG >> data nodes: >> >> "elem": "bar", >> "@elem": { >> "somemodule:attr": "foo" >> } >> >> 2.3. Associate somehow the XML namespace URI with a prefix in >> JSON and >> then use the same notation as for XML: >> >> "elem": "bar", >> "@elem": { >> "x:attr": "foo" >> } >> >> In both 2.2 and 2.3, we need to say what "somehow" actually >> means. If we >> accept 1.3, it could I guess involve a certain amount of >> hand-waving but >> leaving it completely unanswered IMO makes the whole thing >> useless. >> >> I personally think that 2.3 would be a step in a wrong >> direction because >> the URI-prefix duality was recognized as a serious problem of XML >> namespaces [2]. >> >> Please indicate your preferences or propose something else. >> >> Thanks, Lada >> >> [1] >> http://tools.ietf.org/html/draft-saintandre-json-namespaces-00 >> [2] http://blog.jclark.com/2010/01/xml-namespaces.html >> >> Juergen Schoenwaelder <j.schoenwaelder@jacobs-university.de >> <mailto:j.schoenwaelder@jacobs-university.de>> writes: >> >> > On Thu, Jul 31, 2014 at 10:49:07AM +0200, Ladislav Lhotka >> wrote: >> >> >> >> On 31 Jul 2014, at 07:52, Juergen Schoenwaelder >> <j.schoenwaelder@jacobs-university.de >> <mailto:j.schoenwaelder@jacobs-university.de>> wrote: >> >> >> >> > On Wed, Jul 30, 2014 at 05:53:30PM +0200, Ladislav >> Lhotka wrote: >> >> >> >> >> >>>>> understand that this makes the solution somewhat >> incomplete but it >> >> >>>>> allows us to finish this document now and to move >> forward. >> >> >>>> >> >> >>>> That is my priority, too. >> >> >>> >> >> >>> Good. So what speaks against saying that if attribute >> names clash and >> >> >>> if attributes are scoped by a module name, then the >> encoding is XYZ? >> >> >> >> >> >> I thought YANG 1.1 was a good opportunity to decide >> about how to do this scoping, provided that standard >> attributes are really needed. >> >> >> >> >> > >> >> > Lets keep the discussion focused on the JSON document. >> Are you OK with >> >> > the proposal to add text that attribute names may be scoped? >> >> >> >> Yes, if there is no other choice. It is unclear what >> “scoped” means. >> >> >> > >> > Scoped by a namespace, such as 'namespace:identifier'. >> > >> > /js >> > >> > -- >> > Juergen Schoenwaelder Jacobs University Bremen gGmbH >> > Phone: +49 421 200 3587 Campus Ring 1, 28759 Bremen, Germany >> > Fax: +49 421 200 3103 <http://www.jacobs-university.de/> >> >> -- >> Ladislav Lhotka, CZ.NIC Labs >> PGP Key ID: E74E8C0C >> >> >> >> >> _______________________________________________ >> netmod mailing list >> netmod@ietf.org <mailto:netmod@ietf.org> >> https://www.ietf.org/mailman/listinfo/netmod > > > _______________________________________________ > netmod mailing list > netmod@ietf.org <mailto:netmod@ietf.org> > https://www.ietf.org/mailman/listinfo/netmod > >
- [netmod] metadata in JSON Ladislav Lhotka
- Re: [netmod] metadata in JSON Juergen Schoenwaelder
- Re: [netmod] metadata in JSON Ladislav Lhotka
- Re: [netmod] metadata in JSON Andy Bierman
- Re: [netmod] metadata in JSON Ladislav Lhotka
- Re: [netmod] metadata in JSON Juergen Schoenwaelder
- Re: [netmod] metadata in JSON Ladislav Lhotka
- Re: [netmod] metadata in JSON Andy Bierman
- Re: [netmod] metadata in JSON Juergen Schoenwaelder
- Re: [netmod] metadata in JSON Andy Bierman
- Re: [netmod] metadata in JSON Ladislav Lhotka
- Re: [netmod] metadata in JSON Andy Bierman
- Re: [netmod] metadata in JSON Ladislav Lhotka
- Re: [netmod] metadata in JSON Andy Bierman
- Re: [netmod] metadata in JSON Ladislav Lhotka
- Re: [netmod] metadata in JSON Ladislav Lhotka
- Re: [netmod] metadata in JSON Juergen Schoenwaelder
- Re: [netmod] metadata in JSON Juergen Schoenwaelder
- Re: [netmod] metadata in JSON Ladislav Lhotka
- Re: [netmod] metadata in JSON Ladislav Lhotka
- Re: [netmod] metadata in JSON Juergen Schoenwaelder
- Re: [netmod] metadata in JSON Juergen Schoenwaelder
- Re: [netmod] metadata in JSON Ladislav Lhotka
- Re: [netmod] metadata in JSON Juergen Schoenwaelder
- Re: [netmod] metadata in JSON Juergen Schoenwaelder
- Re: [netmod] metadata in JSON Ladislav Lhotka
- Re: [netmod] metadata in JSON Ladislav Lhotka
- Re: [netmod] metadata in JSON Juergen Schoenwaelder
- Re: [netmod] metadata in JSON Ladislav Lhotka
- Re: [netmod] metadata in JSON Juergen Schoenwaelder
- Re: [netmod] metadata in JSON Juergen Schoenwaelder
- Re: [netmod] metadata in JSON Ladislav Lhotka
- Re: [netmod] metadata in JSON Martin Bjorklund
- Re: [netmod] metadata in JSON Ladislav Lhotka
- Re: [netmod] metadata in JSON Martin Bjorklund
- Re: [netmod] metadata in JSON Juergen Schoenwaelder
- Re: [netmod] metadata in JSON Andy Bierman
- Re: [netmod] metadata in JSON Ladislav Lhotka
- Re: [netmod] metadata in JSON Ladislav Lhotka
- Re: [netmod] metadata in JSON Reinaldo Penno
- Re: [netmod] metadata in JSON Ladislav Lhotka
- Re: [netmod] metadata in JSON Andy Bierman
- Re: [netmod] metadata in JSON Reinaldo Penno
- Re: [netmod] metadata in JSON Andy Bierman
- Re: [netmod] metadata in JSON Juergen Schoenwaelder
- Re: [netmod] metadata in JSON Ladislav Lhotka
- Re: [netmod] metadata in JSON Andy Bierman
- Re: [netmod] metadata in JSON Randy Presuhn
- Re: [netmod] metadata in JSON Andy Bierman
- Re: [netmod] metadata in JSON Martin Bjorklund
- Re: [netmod] metadata in JSON Juergen Schoenwaelder
- Re: [netmod] metadata in JSON Ladislav Lhotka
- Re: [netmod] metadata in JSON Andy Bierman
- Re: [netmod] metadata in JSON Martin Bjorklund
- Re: [netmod] metadata in JSON Andy Bierman
- Re: [netmod] metadata in JSON Martin Bjorklund
- Re: [netmod] metadata in JSON Ladislav Lhotka
- Re: [netmod] metadata in JSON Ladislav Lhotka
- Re: [netmod] metadata in JSON Andy Bierman
- Re: [netmod] metadata in JSON Martin Bjorklund
- Re: [netmod] metadata in JSON Ladislav Lhotka
- Re: [netmod] metadata in JSON Juergen Schoenwaelder
- Re: [netmod] metadata in JSON Ladislav Lhotka
- Re: [netmod] metadata in JSON Martin Bjorklund
- Re: [netmod] metadata in JSON Ladislav Lhotka
- Re: [netmod] metadata in JSON Ladislav Lhotka
- Re: [netmod] metadata in JSON Juergen Schoenwaelder
- Re: [netmod] metadata in JSON Ladislav Lhotka
- Re: [netmod] metadata in JSON Juergen Schoenwaelder
- Re: [netmod] metadata in JSON Ladislav Lhotka
- Re: [netmod] metadata in JSON Juergen Schoenwaelder
- Re: [netmod] metadata in JSON Reinaldo Penno
- Re: [netmod] metadata in JSON Ladislav Lhotka