Re: [Anima] GRASP objective details for registrar

Brian E Carpenter <brian.e.carpenter@gmail.com> Mon, 25 September 2017 23:28 UTC

Return-Path: <brian.e.carpenter@gmail.com>
X-Original-To: anima@ietfa.amsl.com
Delivered-To: anima@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id DC3EE1345F4; Mon, 25 Sep 2017 16:28:50 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2
X-Spam-Level:
X-Spam-Status: No, score=-2 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, 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=gmail.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 IbbpMp-PBHHD; Mon, 25 Sep 2017 16:28:48 -0700 (PDT)
Received: from mail-pg0-x232.google.com (mail-pg0-x232.google.com [IPv6:2607:f8b0:400e:c05::232]) (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 8E985132355; Mon, 25 Sep 2017 16:28:48 -0700 (PDT)
Received: by mail-pg0-x232.google.com with SMTP id k193so4889748pgc.8; Mon, 25 Sep 2017 16:28:48 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:organization:message-id:date :user-agent:mime-version:in-reply-to:content-language; bh=HKlaaIAfCneVJmvgz1uORZ0Rt66vH5zkyDBAz48PNlI=; b=LPhbkRSTPHHBY5ZJdnbwAqx3GATtnGFCViF4VZFHGAKorvowRDarArgD3cwAWA1wmF BW2kxuNDpgOn33I+vySul+PE0aP3tEmOc0haeneA/hlBxJ2rPihAbyJUs816RNvbFbM8 uFiKia0EXGTYycJzkqy2dH8e0hIZeSa13UGBTOxNPxiKG2irIxli7IwHAp7bk4pvdd9w R84DB4BiMeCW1aRmEpMf4+V2rKFjAG6P/xKSY4z4/3HYIbcoyMY9Ki3UfEiVtP7+YrLC tzyHTbLIDbuutVBYIN1eEcSfC2/4E3PcwfilWexVaMCIigBZBxxWfNN+4j4HIBkAPrFf CKMw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:organization :message-id:date:user-agent:mime-version:in-reply-to :content-language; bh=HKlaaIAfCneVJmvgz1uORZ0Rt66vH5zkyDBAz48PNlI=; b=bb82rc5GFymdl2OXWY5Nmck48Mq2v/obBX72H2TC/JWEuqtky0l8A3cfe2Mm2KNquv ItDo3pfXfW0ySFEMSX/jsVO7YpHzoo5Dta6QVo6F3wqqPfxH8+tg6Q60gq0g5cc+mKE3 X5vVNcnk9R77lxkZGTTIB0v5KwM61E7peJVzrH/+UxJ8Ebnbw9JJutDEzPC6L4qn1lrT ahVtQSPG1Ruuoh1s49AOM2V/Dxhkew0mddzpS+r59MHTckJYwpJH7QRYUlqLMsDoCOtf pTZmmqvd4hG7VSomyAQeWRNRnrsKz/OxbcEd0ddCa5ba/N0E1JpXLpxmVcZXFfWiUQpq G+vg==
X-Gm-Message-State: AHPjjUhCIdYVQZVRJepxKi+a/nzhFgq+laeCRt8qNTcxY+rmvjnufXMY mrAOvmRloNnQ4fC5Ac5eqZzg8w==
X-Google-Smtp-Source: AOwi7QAve+bCKVcW84Gj+acqIfIiOTWqQE+nMfGNjZvIaSjg2UR1YhiMwffarCP+VEOdCmd/S7QCnQ==
X-Received: by 10.101.81.135 with SMTP id h7mr9407805pgq.48.1506382127796; Mon, 25 Sep 2017 16:28:47 -0700 (PDT)
Received: from [130.216.38.103] (sc-cs-567-laptop.uoa.auckland.ac.nz. [130.216.38.103]) by smtp.gmail.com with ESMTPSA id s62sm13809255pfe.91.2017.09.25.16.28.44 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 25 Sep 2017 16:28:46 -0700 (PDT)
To: Toerless Eckert <tte@cs.fau.de>, cabo@tzi.org
Cc: draft-ietf-anima-autonomic-control-plane@ietf.org, anima@ietf.org
References: <150044138257.25233.12391471568614147773@ietfa.amsl.com> <f5e84812-c2fa-cc16-4105-20f7791110f4@gmail.com> <20170918060429.GC31832@faui40p.informatik.uni-erlangen.de> <7e70c270-6cf6-58b9-2ce4-d811f9cd1c87@gmail.com> <20170920170726.GA18746@faui40p.informatik.uni-erlangen.de> <b392cf90-ffcf-d053-0a01-31b510277077@gmail.com> <20170922230153.GA32014@faui40p.informatik.uni-erlangen.de> <f81e352b-a6af-adce-d60f-aef7c55748c2@gmail.com> <20170923065956.GC32014@faui40p.informatik.uni-erlangen.de> <3ad2ebe1-c975-d115-4f26-2fe792f02779@gmail.com> <20170925193644.GA9705@faui40p.informatik.uni-erlangen.de>
From: Brian E Carpenter <brian.e.carpenter@gmail.com>
Organization: University of Auckland
Message-ID: <4b7558e7-c5f1-cb7e-999a-34ea7aae8ebc@gmail.com>
Date: Tue, 26 Sep 2017 12:28:23 +1300
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0
MIME-Version: 1.0
In-Reply-To: <20170925193644.GA9705@faui40p.informatik.uni-erlangen.de>
Content-Type: multipart/mixed; boundary="------------26FAFF0F9CA994E636591C6D"
Content-Language: en-US
Archived-At: <https://mailarchive.ietf.org/arch/msg/anima/9ddJC_vRIv0kqDjKjKQtGOmIsxY>
Subject: Re: [Anima] GRASP objective details for registrar
X-BeenThere: anima@ietf.org
X-Mailman-Version: 2.1.22
Precedence: list
List-Id: Autonomic Networking Integrated Model and Approach <anima.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/anima>, <mailto:anima-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/anima/>
List-Post: <mailto:anima@ietf.org>
List-Help: <mailto:anima-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/anima>, <mailto:anima-request@ietf.org?subject=subscribe>
X-List-Received-Date: Mon, 25 Sep 2017 23:28:51 -0000

Here's confirmation that your CDDL generates a valid objective-value.
In the attached, you will find 8 Python statements and the resulting
output from a GRASP instance talking to itself.

If there's consensus to go this way I can update my demo code
for the BRSKI actors accordingly. But we need some WG discussion
about that, and I need to learn a bit about using maps in Python :-).

Regards
   Brian

On 26/09/2017 08:36, Toerless Eckert wrote:
> On Sun, Sep 24, 2017 at 09:05:29AM +1300, Brian E Carpenter wrote:
>>> What's the CBOR/CDDL tool you're using, i'll try it myelf first
>>> before yelling for help ;-)
>>
>> It's a Ruby tool called simply 'cddl'
>>
>> Install Ruby and then install the gem called cddl.
>> http://www.rubygemsearch.org/rubygems/cddl
> 
> Thanks! [ Cabo: Would be great if the output of cddl generate would
> show barewords as strings and not as hexadecimal... ]
> 
>> I would argue that in many cases of simple objectives this would be a mistake.
>> It's a conceptual and practical complication for the ASA writer, unless a
>> map (and probably JSON) is already "native" for the problem at hand.
> 															    > I am absolutely not against maps for cases where they are the natural
>> solution. But if the objective happens to be a simple value, why?
> 
> Sure. My high level question is how CBOR in IETF can and will establish
> a larger framework of pre-defined/reused data types so that app developer
> using GRASP (or other protocols with CBOR) could easier reuse existing
> data-types when composing new information models. I remember the initial
> discussion about how to indicate IPv6 addresses etc. pp.
> 
> My simple starting point idea within GRASP is to allow a structure
> in which we can start defining such standardized data-types and
> reuse them. They would not be at all mandatory, but offered as an
> option to objective developers.
> 
> The two simple ways to do this is to use a map where the key 'std:' has
> a sub-map with standardized keys using standardized value structures.
> 
> So, for M_FLOOD of services, which is what we need for ACP and BRSKI,
> the standardized parameters i am interested in are:
> 
> -> ability to indicate sender-ttl
> -> Ability to express service in an RFC2782/RFC6335 compatible
>    fashion so that:
>    a) We do not have to come up with a registry of our own, but just
>       register the services names according to RFC6335
>    b) We can perform service selection also compatible with
>       RFC2782 if desired (prio/weight).
> 
> Appended the fixed syntax that i would want to propose as the structure for
> mflood objective values - in a followup draft. In ACP i will just
> use the definitions without assuming those will establish a standard
> registry - that way we can make the choice whether we like the
> idea of this becoming a standard registry for future work.
> 
> (oh: and if/when the low-bitrate folks start to complain about
>  keys as barewords not being efficient, we can always add 
>  a numerical registration based map option.)
> 
> Cheers
>     Toerless
> 
> objective-value  = mflood-ovalue
> 
> ; objective-value in M_FLOOD:
> mflood-ovalue   /= { 1*parameter }
> 
> ; Standardized parameter:
> parameter      //= ( std: { 1*std-param } )
> 
> ; Any non-standardized objective-value elements can be
> ; added by objectives in two ways:
> ; a) add to parameters (any map/tlv where the type is not 'std').
> ; This allows to have both std-param and objective specific params
> ; together
> ; parameter    //= ...
> ; b) choose a different value for mflood-ovalue, eg:
> ; string or list. Then you can not use std-param
> ; mflood-ovalue   /= ...
> 
> ; value of ttl field of flood-message as set by sender.
> ; Upon receipt, (sender-ttl - ttl) is the distance of
> ; the receiver from the sender.
> std-param      //= ( grasp-sender-ttl: 1..255 )
> 
> ; DNS-SD compatible service supported by objective.
> ; service-name must be registered according to RFC6335
> ; an would therefore also useable in RFC2782 (DNS-SD)
> ; Do not register protocol/port numbers for new services
> ; unless there is a good reason. When using GRASP/ACP,
> ; protocol/port can be dynamically discovered.
> 
> std-param      //= ( service: service )
> service          =  { service-name , *service-param }
> ; Same syntax, guidelines as service name in rfc2782
> service-name     = ( name: tstr )
> service-param    = selection-param
> ; Same semantic as rfc2782. Default = 0
> selection-param //= ( priority: 0..65535 )
> selection-param //= ( weight:   0..65535 )
> 
>