[Anima] comments on draft-ietf-anima-grasp-api

Michael Richardson <mcr+ietf@sandelman.ca> Tue, 06 August 2019 17:24 UTC

Return-Path: <mcr+ietf@sandelman.ca>
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 9BF5912027C for <anima@ietfa.amsl.com>; Tue, 6 Aug 2019 10:24:12 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -4.2
X-Spam-Level:
X-Spam-Status: No, score=-4.2 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=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 nQnlU1RPpWm4 for <anima@ietfa.amsl.com>; Tue, 6 Aug 2019 10:24:10 -0700 (PDT)
Received: from tuna.sandelman.ca (tuna.sandelman.ca [209.87.249.19]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id A6D0812024E for <anima@ietf.org>; Tue, 6 Aug 2019 10:24:10 -0700 (PDT)
Received: from sandelman.ca (obiwan.sandelman.ca [209.87.249.21]) by tuna.sandelman.ca (Postfix) with ESMTP id E74E33818C for <anima@ietf.org>; Tue, 6 Aug 2019 13:23:27 -0400 (EDT)
Received: from localhost (localhost [IPv6:::1]) by sandelman.ca (Postfix) with ESMTP id 1726C266 for <anima@ietf.org>; Tue, 6 Aug 2019 13:24:03 -0400 (EDT)
From: Michael Richardson <mcr+ietf@sandelman.ca>
To: "anima@ietf.org" <anima@ietf.org>
X-Mailer: MH-E 8.6; nmh 1.7+dev; GNU Emacs 24.5.1
X-Face: $\n1pF)h^`}$H>Hk{L"x@)JS7<%Az}5RyS@k9X%29-lHB$Ti.V>2bi.~ehC0; <'$9xN5Ub# z!G,p`nR&p7Fz@^UXIn156S8.~^@MJ*mMsD7=QFeq%AL4m<nPbLgmtKK-5dC@#:k
MIME-Version: 1.0
Content-Type: multipart/signed; boundary="=-=-="; micalg="pgp-sha256"; protocol="application/pgp-signature"
Date: Tue, 06 Aug 2019 13:24:03 -0400
Message-ID: <5523.1565112243@localhost>
Archived-At: <https://mailarchive.ietf.org/arch/msg/anima/qYsfRlDfimdjq6Q2fff_LcoIkGg>
Subject: [Anima] comments on draft-ietf-anima-grasp-api
X-BeenThere: anima@ietf.org
X-Mailman-Version: 2.1.29
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: Tue, 06 Aug 2019 17:24:12 -0000

I read draft-ietf-anima-grasp-api from the expired drafts list.

I think that the event-loop architecture is different than a
polling architecture.  I agree that given an event-loop architecture,
that one can build a polled architecture, but the converse is not true.
The event-loop mechanism needs something to send events, while the polling
system does not.

section 2.3.1.3:
If you are going to insert C structures, why not use a real example?
  https://github.com/PJK/libcbor/blob/master/src/cbor/data.h#L164
  cbor_value -> cbor_item_t

I don't understand what the asa_nonce is for.
Is this something that the underlying GRASP library is supposed to use
internally to sort out which ASA is which?  Maybe this should be
either a UUID, or an opaque type, which might in some cases, be a file
handle, or contain one. (a la FILE *)

2.3.3 Discovery.
  1) I would prefer to be able to ask for the list of cached
     locators for an objective directly.
  2) Rather than flush them explicitely (because there might be
     other ASAs depending upon them), I'd like to do a discovery
     that asks for objectives that are at at most X miliseconds old.
     Flush is therefore X=0.
  3) In both threaded and event-loop situations, I'd like to be able
     have a function called when there are new answers, otherwise,
     I have to poll.
     (And, if a function is called, then the question as to which
     thread does the calling is important; specifically one needs
     to know which other functions one call at that point
     answer may well be none. The answer depends upon how locking
     of structures is done. The answer is easier in event-loop
     version)

2.3.4 Negotiation.
      Since the session_nonce is returned by the function, how
      can the dryrun/run ever be mixed in a single session?  maybe
      I don't know what a session is.
      Ah, it's a value/result parameters.   So, please put it into
      the input section too.

listen_negotiate.
      I think that this call is wrong in both threaded and event-loop
      use.  I think that in threaded version, I really want a new
      thread spawned off that does the right things (negotiate_wait, etc.),
      so I want to provide a function for that thread to run the negotiation.
      In event-loop, I think that I want the same thing, but in the
      function, I can't do synchronous calls, so the function has to
      be called each time.

negotiate_step:
      It says:
         Threaded implementation: Called in the same thread as
         the preceding 'request_negotiate' or 'listen_negotiate', with the
         same value of 'session_nonce'.
      but if it's in the same thread as listen_negotiate(), then I can
      only handle negotiation with a single peer in that thread, I think?
      and I don't think I'd want to call listen_negotiate() for the
      same objective.

negotiate_wait: no idea why I'd use this.

Summary: I do not object to this document going forward as Informational, as
         it represents an explanation of one implementation, and that is
         what Informational is about.
         It would be nice to have the view of multiple implementators, but
         there is no energy for that.
         While I do not object, I do not see great utility in this document.

nits:
  2.3.1.3: s/neg/negotiate/
  I found the "NEG" term in GRASP confusing, because it seems like
  NEGative, rather then NEGotiate.  I'd prefer it was spelt out in
  the API.
  s/dry/dryrun/





--
Michael Richardson <mcr+IETF@sandelman.ca>, Sandelman Software Works
 -= IPv6 IoT consulting =-