Re: [core] Ordering question for draft-hartke-t2trg-coral

Klaus Hartke <hartke@projectcool.de> Thu, 08 August 2019 10:22 UTC

Return-Path: <hartke@projectcool.de>
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 D2E6812011C; Thu, 8 Aug 2019 03:22:36 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.9
X-Spam-Level:
X-Spam-Status: No, score=-1.9 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001, 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 Z61M6MJZSMdl; Thu, 8 Aug 2019 03:22:34 -0700 (PDT)
Received: from wp382.webpack.hosteurope.de (wp382.webpack.hosteurope.de [IPv6:2a01:488:42:1000:50ed:8597::]) (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 6F1A612011B; Thu, 8 Aug 2019 03:22:34 -0700 (PDT)
Received: from mail-qt1-f182.google.com ([209.85.160.182]); authenticated by wp382.webpack.hosteurope.de running ExIM with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) id 1hvfYz-0004Vu-V5; Thu, 08 Aug 2019 12:22:30 +0200
Received: by mail-qt1-f182.google.com with SMTP id w17so10920202qto.10; Thu, 08 Aug 2019 03:22:29 -0700 (PDT)
X-Gm-Message-State: APjAAAVwkDQktW5AMcjyZk74dr8TpvkpiXG/24E30ajZL4BpNWDzlv+m 7ObXmkmGlun/eOALs2LlTo4uoZyeSSZuqrrtGck=
X-Google-Smtp-Source: APXvYqwvT/aVVxNX+HntyBHutXWoMRVRa0MuUXqmpU5P6U9yW2ApM2NwNkfMx8+R8bdTEsCg7ruiHr3kNBjxHKjbsXs=
X-Received: by 2002:a0c:984a:: with SMTP id e10mr12438133qvd.57.1565259748928; Thu, 08 Aug 2019 03:22:28 -0700 (PDT)
MIME-Version: 1.0
References: <000201d54d40$57609210$0621b630$@augustcellars.com>
In-Reply-To: <000201d54d40$57609210$0621b630$@augustcellars.com>
From: Klaus Hartke <hartke@projectcool.de>
Date: Thu, 08 Aug 2019 12:21:52 +0200
X-Gmail-Original-Message-ID: <CAAzbHvbwRb4QEU4eiv5R9goZpCdmqY9d_byJ6xR8ngSHxQfK1A@mail.gmail.com>
Message-ID: <CAAzbHvbwRb4QEU4eiv5R9goZpCdmqY9d_byJ6xR8ngSHxQfK1A@mail.gmail.com>
To: Jim Schaad <ietf@augustcellars.com>
Cc: draft-hartke-t2trg-coral@ietf.org, "core@ietf.org WG" <core@ietf.org>
Content-Type: text/plain; charset="UTF-8"
X-bounce-key: webpack.hosteurope.de; hartke@projectcool.de; 1565259754; 1a9a2961;
X-HE-SMSGID: 1hvfYz-0004Vu-V5
Archived-At: <https://mailarchive.ietf.org/arch/msg/core/2JuTIj4kxvhmUUcqN0uPY0acJ-A>
Subject: Re: [core] Ordering question for draft-hartke-t2trg-coral
X-BeenThere: core@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
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, 08 Aug 2019 10:22:37 -0000

Hi Jim,

> In the process of working on this, I am trying to determine if there is a
> real ordering to the items in a document or not.  The only reason that I can
> see for having one is the possibility directives change the current context.
> If one stores all of this as absolute paths (or relative to a known point),
> one could synthesis the base directive on the fly when doing serialization
> and thus the order of links and forms would not be significant.

in the serializations, elements clearly have an order on the wire, and
the meaning of each elements depends on the current processor state
("current context") that changes based on the directives processed so
far:

    #base <coap://foo.example/>
    quux </1>
    #base <coap://bar.example/>
    quux </2>

is not equivalent to

    #base <coap://foo.example/>
    quux </2>
    #base <coap://bar.example/>
    quux </1>

In the data model, the question is valid whether a link `quux
<coap://foo.example/1>` followed by a link `quux
<coap://bar.example/2>` is semantically equivalent to the link `quux
<coap://bar.example/2>` followed by the link `quux
<coap://foo.example/1>`:

Is

    #base <coap://foo.example/>
    quux </1>
    #base <coap://bar.example/>
    quux </2>

equivalent to

    #base <coap://bar.example/>
    quux </2>
    #base <coap://foo.example/>
    quux </1>

?

This question is currently left open in draft-hartke-t2trg-coral-09.
I'd say the answer mostly depends on the semantics of the link
relation types. E.g.,:

* a link to the mother of a person followed by a link to their father
is probably equivalent to a link to their father followed by a link to
their mother;

* a link to a resource with sz 100 followed by a link to a resource
with sz 50 is probably not equivalent to a link with sz 50 followed a
link with size 100 if the client requests the links be sorted by sz;

* a link to a resource with ct Link-Format followed by a link to a
resource with ct CoRAL is probably not equivalent to a link with ct
CoRAL followed by a link with ct Link-Format if the server wants to
express that the CoRAL alternative should be preferred.

Klaus