Re: [icnrg] Questions about an empty name segment

Atsushi Ooka <a-ooka@ieee.org> Thu, 25 October 2018 09:21 UTC

Return-Path: <a-ooka@ieee.org>
X-Original-To: icnrg@ietfa.amsl.com
Delivered-To: icnrg@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 49242130DFD for <icnrg@ietfa.amsl.com>; Thu, 25 Oct 2018 02:21:34 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.47
X-Spam-Level:
X-Spam-Status: No, score=-2.47 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.47, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=ieee.org
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 ZJFhzqhD1w3v for <icnrg@ietfa.amsl.com>; Thu, 25 Oct 2018 02:21:31 -0700 (PDT)
Received: from mail-wm1-x32c.google.com (mail-wm1-x32c.google.com [IPv6:2a00:1450:4864:20::32c]) (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 53CF012F1AC for <icnrg@irtf.org>; Thu, 25 Oct 2018 02:21:31 -0700 (PDT)
Received: by mail-wm1-x32c.google.com with SMTP id 189-v6so765732wmw.2 for <icnrg@irtf.org>; Thu, 25 Oct 2018 02:21:31 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ieee.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :content-transfer-encoding; bh=97XseEr5N3FuB5jxyyBhsbBe2TYCToVm7aav3zmLQNM=; b=OyfQXgOU1fWqlTp9htjVIByCRQRmfHYJUWB075Hrr+tiNOxNKhbMYBvKoSy6H6uO6X foflbxifHI0DB5BdpUTgaLBMExdnopjPu4e51B/w/Fs0Hk/kAvY33SrYjCZkyYucjaWz yEUmQE9pvot8eR26h3fYbQOOOPdtcI0RQGnb0=
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:content-transfer-encoding; bh=97XseEr5N3FuB5jxyyBhsbBe2TYCToVm7aav3zmLQNM=; b=Zi9lWdkAdSmkzsD08kxsnJd1Vh5fCFIi29yXghTNSLqrbG5ZU8Zq8ujIT76BESHbQr Rvw9DX0eXeXoL+Nih/9DpYR34xIdUPI5+NPM7ihNezXpttgMpURmtreWRBa+J1LT1UOq 9dVA9vucopJzklTayTHlIAQD8y0Yve+IwUWhYmC6Sgd+Ao2E6J8sF5zAXz22vivViN+h 23nTaOEuCPxNUq8HXASfCIA1noUAeU74MBrNJomuNTKy1u7c0bcOsPSxQ+Y2XNarjAot llgvhTmJjv2Jrq1p8LfI33LUWN5SUZHQCBwNd2a0Nlo4GaE18p6CSk2vAnNjpgtXYKiu /+jA==
X-Gm-Message-State: AGRZ1gJCGRPecZwWig8ikAa9/GhxGgouiYObmfFJl5Zwlvlhe335BmqB +oO2m6N6fisp40x7x8Zx7P/Xlw8otXZddIoUFOYN3g==
X-Google-Smtp-Source: AJdET5evEQYIO8+E1EKE3mu5Gs/Oiuko0BC4x3qhDFA01zdA57SnEmyETGJHeuLIoAtMJfhOWCZGLv4tLmmRCfD8u3Y=
X-Received: by 2002:a1c:4887:: with SMTP id v129-v6mr966338wma.139.1540459289549; Thu, 25 Oct 2018 02:21:29 -0700 (PDT)
MIME-Version: 1.0
References: <CAPuTSfuHZjCJh1BPQTMavEy=5HsWs2VVx3Si6T2hsa+76=Yjww@mail.gmail.com> <09CA5EE1-D8AD-42D0-960E-C466FB04191C@parc.com> <7CB233D07722374DB3A5C088E1E8088B0102E499CA@e2010dag5.corp.ad.parc.com>
In-Reply-To: <7CB233D07722374DB3A5C088E1E8088B0102E499CA@e2010dag5.corp.ad.parc.com>
From: Atsushi Ooka <a-ooka@ieee.org>
Date: Thu, 25 Oct 2018 18:21:17 +0900
Message-ID: <CAPuTSfu9SUvJ1TE7rAjeFve6NT50hMbwk7j7jpeSesP7zsNoeQ@mail.gmail.com>
To: Marc.Mosko@parc.com, icnrg@irtf.org
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Archived-At: <https://mailarchive.ietf.org/arch/msg/icnrg/wwvpY0ynhurByVHeHLLc-15hySg>
Subject: Re: [icnrg] Questions about an empty name segment
X-BeenThere: icnrg@irtf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: Information-Centric Networking research group discussion list <icnrg.irtf.org>
List-Unsubscribe: <https://www.irtf.org/mailman/options/icnrg>, <mailto:icnrg-request@irtf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/icnrg/>
List-Post: <mailto:icnrg@irtf.org>
List-Help: <mailto:icnrg-request@irtf.org?subject=help>
List-Subscribe: <https://www.irtf.org/mailman/listinfo/icnrg>, <mailto:icnrg-request@irtf.org?subject=subscribe>
X-List-Received-Date: Thu, 25 Oct 2018 09:21:34 -0000

Dear Marc,

Thank you very much for your kind reply.
I mostly understand how to use a 0-length name, a 0-length name
component and nameless object.

Before your reply, I thought that T_APP TLV might be
application-dependent supplementary information, i.e., T_APP TLV might
be used by only applications and it might be ignored in matching
process in a router.

However, in my current understanding, T_APP TLV involves matching process.
Moreover, not only Value but also Type of name component are used in
the matching process.
If the type of 0-length name component in a FIB prefix is T_APP, the
FIB prefix acts as a typed default route.


Then, I have additional questions about the type of name component, as below.
I'd appreciate if you could answer the questions.
Thanks a lot.


(A) Is a T_NAMESEGMENT-type 0-length name segment possible on specifications?
     (Although it may not be typical and Metis [4] deletes such a name segment.)

(B) Which is correct about a FIB prefix with 0-length name component
that is NOT the 1st one? (e.g., "ccnx:/NAME=foo/APP:1=")
    (B.1) It acts as a typed default route against a name that has the
same prefix.
    (B.2) It acts as a typed wild-card that matches any name
components that has same type and is located in the same position.
        (e.g., Interest named "ccnx:/NAME=foo/APP:1=hoge/APP:2=fuga"
matches FIB prefix "ccnx:/NAME=foo/APP:1=/APP:2=fuga".)
    (B.3) The name component acts as null value and the FIB prefix
matches only a name that has the exactly same prefix.
        (i.e., Interest named "ccnx:/NAME=foo/APP:1=hoge" cannot match
FIB prefix "ccnx:/NAME=foo/APP:1=".)

(C) If (B.3) is true, is it assumed that a typed default route using
T_APP is used within only a local network?
    (This is because the 4096 types for T_APP seem to be too few
compared to the number of network applications all over the world.)

(D) If FIB has the prefix "ccnx:/NAME=", is it correct that only a
name with T_NAMESEGMENT-type 1st name component can match the prefix
and a name with T_APP-type 1st name component cannot match the prefix?

(E) The matching rule for T_ORG (organization specific) TLV is defined?
    In other words, does a incompatible router ignore the T_ORG TLV in
the matching process, or treat it as a normal name component?


Best regards,
Atsushi Ooka.
2018年10月23日(火) 5:09 <Marc.Mosko@parc.com>:
>
> A minor correction, in the example
>
> ccnx:/APP:00=gold/name=foo/name=bar => FIB prefix = ccnx:/APP:01=
> ccnx:/APP:01=gold/name=foo/name=bar => FIB prefix = ccnx:/APP:01=
>
> it should read, where the 1st FIB prefix is corrected to APP:00 from APP:01
>
> ccnx:/APP:00=gold/name=foo/name=bar => FIB prefix = ccnx:/APP:00=
> ccnx:/APP:01=gold/name=foo/name=bar => FIB prefix = ccnx:/APP:01=
>
> Marc
> ________________________________________
> From: icnrg [icnrg-bounces@irtf.org] on behalf of Marc.Mosko@parc.com [Marc.Mosko@parc.com]
> Sent: Monday, October 22, 2018 11:32 AM
> To: a-ooka@ieee.org
> Cc: icnrg@irtf.org
> Subject: Re: [icnrg] Questions about an empty name segment
>
> Dr. Ooka,
>
> Thank you for the question, as there are several important distinctions here.
>
> =================
> Definitions
> =================
>
> A Name has two primary use cases: (1) in a protocol message and in the PIT, (2) in an implementation’s FIB.
>
> In case 1, the syntax of a Name is defined in the ABNF of [2], which correspond to the “exact” name concept (Sec 3 of [2]).  It identifies a specific content object, but not including the ConObjHash restriction (which would make it a “full” name).
>
> In case 2, in the FIB, one wants the ability to specify the “prefix” name concept.  These specify a prefix of an exact name.
>
> In a protocol message (case 1), the Name maybe (1.a) missing, (1.b) exactly 1 name segment, where the 1st name segment cannot be 0 length, or (1c) more than 1 name segment, where the 1st name segment cannot be 0 length, but any or all subsequent name segments could be 0 length.  In case 1.a, it is a so-called nameless object and processed as per the specs; note that here the name is missing, it is not a 0-length name.  In the PIT, the name is the same as it is in a protocol message (as the PIT records the protocol message’s name).
>
> In the FIB in case 2, you can have (1.b) or (1.c) or a (2.a) 0-length name, or (2b) a 1-segment name with 0-length.  In case 2.a, this is considered the default route and would match any name.  In case 2.b, it is a typed default route and would match any name with a specific first name segment type.  In cases 1.b or 1.c, it works the obvious way.
>
> In ccnxmessages, a 0-length name is defined as the NAME TLV with T = T_NAME, L = 0.  A 1-segment name with 0-length is (T = T_NAME, L = 4, V = (T = x, L = 0)), where x is some name segment type.
>
> Note that in the specs we do not say how an implementation must encode a default route in its FIB.  We only specify how it is externally represented in the CCNX URI spec.  The actual value in the FIB or how the the implementation uses a default route is up to the implementation.  The default route, for example, could be in a separate data structure and only used if there’s no match in the FIB.
>
> =================
> Usage
> =================
>
> In an application (and thus in protocol messages), I do not think it is typical for a name segment to be empty, but this is a way to express a null value.  In CCNx 0.x, for example, a 0-length name segment was sometimes used because it was always short-lex sorted before any other value in the name segment.  Sometimes it used a 0-length name segment to represent the value “0” rather than encode a %00.  In CCNx 1.0 (the IETF spec), we steered away from this sort of usage because saving 1 byte was not considered as important as avoiding the confusion this sort of usage engendered.  Also, a competent compression scheme would fix the byte usage.  We preferred to encode a 0 as %00 and encode null as 0-length.
>
> Here is a simple made-up example.  An application might have some application-defined name components where the name components might be “first_name” and “middle_name” and “family_name”.  Some people might not have a middle_name and in that case the application could represent null as a 0-length name component.  Another way to represent this would be to discard the middle_name name component.
>
> Examples:
> ccnx:/name=foo/name=bar/name=my_app/APP:00=alice/APP:01=jane/APP:02=smith
> ccnx:/name=foo/name=bar/name=my_app/APP:00=bob/APP:01=/APP:02=tucker
>
> In a certain application, perhaps we use distinguished first name component types to distinguish a service, where we want different routing based on the _type_ of the name component, not the actual name.  For example, these two names should have different routing:
>
> ccnx:/APP:00=gold/name=foo/name=bar => FIB prefix = ccnx:/APP:01=
> ccnx:/APP:01=gold/name=foo/name=bar => FIB prefix = ccnx:/APP:01=
>
> Note that we are routing on the name component _type_ not the _value_.
>
> This same technique can also be used mid-way through the name, such as to distinguish between /NAME=foo/APP:00=silver and /NAME=foo/APP:01=silver.
>
> Marc
>
>
> > On Oct 22, 2018, at 3:23 AM, Atsushi Ooka <a-ooka@ieee.org> wrote:
> >
> > Dear all.
> >
> > I have some questions about an empty name segment
> > such as "ccnx:/NAME=" and "ccnx:/foo/bar/NAME=".
> >
> > Why is an empty name segment needed, and how can it be used?
> >
> > I have read Internet-Drafts (IDs) [1,2,3] and
> > confirmed the behavior of Metis [4] and iping [5];
> > however, it is not clear for me how to use them.
> >
> > Thank you in advance.
> >
> > Best regards,
> > Atsushi Ooka
> >
> > [1] https://tools.ietf.org/html/draft-irtf-icnrg-ccnxmessages-08
> > [2] https://tools.ietf.org/html/draft-irtf-icnrg-ccnxsemantics-09
> > [3] https://tools.ietf.org/html/draft-mosko-icnrg-ccnxurischeme-01
> > [4] Metis (FD.IO sb-forwareder) https://wiki.fd.io/view/Sb-forwarder
> > [5] iping (FD.IO libicnet) https://wiki.fd.io/view/Libicnet
> >
> > ----------------------------------------------------------------------
> > Atsushi Ooka, Ph.D.
> >
> > Network Science and Convergence Device Technology Laboratory,
> > Network System Research Institute,
> > National Institute of Information and Communications Technology (NICT)
> >
> > E-mail: a-ooka@ieee.org
> > Tel: +81-42-327-6847
> > URL: http://www.nict.go.jp
> > ----------------------------------------------------------------------
> >
> > _______________________________________________
> > icnrg mailing list
> > icnrg@irtf.org
> > https://www.irtf.org/mailman/listinfo/icnrg
>
> _______________________________________________
> icnrg mailing list
> icnrg@irtf.org
> https://www.irtf.org/mailman/listinfo/icnrg