[alto] Extensible incremental update encoding discussion thread

"Y. Richard Yang" <yry@cs.yale.edu> Fri, 31 March 2017 01:01 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 5B32012948A for <alto@ietfa.amsl.com>; Thu, 30 Mar 2017 18:01:50 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.7
X-Spam-Level:
X-Spam-Status: No, score=-1.7 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.197, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=no 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 U0oIIs8r2TFJ for <alto@ietfa.amsl.com>; Thu, 30 Mar 2017 18:01:48 -0700 (PDT)
Received: from mail-wr0-x233.google.com (mail-wr0-x233.google.com [IPv6:2a00:1450:400c:c0c::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 3DB9D12869B for <alto@ietf.org>; Thu, 30 Mar 2017 18:01:47 -0700 (PDT)
Received: by mail-wr0-x233.google.com with SMTP id w43so83641756wrb.0 for <alto@ietf.org>; Thu, 30 Mar 2017 18:01:47 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:from:date:message-id:subject:to; bh=IH7pJvjMviZrYfin3lRR33CYZyJR8JoFWfXkaQZRDNM=; b=Cgcj/LsKu52a/orG6dQzf+chgPbQqaCzghdk+/iadOt9ULUk2Yd85G66Kv+QnHbQZ+ O7pCzexOG3f0CuggAOKEab4qwPEo+LliX0HLmITj8h/Dw/X0yz/yAj6XMNXTSooyg3hk 112Q9QGr/q4DzKkCc0MYlPjFXkozrLmkptcYODfPBfE/2qBPDaIMdPvnuqQBqc/0djPA uBe9+9vgCmuLA/WrKCQz+t26snDEObbtrfZBarT/Am8Znrw41q9LCH6Z0R/6yNhF/ls2 XJ60W/PuxA0+70+J0QO6mfLXtuNT0c1ajMdGvQFr8OMZOKWBvIzZUoKlgW/0XdnZTgiH ggrg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:from:date:message-id:subject :to; bh=IH7pJvjMviZrYfin3lRR33CYZyJR8JoFWfXkaQZRDNM=; b=ELdu3V6PY2qQDii4wvCxN31/6y6BYfsOo1LuuyF93WA2cGW8F2vzg7xQ9MlyE2yAbs UTzhy9HdKMxkI5RjtIydEhRZLJQD+r4jbXHi/VPSPFFHeJeWB+pQNqu4bjL2vCkmIRyl NRdjYxs5VWXjP71yoKCG9EMecwI7lDPQqmHpoi5yNChLjOhRpmBy6vgn5BNNwlIgxVcT ir/cMuGCKW6Cf/dnOLokI8jBQub54Ou2d3pH95ZfABoVUJkFTLKGs+mo3LL3mM/hYL5g +NM6BwbVBWcJP2OA9rI4Xv+K4FVgVy1CM2iBFUdq06ml6pK+eoz/6m4BHNf3okF41o+D +0jw==
X-Gm-Message-State: AFeK/H0CicHa7tYijafI5Pk11Ga8/G7F+9Cbznvbe3n7X2n2kye1loWGmftsCGOZVilA1NaO9SHmQ1l6D2vEzA==
X-Received: by 10.28.214.149 with SMTP id n143mr658684wmg.127.1490922105663; Thu, 30 Mar 2017 18:01:45 -0700 (PDT)
MIME-Version: 1.0
Sender: yang.r.yang@gmail.com
Received: by 10.28.13.194 with HTTP; Thu, 30 Mar 2017 18:01:45 -0700 (PDT)
From: "Y. Richard Yang" <yry@cs.yale.edu>
Date: Thu, 30 Mar 2017 21:01:45 -0400
X-Google-Sender-Auth: izJwXmBZrx9W_y06sKnFTezMGXI
Message-ID: <CANUuoLrkbZBGfDxeQ4MTerb=R=1DS1H-ZkuPxz6kypnbEv3Oeg@mail.gmail.com>
To: IETF ALTO <alto@ietf.org>
Content-Type: multipart/alternative; boundary="001a11469faa7ef976054bfc5a70"
Archived-At: <https://mailarchive.ietf.org/arch/msg/alto/XgvZXhr0PsqAU8CGfEwel1ClIBM>
Subject: [alto] Extensible incremental update encoding discussion thread
X-BeenThere: alto@ietf.org
X-Mailman-Version: 2.1.22
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: Fri, 31 Mar 2017 01:01:50 -0000

Dear all,

As several members of the WG get more motivated to finish the remaining
working items as quickly as possible, we are looking at the incremental
update draft (
https://datatracker.ietf.org/doc/draft-ietf-alto-incr-update-sse/)

Although I am a co-author, Wendy did all of the heavy lifting (my hats off
to Wendy!), I can give some relatively "objective" evaluation. It is
overall a quite general, elegant design.

A key factor in deciding the next step of this work item (document) is how
much to handle extensibility of incremental update encoding. In the current
design,  we chose Merge Patch. With good foresight, this choice is not
"hard coded" in that it will be explicitly announced in IRD and indicated
in events. An example (Sec. 9.4) of IRD is:

     "update-my-costs": {
       "uri": "http://alto.example.com/updates/costs",
       "media-type": "text/event-stream",
       "accepts": "application/alto-updatestreamparams+json",
       "uses": [
          "my-network-map",
          "my-routingcost-map",
          "my-hopcount-map",
          "my-simple-filtered-cost-map"
       ],
       "capabilities": {
         "incremental-update-media-types": {
           "my-routingcost-map": application/merge-patch+json",
           "my-hopcount-map": "application/merge-patch+json"
         }
       }
     },

An example (Sec. 9.2) of flexible event encoding is:
     event: application/alto-costmap+json,hops
     data: { ... full hopcount Cost Map message ... }

        (pause)

     event: application/merge-patch+json,routing
     data: {"cost-map": {"PID2" : {"PID3" : 31}}}

Hence, one can see that the design can add other incremental update
encoding options quite cleanly. For example, to better handle updates of
array elements, we are looking at JSON Patch (
https://tools.ietf.org/html/rfc6902#appendix-A.2).

There are several options to go forward:
1. Use the current design as it is, with few changes;
2. Use the current design, but add more placeholders to emphasize/suggest
how one may add a new encoding;
3. Explicitly add JSON Patch as an encoding option;
4. 3 + 2

Since this is a relatively important decision, I have decided to send out
this email to seek comments before the WG meeting. Any points, either on
the list (preferred) or private, will be greatly appreciated!

Richard