[alto] Discussion on how to encode element values of a cost map
"Y. Richard Yang" <yry@cs.yale.edu> Mon, 18 July 2016 00:11 UTC
Return-Path: <yang.r.yang@gmail.com>
X-Original-To: alto@ietfa.amsl.com
Delivered-To: alto@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id E1D7D12D100 for <alto@ietfa.amsl.com>; Sun, 17 Jul 2016 17:11:11 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.597
X-Spam-Level:
X-Spam-Status: No, score=-2.597 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.001, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-0.7, 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 SFY-8zDrlXCV for <alto@ietfa.amsl.com>; Sun, 17 Jul 2016 17:11:09 -0700 (PDT)
Received: from mail-qk0-x233.google.com (mail-qk0-x233.google.com [IPv6:2607:f8b0:400d:c09::233]) (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 6F13F12D0EB for <alto@ietf.org>; Sun, 17 Jul 2016 17:11:09 -0700 (PDT)
Received: by mail-qk0-x233.google.com with SMTP id o67so144610527qke.1 for <alto@ietf.org>; Sun, 17 Jul 2016 17:11:09 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:from:date:message-id:subject:to; bh=u+EGn0fthsFh7kso6EKaMlXjqGmWZSxONEuQDaarSkA=; b=S2TnzWE1Vrc1me0+Nx3GmqLWN4zLtU5jd4frMoHkpgGY8QEHZEWPnSzIhPp9Xeuj78 VpW6aQ2Olg93mFu2Hjxmm2oqtZvyVNBTrZnM+97XYrKsu3t4Tg4qNjqFpvywQByxJhQj 6ksc0e/EBX3ZWhkt6YPVyjRp3PXZGWnla16tOf9E6iZ4egAXHQ81sTbQnL6xG20QGtkE qUJ8wCpRGLpTnG7+e3K85i1KqrJoDTTfMM5/km0hE/IPWS8jiTKjk9DdolOLJ+fpBAFp fY1ONCOWGLBh8FJRl1FO2s08HR8FCOMdmSCBD/d7owdVJaYwlDkp2rsJVOA4ik3brz0D 4pJg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:from:date:message-id:subject :to; bh=u+EGn0fthsFh7kso6EKaMlXjqGmWZSxONEuQDaarSkA=; b=SauZyUlFtqPxN/8lqE73wIBZPuADNwcsxMLkUy29Blq3nkJ39Q5exE9pjWIhpfTYZ9 UC/7EJyjXiQR6W5akfb16EC7AO65EwCq3nWpwobnGx2RAMmDBMAv9lwPnZe6XjMXrMvd kvZMS5I7wN7W59mAr/Wk+3apCFE6phJ0VqiLa8HTVDBQAdL07cKUUyjxzyTAXBfCpYuu mpoMY1U1ZqkG1+R/nl/gsbYlsDpbOvc6C1l5Xb4nkdfaBzhAg8ufqWSBL03icJnmZgPh cSPOPoql9l+2xoymFQLNmbyKroeLk4doOhdaYMMSgY+IfSjCFtokwOb8C5+TGAHrx9f+ dtvQ==
X-Gm-Message-State: ALyK8tLA5zwBfriOEn+fOjKRl/ZsXjCxrSEj8rQFQeF/q/R0efCNV5v8TIhJ0PExgUIauCCjid76qaoE+XydcQ==
X-Received: by 10.55.159.87 with SMTP id i84mr42537544qke.115.1468800668482; Sun, 17 Jul 2016 17:11:08 -0700 (PDT)
MIME-Version: 1.0
Sender: yang.r.yang@gmail.com
Received: by 10.200.38.237 with HTTP; Sun, 17 Jul 2016 17:11:08 -0700 (PDT)
From: "Y. Richard Yang" <yry@cs.yale.edu>
Date: Sun, 17 Jul 2016 20:11:08 -0400
X-Google-Sender-Auth: QczDD4KWgoQOTGzBlX8SDub5I-E
Message-ID: <CANUuoLrAXmDuLb7-p7Zfv+6WhM_kDazyc5jUvrCmiAA41S5r8w@mail.gmail.com>
To: IETF ALTO <alto@ietf.org>, "Randriamasy, Sabine (Nokia - FR)" <sabine.randriamasy@nokia.com>, Wendy Roome <wendy@wdroome.com>, Kai Gao <gaok12@mails.tsinghua.edu.cn>, Jensen Zhang <2010_fno@tongji.edu.cn>, Nico Schwan <nico.schwan@thalesgroup.com>
Content-Type: multipart/alternative; boundary="001a114d31b01744410537ddceb2"
Archived-At: <https://mailarchive.ietf.org/arch/msg/alto/VI00pkzjj4-TrDmm58zRzQrZZvo>
Subject: [alto] Discussion on how to encode element values of a cost map
X-BeenThere: alto@ietf.org
X-Mailman-Version: 2.1.17
Precedence: list
List-Id: "Application-Layer Traffic Optimization \(alto\) WG mailing list" <alto.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/alto>, <mailto:alto-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/alto/>
List-Post: <mailto:alto@ietf.org>
List-Help: <mailto:alto-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/alto>, <mailto:alto-request@ietf.org?subject=subscribe>
X-List-Received-Date: Mon, 18 Jul 2016 00:11:12 -0000
Hi all, Several of us are reviewing the documents in the WG. Here is one common issue: We see that quite a few documents depend on encoding the types of the elements in a cost map. This is a complexity that the based protocol RFC7285 identifies and hence decided to make the type the generic type JSONValue. But in the spirit of being strong typed, a specific cost map needs an indication of the type. For those who need some review, please see: - Cost Map response: https://tools.ietf.org/html/rfc7285#section-11.2.3.6 Requirements: media-type: application/alto-costmap+json meta: MUST include cost-type and dependent-tag of the network map data: "An implementation of the protocol in this document SHOULD assume that the cost is a JSONNumber and fail to parse if it is not, unless the implementation is using an extension to this document that indicates when and how costs of other data types are signaled." - Filtered Cost Map response: https://tools.ietf.org/html/rfc7285#section-11.3.2 Defined as the same as Cost Map. - Endpoint Cost Service: https://tools.ietf.org/html/rfc7285#section-11.5.1 media-type: application/alto-endpointcost+json meta: "The "meta" field of an endpoint cost response MUST include the "cost- type" field, to indicate the cost type used." The current definition of cost-type has two components: cost-mode and cost-metric, and cost-mode has two values defined: numerical and ordinal, both indicate a single number. At the same time, multiple active drafts ( https://datatracker.ietf.org/wg/alto/documents/) need compound types for the elements of a cost map: - [multi-cost] This draft is probably the one which we need to resolve the issue the most urgent. Assume that it uses the current alto-costmap+json media type, then it cannot satisfy the requirement of "meta" including cost-type. - [cost-calendar] Cost calendar requires a compound data type as well. - [fcs] fcs depends on multi-cost and hence can have an issue as well. - [path-vector] The current definition of path-vector needs a vector of network elements. - [te-metrics] It appears that this document is fine, but may need to watch on related consistency issues. The preceding is not a minor syntax/encoding issue. How to handle types is a basic problem. Conceptually, a cost map, as in the base protocol is param'ed type: Map< String, Map< String, ElemType > > (Note: Some may argue that String above should be typed identifier.) So far, we have defined ElemType to be JSONValue, and used the cost-type to indicate more specifics: if meta.cost-type.cost-mode == "numerical" ElemType is float else if meta.cost-type.mode == "ordinal" ElemType is non-negative int My personal feeling is that we may need to start to introduce new cost-mode values to allow generic types. For those who are PL experts, it is a good chance to chime in. It is an important issue that the WG may want to work together to achieve a consistent, extensible design. Cheers, Richard References: - [multi-cost] https://datatracker.ietf.org/doc/draft-ietf-alto-multi-cost/ - [cost-calendar] https://datatracker.ietf.org/doc/draft-randriamasy-alto-cost-calendar/ - [fcs] https://datatracker.ietf.org/doc/draft-gao-alto-fcs/ - [path-vector] https://datatracker.ietf.org/doc/draft-yang-alto-path-vector/ - [te-metrics] https://datatracker.ietf.org/doc/draft-wu-alto-te-metrics/
- Re: [alto] Discussion on how to encode element va… Gao Kai
- Re: [alto] Discussion on how to encode element va… Y. Richard Yang
- Re: [alto] Discussion on how to encode element va… Wendy Roome
- Re: [alto] Discussion on how to encode element va… Randriamasy, Sabine (Nokia - FR)
- Re: [alto] Discussion on how to encode element va… Gao Kai
- Re: [alto] Discussion on how to encode element va… Jensen Zhang
- [alto] Discussion on how to encode element values… Y. Richard Yang