Re: [CDNi] CI/T Triggers Interface - The Command

Kevin Ma <kevin.j.ma.ietf@gmail.com> Mon, 06 November 2023 05:34 UTC

Return-Path: <kevin.j.ma.ietf@gmail.com>
X-Original-To: cdni@ietfa.amsl.com
Delivered-To: cdni@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 43F47C1FB89C for <cdni@ietfa.amsl.com>; Sun, 5 Nov 2023 21:34:03 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -0.861
X-Spam-Level:
X-Spam-Status: No, score=-0.861 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, NORMAL_HTTP_TO_IP=0.001, NUMERIC_HTTP_ADDR=1.242, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01, URIBL_BLOCKED=0.001, URIBL_DBL_BLOCKED_OPENDNS=0.001, URIBL_ZEN_BLOCKED_OPENDNS=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 ([50.223.129.194]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id uyBxX2n40K9t for <cdni@ietfa.amsl.com>; Sun, 5 Nov 2023 21:33:58 -0800 (PST)
Received: from mail-ed1-x529.google.com (mail-ed1-x529.google.com [IPv6:2a00:1450:4864:20::529]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 4EFBBC1FB898 for <cdni@ietf.org>; Sun, 5 Nov 2023 21:33:58 -0800 (PST)
Received: by mail-ed1-x529.google.com with SMTP id 4fb4d7f45d1cf-53e751aeb3cso6605560a12.2 for <cdni@ietf.org>; Sun, 05 Nov 2023 21:33:58 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1699248836; x=1699853636; darn=ietf.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=EVVHh0ghnoMeECkyu6rdTgewta3AVKWAT/iBhFtfahU=; b=MtLS2ExepzsKW39pQo1qQm8LQu2AKHJGl+/fuaIyt00cKAnrvtwpcKlmme5DnV2Rha YBg6SUdJ4BiutixNjpzuuAFOSlLUMcEfPNsCR8WGBA6w+2oFBhC/1nvKzzJAF+HNCOOX JJTsSkNuOgWdNdrVxIqJ2BNTVPk1sjmwLEgBIlqYQf4YMpmmdObIeRXb6I0dpxKBxYwC zeuCIbGvFY1bAR3Tk9cBASNewWSFBMYuhuXSBmySrgCPw4uC2D7Wr0+ETio5r8hy+g7Q dFZyA07XpHVE/BdJlnCfh4LHcR7isdjdh+AvlHzLctg3SiDzv1LquiQ9sTXrkUpzy7tV SPmw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699248836; x=1699853636; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=EVVHh0ghnoMeECkyu6rdTgewta3AVKWAT/iBhFtfahU=; b=J0oJ+FtESN1EmeyvRAhWqW3YAr9GeD+bOuGdVzDEzda5pECNYCwRr3tt6wnomEf1eb R0u3+Wyfn13iHz9+htG2EuASZwGoCjI4L7UPm1XEjQ1CuvHEng6iNgQhb7iesmC0xCFe jNmt8XjxtwAZJnsx3dVyMqGvQwFkyPWuvaoOfDHZplQw+7/cR2K5zwDCPmzvzLyXimbg yDQXlPIgd7pzTVwzjAlposZtV4YM7byGVx/sbbedfKJunhPzplz2mK+dfxqD4EXgPPWO NGBjus2YPQkK3ScixtLYdTYGW9D5zKOLzEchDCmTDyaGQTnKnO3thwwFRkSTY3z7vZCu glUA==
X-Gm-Message-State: AOJu0Yy51QeDoajfnBEkLUzuLYkp1d4x3JbGUdpSZ68dIFZJ8sWJY/Uf 0NlzrYxASvl2FmfiCxelDmePi/htqAaPJ6/RxxA0B1wWG+g=
X-Google-Smtp-Source: AGHT+IGjFj32/pFEe1tVyBuQGKkMdMYW30UEaPxMKPi7EeYLvp3aoP7pUE8DQS2kjasUJFYRy9EKEujswBnWtJ/szjw=
X-Received: by 2002:a17:907:3f85:b0:9b2:b149:b81a with SMTP id hr5-20020a1709073f8500b009b2b149b81amr11890997ejc.64.1699248835828; Sun, 05 Nov 2023 21:33:55 -0800 (PST)
MIME-Version: 1.0
References: <CACUa7-sWtKBFaNYv4hQJuEcXgpOC4Tb=7+LNL-WDOAh+ObWiaQ@mail.gmail.com> <CAMrHYE3GxKke+N9OFH+0A6GQ2Kkw6HsRD7ZdojhMSPHn2on+xQ@mail.gmail.com> <CACUa7-sR2ierxsAZW=P-JrpGjYL21kUYec=MSprX2KzNi-cMLg@mail.gmail.com> <CACUa7-tzOw9hgQ57Y270oQAokD6gu8DJpenPMrZjw25WwjZRJQ@mail.gmail.com>
In-Reply-To: <CACUa7-tzOw9hgQ57Y270oQAokD6gu8DJpenPMrZjw25WwjZRJQ@mail.gmail.com>
From: Kevin Ma <kevin.j.ma.ietf@gmail.com>
Date: Mon, 06 Nov 2023 00:33:44 -0500
Message-ID: <CAMrHYE2HsjTP9KLD9mdc3NdE50kOTNS=B2CeTc9cRUg7LcBTdw@mail.gmail.com>
To: Nir Sopher <nirsopher@gmail.com>
Cc: cdni@ietf.org
Content-Type: multipart/alternative; boundary="0000000000003e9ec706097533eb"
Archived-At: <https://mailarchive.ietf.org/arch/msg/cdni/fw2SlbDurae4tI62sApt4rI4YTM>
Subject: Re: [CDNi] CI/T Triggers Interface - The Command
X-BeenThere: cdni@ietf.org
X-Mailman-Version: 2.1.39
Precedence: list
List-Id: "This list is to discuss issues associated with the Interconnection of Content Delivery Networks \(CDNs\)" <cdni.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/cdni>, <mailto:cdni-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/cdni/>
List-Post: <mailto:cdni@ietf.org>
List-Help: <mailto:cdni-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/cdni>, <mailto:cdni-request@ietf.org?subject=subscribe>
X-List-Received-Date: Mon, 06 Nov 2023 05:34:03 -0000

Hi All,

  (As an individual) Comments on -09 below.  It's mostly nits, but there
are a few questions as well.

thanx!

--  Kevin J. Ma

general:
  "e.g. " -> "e.g., "
  "i.e. " -> "i.e., "
  "canceled" -> "cancelled"

section 1:
  "objects comes to replace" -> "objects replace"
  "allows the better monitoring of triggers execution via the functionality
of error propagation on cascaded CDNs" -> "includes cascaded CDN error
propagation for improved trigger execution monitoring."

section 2:
  "uCDN, or" -> "uCDN or"
  "version. I.e.," -> "version, i.e.,"

section 2.1:
  "count on that" -> "rely on that"
  "can choose" -> "MAY choose"

section 2.2.1:
  "which uCDN it acquired content from" -> "from which uCDN it acquired
content"
  "HTTP 403" -> "responding with an HTTP 403"

section 3.1:
  "describe trigger action" -> "describe trigger actions"
  perhaps a reference to 6.2.6.1 for "eunsupported"

section 3.2:
  "the trigger is applied on" -> "upon which the trigger is applied"
  "individual CDNI trigger spec" -> "individual CDNI trigger specs"
  perhaps a reference to 6.2.6.1 for "espec"
  a reference to what regex standard for "url-regex-match"

section 3.2.1:
  "also specify" -> "also specifies"
  "to be matched with" -> "against which to match"
  perhaps a reference to 6.2.6.1 for "esubject"

section 3.3:
  "In this 2nd edition we define" -> "This 2nd edition defines"
  "for the trigger to be executed" -> "in which to execute the trigger"

section 4:
  "objects versions. I.e. a subsequent call" -> "object versions, i.e.,
subsequent calls"
  "dCDN, and have not" -> "dCDN and have not"
  "uCDN, or expired" -> "uCDN or expired"

section 5:
  "trigger activity" -> "trigger an activity" or "trigger activities"

section 5.2:
  "for change" -> "for changes"
  "does not exists" -> "does not exist"

section 5.4:
  "time, using" -> "time using"
  "to delete a trigger only in a terminal status, and use" -> "to only
delete terminal triggers and use"
  "It is\n\nRECOMMENDED" -> "It is RECOMMENDED"

section 5.7.1:
  "traceback an error to" -> "trace an error back to"
  "to dCDN-C and errors" -> "to dCDN-C, and errors"
  "trigger, to be able" -> "trigger, be able"
  remove "and depending on the implementation,"
  "relates to" -> "relates"
  step 7 should note that dCDN-B is also acting on it's own command in 7.1,
and dCDN-C's action is 7.2 in the diagram.

section 6:
  "6.1.4" -> "6,1,4, respectively"

section 6.1.1:
  "to act upon" -> "upon which to act"

section 6.1.3:
  this says "errors" is optional, but section 3.1, 3.2, and 3.2.1 have
MUSTs for specifying an error?  "errors" should at least be mandatory in
those cases?
  there should be individual descriptions for coll-all, coll-pending,
coll-active, coll-complete, and coll-failed
  "cdi-id" is inconsistent with "cdn" in 6.2.5

section 6.2:
  "6.1, and" -> "6.1 and"

section 6.2.5:
  "based on from the" -> "from the"
  "A Trigger Specification" -> "Array of Trigger Specifications"
  "Missing property" -> "Property omission"
  "Yes. In the case the dCDN does not like to expose this information, it
should provide its own CDN PID." -- not sure what this means?  is this
trying to say that if the dCDN doesn't want to expose the pids of its
dCDNs, it can use its own PID?

section 6.2.6:
  i question whether the paragraph about status reason is necessary here

section 6.2.6.1:
  i question why this is a subsection of 6.2.6 and not just 6.2.7
  "interface, utilizing" -> "interface using"
  "preferable method" -> "preferred method"
  "capabilities, is" -> "capabilities is"

section 6.2.2:
  "6.2.1 includes" -> "6.2.1, includes"
  "for dCDN when" -> "for dCDNs when" or "for the dCDN when"
  "for example content" -> "for example, content"

section 6.2.2.1:
  "Trigger spec in" -> "Trigger specs in"

section 6.2.3:
  "for dCDN when" -> "for dCDNs when" or "for the dCDN when"
  "it is thus the responsibility of the extension specification to define a
consistent default behavior for the case the extension is not present" --
this is confusing.  if the extension is not present, it may be the case
that the uCDN is unaware of the extensions existence, in which case the
default would have not bearing on the request, so what good is a default
behavior for an unknown extension.

section 7.2:
  "the trigger applies to" -> "to which the trigger applies"
  "content, as" -> "content as"
  "for content spec subject" -> "for the content spec subject" -- perhaps
also a ref to 3.2.1

section 7.4.1:
  for URI signing, there was a POSIX vs PCRE debate, and POSIX won.  should
the same apply here?  see:
https://mailarchive.ietf.org/arch/msg/cdni/_0Y6yyc4IjIY4cB5vunCbSA2ar0/ and
https://datatracker.ietf.org/doc/html/rfc9246#name-uri-regular-expression-cont

section 7.5:
  "content spec subject" -- perhaps a ref to 3.2.1
  "protocol to be when" -> "protocol to used be when" -- does this need to
be explicit?  can it not be inferred from either the file extension, mime
type, or file header?

section 8.2:
  "in a specific schedule" -> "on a specific schedule"
  "wish to to" -> "wish to"

section 8.2.1:
  in the json examples: the datatimes should have double quotes and there's
an extra comma after the end datatime

section 8.2.2:
  in the json examples: the datatimes should have double quotes and there's
an extra comma after the end datatime

section 8.2.3:
  seems like a lot of effort just to get a datetime with no timezone.  can
we not just use ISO8601 localtime?
https://en.wikipedia.org/wiki/ISO_8601#Local_time_(unqualified)

section 9:
  "extensions and properties" -> "extensions, and properties"
  "policies and so on" -> "policies, and so on"


On Sun, Jul 30, 2023 at 11:44 AM Nir Sopher <nirsopher@gmail.com> wrote:

> Hi All,
>
> To summarize, we would like to propose the following (already integrated
> into v08).
>
> The ci-trigger-command.v2 object is splitted into 2 objects
>
>    - ci-trigger-command.trigger.v2 - for trigger creation - to be posted
>    on the "collection" path
>    - ci-trigger-command.cancel - for trigger cancellation - to be posted
>    on the "trigger status resource" path
>
> We prefer the cancellation command to be posted on the specific resource
> path, and not support bulk operations as
>
>    1. It is more standard - make the operation on the actual resource and
>    not on the collection
>    2. Bulk operations add complexity to the API. E.g. what should be
>    returned from a cancel command in which only part of the target triggers
>    were identified? Or maybe when the command succeeded only for part of the
>    specified triggers?
>    3. We did not find real added value in bulk operations - supporting
>    bulk operations just seems to move the complexity of monitoring several
>    triggers cancellation from the uCDN to the dCDN
>
> We further considered changing the specification of the "DELETE" command
> so it would be more http standard. I.e. deletion would fail on triggers
> with execution which are in progress (not in
> "canceled"/"failed"/"succeeded" status). If an uCDN wants to cancel and
> delete a trigger it should first cancel it, monitor its status and whether
> it was really canceled, and only then delete it.
> *We decided not to make such a change* as this change is a protocol
> change which is not backward compatible. Note that a careful uCDN can just
> adopt to the methodology of "cancelling -> monitoring -> deleting" flow. We
> will add this as a comment to the draft.
>
> Best Regards,
> Sanjay&Nir
>
> On Fri, Jul 14, 2023 at 5:50 PM Nir Sopher <nirsopher@gmail.com> wrote:
>
>> Thank you Kevin for bringing up these points:)
>> See response inline.
>> Cheers,
>> Nir
>>
>>
>> On Fri, Jul 14, 2023, 07:14 Kevin Ma <kevin.j.ma.ietf@gmail.com> wrote:
>>
>>> Hi Nir,
>>>
>>> > Can anybody provide the incentive of defining a command object that
>>> augments the 2 different commands?
>>>
>>> I think your guess is correct, that it felt "simpler" at the time to
>>> just define one message and one payload type.
>>>
>>
>> [NS] ack. Thanks
>>
>>>
>>> > why did the authors prefered to cancel a trigger via a "command" sent
>>> on the collection resource path, and not a command sent on the already
>>> created trigger resource.
>>>
>>> I think the interface supports both?  the delete command can be sent to
>>> the resource where the "effect is similar to cancellation".  I think the
>>> cancel is a bulk cancel, and the delete is the individual cancel?
>>>
>>
>> [NS] I believe the "delete" command cannot replace entirely the "cancel"
>> command as the deletion does much more than canceling. After the deletion,
>> the trigger can no longer be monitored as its status resource does not
>> exist anymore - the uCDN cannot even know whether the trigger was executed
>> or not. So a designated "cancel" command is essential.
>>
>> Thinking it further, I believe that the definition of the "DELETE"
>> action, as including a cancellation, is not a standard one. A standard API
>> would probably allow "DELETE" to be called only on resources in a terminal
>> state (failed/succeed/cancel triggers) and fail with some 4xx otherwise.
>> With such an API, the uCDN would have to first "cancel" the trigger,
>> monitor it, and then, when the trigger reaches the "canceled" status,
>> delete it. This is probably an added complexity for the uCDN, but this is a
>> zero sum game - either the uCDN or the dCDN would carry the complexity.
>>
>> Wrt individual "cancel" command vs. a bulk one. My guts feeling aim to
>> the individual trigger cancel command. Creation and deletion are done on a
>> single trigger basis, and I'm not sure whether there is an added value
>> specifically in bulk deletion. Especially as the input for the cancel
>> command is the resource path, with no patterns or something like that to
>> make the uCDN life significantly easier.
>> Furthermore, bulk operation adds unnecessary complexity to the API and to
>> the dCDN side implementation. For example, what should be the response for
>> a cancel command where one of the resources does not exist? Should the
>> entire command fail or part of the trigger should be cancelled?
>>
>>>
>>> > the cdn-path property ... really needed to be included in a "cancel"
>>> command?
>>>
>>> the cdn-path is a loop detection mechanism.  I think it applies equally
>>> to cancel commands, if they are forwarded to further downstream CDNs.
>>> Whether that is likely or not can be argued, but I think the functionality
>>> still applies?
>>>
>>
>> [NS] Im not sure regarding loop detection in trigger cancellation. As I
>> see it, as cancellation is done based on the triger resource path, and not
>> by trigger description, we know that the to be canceled trigger exists and
>> valid, and that loop detection was already made during its creation. The
>> dCDN just needs to verify that the uCDN sending the cancellation command is
>> the owner/has authorization to delete the trigger. Furthermore, if deletion
>> does not check the cdn path, why should cancellation
>>
>>
>>
>>> thanx.
>>>
>>> --  Kevin J. Ma
>>>
>>>
>>> On Tue, Jul 4, 2023 at 4:38 PM Nir Sopher <nirsopher@gmail.com> wrote:
>>>
>>>> Hi,
>>>>
>>>> As you may know, we are working on preparing the "Control Interface
>>>> Triggers 2nd Edition" draft
>>>> <https://datatracker.ietf.org/doc/draft-ietf-cdni-ci-triggers-rfc8007bis/> -
>>>> preparing it for WG last call. Depreacating RFC 8007.
>>>>
>>>> During the last reviews - preparing the new draft version, we started
>>>> to wonder wrt the dual usage if the "ci-trigger-command" object /MIME type
>>>> - for both POSTing a trigger and canceling it.
>>>>
>>>> The object is built of the following properties:
>>>> 1. Trigger: a trigger specification object
>>>> 2. Cancel: URLs of existing trigger statues to be canceled
>>>> 3. cdn-path: a list if CDN pids, listing the trigger propagation path
>>>>
>>>> The "Trigger" and "Cancel" properties, are practically indirectly used
>>>> to distinguish which is the command to be executed - create a new trigger
>>>> or cancel others. Exactly one should be populated.
>>>>
>>>> Can anybody provide the incentive of defining a command object that
>>>> augments the 2 different commands? Wasn't it more strait forward to define
>>>> 2 separate objects, one for the trigger creation and one for cancelation?
>>>>
>>>> My best guess is that as these commands are both "POST"ed  to the same
>>>> resource path, the authors preferred to have a single object and MIME type
>>>> for both.
>>>>
>>>> A further question is why did the authors preferred to cancel a trigger
>>>> via a "command" sent on the collection resource path, and not a command
>>>> sent on the already created trigger resource. The object is ready and can
>>>> be managed.
>>>>
>>>> And the last question relates to the cdn-path property. This property
>>>> is mandatory, but it really needed to be included in a "cancel" command?
>>>> How should the dCDN refer to it when canceling a trigger?
>>>>
>>>> Cheers,
>>>> Nir
>>>>
>>>> _______________________________________________
>>>> CDNi mailing list
>>>> CDNi@ietf.org
>>>> https://www.ietf.org/mailman/listinfo/cdni
>>>>
>>>