<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE rfc [
  <!ENTITY nbsp    "&#160;">
  <!ENTITY zwsp   "&#8203;">
  <!ENTITY nbhy   "&#8209;">
  <!ENTITY wj     "&#8288;">
]>
<!-- edited with XMLSPY v5 rel. 3 U (http://www.xmlspy.com)
     by Daniel M Kohn (private) -->
<rfc xmlns:xi="http://www.w3.org/2001/XInclude" category="std" docName="draft-ietf-alto-new-transport-08" ipr="trust200902" obsoletes="" updates="" submissionType="IETF" xml:lang="en" tocInclude="true" symRefs="true" sortRefs="true" version="3" consensus="true">
  <!-- xml2rfc v2v3 conversion 3.12.10 -->
  <?xml-stylesheet type='text/xsl' href='rfc2629.xslt' ?>

  <front>
    <title abbrev="ALTO TIPS">The ALTO Transport Information Publication Service</title>
    <seriesInfo name="Internet-Draft" value="draft-ietf-alto-new-transport-08"/>
    <author fullname="Roland Schott" initials="R." surname="Schott">
      <organization>Deutsche Telekom</organization>
      <address>
        <postal>
          <street>Ida-Rhodes-Straße 2</street>
          <city>64295 Darmstadt</city>
          <country>Germany</country>
        </postal>
        <email>Roland.Schott@telekom.de</email>
      </address>
    </author>
    <author fullname="Y. Richard Yang" initials="Y." surname="Yang">
      <organization>Yale University</organization>
      <address>
        <postal>
          <street>51 Prospect St</street>
          <city>New Haven</city>
          <region>CT</region>
          <code>06520</code>
          <country>USA</country>
        </postal>
        <email>yry@cs.yale.edu</email>
      </address>
    </author>
    <author fullname="Kai Gao" initials="K." surname="Gao">
      <organization>Sichuan University</organization>
      <address>
        <postal>
	  <street>No.24 South Section 1, Yihuan Road</street>
          <city>Chengdu</city>
	  <region>Sichuan</region>
          <code>610065</code>
          <country>China</country>
        </postal>
        <email>kaigao@scu.edu.cn</email>
      </address>
    </author>
    <author fullname="Lauren Delwiche" initials="L." surname="Delwiche">
      <organization>Yale University</organization>
      <address>
        <postal>
          <street>51 Prospect St</street>
          <city>New Haven</city>
          <region>CT</region>
          <code>06520</code>
          <country>USA</country>
        </postal>
        <email>lauren.delwiche@yale.edu</email>
      </address>
    </author>
    <author fullname="Lachlan Keller" initials="L." surname="Keller">
      <organization>Yale University</organization>
      <address>
        <postal>
          <street>51 Prospect Street</street>
          <city>New Haven</city>
          <code>06511</code>
          <country>USA</country>
        </postal>
        <email>lachlan.keller@yale.edu</email>
      </address>
    </author>
    <date day="15" month="May" year="2023"/>
    <area>TSV Area</area>
    <workgroup>ALTO Working Group</workgroup>
    <keyword>RFC</keyword>
    <keyword>Request for Comments</keyword>
    <keyword>I-D</keyword>
    <keyword>Internet-Draft</keyword>
    <keyword>Application-Layer Traffic Optimization, HTTP/2, HTTP/3, SSE, Updates Graph</keyword>
    <abstract>
      <t>
      The ALTO Protocol (RFC 7285) leverages HTTP/1.x and is designed for the simple,
      sequential request-reply use case, in which an ALTO client requests a
      sequence of information resources, and the server responds with the complete
      content of each resource one at a time.
      </t>

      <t>
      ALTO incremental updates using Server-Sent Events (SSE) (RFC 8895) defines a multiplexing protocol on top
      of HTTP/1.x, so that an ALTO server can incrementally push resource updates
      to clients whenever monitored network information resources change, allowing the
      clients to monitor multiple resources at the same time.
      However, HTTP/2 and later versions already support concurrent, non-blocking transport of
      multiple streams in the same HTTP connection.
      </t>

      <t>
      To take advantage of newer HTTP features, this document introduces the ALTO Transport
      Information Publication Service (TIPS).  TIPS uses an incremental RESTful design to
      give an ALTO client the new capability to explicitly, concurrently (non-blocking) request (pull)
      specific incremental updates using native HTTP/2 or HTTP/3, while still
      functioning for HTTP/1.x.  TIPS also provides for an ALTO server to concurrently push specific incremental updates using native HTTP/2 or HTTP/3
      server push.
      </t>
    </abstract>
  </front>
  <middle>
    <section anchor="intro" numbered="true" toc="default">
      <name>Introduction</name>
      <t>Application-Layer Traffic Optimization (ALTO) provides means for
       network applications to obtain network status information.  So far,
       two transport protocols have been designed:</t>
       <ol>
        <li>The ALTO base protocol <xref target="RFC7285" format="default"/>, which is designed for the simple use case in
        which an ALTO client requests a network information resource, and the
        server sends the complete content of the requested information (if any)
        resource to the client.</li>
        <li>ALTO incremental updates using Server-Sent Events (ALTO/SSE) <xref target="RFC8895" format="default"/>,
        which is designed for an ALTO client to indicate to the server that it wants to
        receive updates for a set of resources, and the server can then
        concurrently, and incrementally push updates to that client whenever
        monitored resources change.</li>
       </ol>


      <t>Both protocols are designed for HTTP/1.x <xref target="RFC9112" format="default"/> and, ideally,
        they should be able to automatically take advantage of newer HTTP
        versions such as HTTP/2 <xref target="RFC9113" format="default"/>
        and HTTP/3 <xref target="RFC9114" format="default"/>.  However,
        there are issues with both protocols when higher HTTP versions are used.
        First, consider the ALTO base protocol, which is designed to transfer
        only complete information resources.  Hence, a client can run the
        base protocol on top of HTTP/2 or HTTP/3 to request multiple information
        resources concurrently, in concurrent streams, but each request must be
        for a complete information resource; there is no capability of
        transferring incremental updates.  Hence, there can be large overhead
        when the client already has an information resource and then there are
        small changes to the resource.  Next, consider ALTO/SSE.  Although ALTO/SSE
        can transfer incremental updates, it introduces a customized
        multiplexing protocol on top of HTTP, assuming a total-order message
        channel from the server to the client.  The multiplexing design does
        not provide naming (i.e., providing resource identifier) to
        individual incremental updates.  Hence, the design cannot use
        concurrent per-stream server push or non-blocking per-stream client
        pull, available in HTTP/2 and HTTP/3, because both cases require the
        resource identifier. Additionally, ALTO/SSE is a push-only protocol,
        which denies the client flexibility in choosing how and when it
        receives updates.
      </t>

      <t>This document introduces a new ALTO service called the Transport
        Information Publication Service (TIPS).  TIPS uses an incremental RESTful design to
        provide an ALTO client with a new capability to explicitly, concurrently (non-blocking) request (pull)
        specific incremental updates using native HTTP/2 or HTTP/3, while still
        functioning for HTTP/1.x.  TIPS also provides an ALTO server to concurrently push specific incremental updates using native HTTP/2 or HTTP/3
        server push. Specifically, this document specifies the following:</t>
      <ul>
        <li>Extensions to the ALTO Protocol to create, update, or remove an incrementally changing network information resource.</li>
        <li>A new resource type that specifies the TIPS updates graph model for a resource.</li>
        <li>URI patterns to fetch the snapshots or incremental updates.</li>
      </ul>

      <section anchor="requirements-language" numbered="true" toc="default">
        <name>Requirements Language</name>
        <t>
            The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
            "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY",
            and "OPTIONAL" in this document are to be interpreted as described
            in BCP 14 <xref target="RFC2119" format="default"/><xref target="RFC8174" format="default"/>
            when, and only when, they appear in all capitals, as shown here.
        </t>
      </section>

      <section anchor="notations" numbered="true" toc="default">
        <name>Notations</name>
        <t>This document uses the same syntax and notations as introduced in <xref target="RFC7285" section="8.2"/> to specify the extensions to existing ALTO resources and
            services.
        </t>
      </section>
    </section> <!-- End Intro-->

    <section anchor="altoh2overview" numbered="true" toc="default">
      <name>TIPS Overview</name>

      <section anchor="requirements" numbered="true" toc="default">
          <name>Transport Requirements</name>

          <t>Current ALTO protocol and its extensions support two transport mechanisms: First, a client can direct request an ALTO resource and obtain a complete snapshot of that ALTO resource, as specified in the base protocol <xref target="RFC7285" format="default" />; Second, a client can subscribe to incremental changes of one or multiple ALTO resources using the incremental update extension <xref target="RFC8895" format="default"/>, and a server pushes the updates to the client through a WebSocket connection.</t>

          <t>However, the current transport mechanisms are not optimized for storing,
              transmitting, and processing (incremental) updates of ALTO
              information resources. Specifically, the new transport mechanism must
          satisfy the following requirements:</t>

          <dl newline="true" spacing="normal" indent="3">
              <dt>Incremental updates:</dt>
              <dd>Incremental updates can reduce both the data storage on an ALTO server and the transmission time of the updates, especially when the change of an ALTO resource is minor.  The base protocol does not support incremental updates and the current incremental update mechanism in <xref target="RFC8895" format="default"/> has limitations (as discussed below).</dd>
              <dt>Concurrent, non-blocking update transmission:</dt>
              <dd>When a client needs to receive and apply multiple incremental updates, it is desired to transmit the updates concurrently to fully utilize the bandwidth and to reduce head-of-line blocking. The ALTO incremental update extension <xref target="RFC8895"/>, unfortunately, does not satisfy this requirement -- even though the updates can be multiplexed by the server to avoid head-of-line blocking between multiple resources, the updates are delivered sequentially and can suffer from head-of-line blocking inside the connection, for example, when there is a packet loss.</dd>
              <dt>Prefetching updates:</dt>
              <dd>Prefetching updates can reduce the time to send the request, making it possible to achieve sub-RTT transmission of ALTO incremental updates. In <xref target="RFC8895"/>, this requirement is fulfilled using server-sent event (SSE) and is still desired in the ALTO new transport.</dd>
              <dt>Backward compatibility:</dt>
              <dd> While some of the previous requirements are offered by HTTP/2 <xref target="RFC9113"/> and HTTP/3 <xref target="RFC9114"/>, it is desired that the ALTO new transport mechanism can work with HTTP/1.x as many development tools and current ALTO implementations are based on HTTP/1.x.</dd>
          </dl>

          <t>The ALTO new transport specified in this document satisfies all the design requirements and hence improves the efficiency of continuous dissemination of ALTO information. The key idea is to introduce a unified data model to describe the changes (snapshots and incremental updates) of an ALTO resource, referred to as a TIPS view. Along with the data model, this document also specifies a unified naming for the snapshots and incremental updates, independent of the HTTP version. Thus, these updates can be concurrently requested. Prefetching is realized using long polling in HTTP/1.1 and using long polling or server push in higher HTTP versions.</t>
      </section>

      <section anchor="tipsinfo-terms" numbered="true" toc="default">
        <name>TIPS Terminology</name>

        <t>This document uses the following components:</t>
        <dl newline="true" spacing="normal" indent="3">

          <dt>Network information resource:</dt>
          <dd>Is a piece of retrievable information about network state, per <xref target="RFC7285" format="default"/>.</dd>

          <dt>TIPS view (tv):</dt>
          <dd>Is defined in this document to be the container of incremental transport information
          about the network information resource.  Though the TIPS view
          may include other transport information, it has two basic components: updates graph (ug)
          and receiver set (rs).</dd>

          <dt>Updates graph (ug):</dt>
          <dd>Is a directed, acyclic graph that contains a sequence of incremental updates and snapshots (collectively called update items) of a network information resource,
          based on the TIPS data model defined in <xref target="basic-data-model" format="default"/>.  Each incremental update is assigned a sequence number, and a
          URI can be constructed using the sequence numbers.  A static network information resource (e.g., Cost Map, Network
          Map) may need only a single updates graph.  A dynamic network
          information resource (e.g., Filtered Cost Map) may create an
          updates graph (within a new TIPS view) for each unique filter request.</dd>

          <dt>Receiver set (rs):</dt>
          <dd>Contains the set of clients who have requested to receive server push updates.</dd>

          <dt>Snapshot:</dt>
          <dd>Is a full replacement of a resource and is contained within an updates graph.</dd>

          <dt>Incremental update:</dt>
          <dd>Is a partial replacement of a resource contained within an updates graph, codified in this document as a JSON Merge Patch or JSON Patch.</dd>

          <dt>Update item:</dt>
          <dd>Refers to the content on an edge of the updates graph, which can be either a snapshot or incremental update.</dd>

          <dt>ID#i-#j:</dt>
          <dd>Denotes the update item (op, data) on a specific edge in the updates graph to transition from version at node i to version at node j,
          where i and j are the respective sequence numbers of the nodes the edge connects.</dd>

          <dt>Information Resource Directory (IRD):</dt>
          <dd>Contains a list of available information resources provided by an
          ALTO server that can be requested by ALTO clients, per <xref target="RFC7285" format="default"/>.
          Each entry in an IRD indicates a URI at which an ALTO server
          accepts requests, and returns either an information resource or an information resource
          directory that references additional information resources.  An ALTO server's IRD MAY
          define one or more transport information publication services, which ALTO clients use
          to request new TIPS instances. See <xref target="tips-ird" format="default"/> for more details.</dd>

        </dl>
        <t>Figure 4 shows an example illustrating the TIPS abstraction.
           Each ALTO client (Client 1, Client 2, or Client 3)
           maintains a single HTTP connection with the ALTO server.
        </t>

        <figure anchor="FigInfoStruct">
          <name>ALTO Transport Information</name>
          <artwork name="" type="" align="left" alt=""><![CDATA[

Network Information Resource:

a) Static resource (#1) such as NetworkMap
b) Filterable resource (#3) such as FilteredCostMap


                                   +-------------+
    +-----------+ +--------------+ |  Dynamic    | +-----------+
    |  Routing  | | Provisioning | |  Network    | | External  |
    | Protocols | |    Policy    | | Information | | Interface |
    +-----------+ +--------------+ +-------------+ +-----------+
          |              |                |              |
          |              |                |              |
+----------------------------------------------------------------------+
| ALTO Server                                                          |
|                                                                      |
| +------------------------------------------------------------------+ |
| |                                              Network Information | |
| |                                                                  | |
| | +-------------+     +-------------+     +-------------+          | |
| | | Information |     | Information |     | Information |          | |
| | | Resource #1 |     | Resource #2 |     | Resource #3 |          | |
| | +-------------+     +-------------+     +-------------+          | |
| |     |                                       /     \              | |
| +-----|--------------------------------------/-------\-------------+ |
|       |                                     /         \              |
| +-----|------------------------------------/-----------\-----------+ |
| |     |       Transport Information       /             \          | |
| |     |                                  /               \         | |
| | +--------+                     +--------+        +--------+      | |
| | |  tv1   |----+          +-----|  tv2   |        |  tv3   |---+  | |
| | +--------+    |          |     +--------+        +--------+   |  | |
| |     |         |          |           |             |          |  | |
| | +--------+ +--------+ +--------+ +--------+ +--------+ +--------+| |
| | | tv1/ug | | tv1/rs | | tv2/ug | | tv2/rs | | tv3/ug | | tv3/rs || |
| | +--------+ +--------+ +--------+ +--------+ +--------+ +--------+| |
| +----|\---------/\---------|---------/---------------|-------------+ |
|      | \       /  \        |        /                |               |
+------|--\-----/----\-------|-------/-----------------|---------------+
       |   \   /      \      |      /                  |
       |    +-/-----+  \     |     /                   |
       |     /       \  \    |    /  A single          |   A single
     ==|====/==     ==\==\===|===/== HTTP/2 or /3    ==|== HTTP/1.x
       |   /           \  \  |  /    connection        |   connection
   +----------+       +----------+                 +----------+
   | Client 1 |       | Client 2 |                 | Client 3 |
   +----------+       +----------+                 +----------+

tvi   = TIPS view i
tvi/ug = incremental updates graph associated with tsi
tvi/rs = receiver set of tvi (for server push)

      ]]></artwork>
        </figure>
      </section>
    </section>
    <!-- end of overview -->

    <section anchor="tips-updates-graph" numbered="true" toc="default">
      <name>TIPS Updates Graph</name>
      <t>In order to provide incremental updates for a resource, an ALTO server creates an updates graph,
      which is a directed, acyclic graph that contains a sequence of incremental updates and snapshots
      (collectively called update items) of a network information resource.</t>

    <section anchor="basic-data-model" numbered="true" toc="default">
      <name>Basic Data Model of Updates Graph</name>

      <t>For each resource (e.g., a cost map, network map), the incremental
      updates and snapshots can be represented using the following directed acyclic graph model,
      where the server maps base resource IDs to incremental update IDs that are assigned sequentially (i.e., incremented by 1 each time):</t>
      <ul>
        <li>Each node in the graph is a version of the resource, where a tag identifies
        content of version (tag is valid only within the scope of resource).
        Version 0 is reserved as the initial state (empty/null).</li>
        <li>Each edge is transport data (update item). In particular, edge from i to j is
        the (op, data) to transition version from version i to version j.</li>
        <li>Node content is path independent (different paths arrive at the same content)</li>
      </ul>
      <t>A concrete example is as shown in <xref target="data-model" format="default"/>.
      Thick lines represent mandatory incremental updates, dotted lines represent optional incremental updates, and thin lines represent snapshots.
      Note that node content is path independent: the content can be obtained
      by applying the updates from different paths.  For example, assume the client already has version at 103: the version at 105
      can either be directly fetched as a snapshot, computed incrementally by applying the incremental updates between
      103 and 104, then 104 and 105, or if the optional update from 103 to 105 exists, computed incrementally by applying the incremental updates from 103 and 105.</t>

      <figure anchor="data-model">
        <name>TIPS Model Example</name>
        <artwork name="" type="" align="left" alt=""><![CDATA[
                                                  +======+
                                                 -|  0   |
                                                / +======+
                                               /      |  \
                                     ID0-101  /       |   |
                                             /        |   |
                                           |/__       |   |
                                    +======+          |   |
               tag: 109783421097 -> | 101  |          |   |
                                    +======+          |   |
                                       ||             |   |
                            ID101-102  ||             |   |
                                       \/             |   |
                                    +======+          |   |
               tag: 123566431234 -> | 102  |          |   |
                                    +======+          |   |
                                       ||             |   |
                            ID102-103  ||             |   |
                                       \/             |   |
                                    +======+          /   |
               tag: 123400881080 -> | 103  |<--------/    |
+---------------+                   +======+ ID0-103      |
| Base Resource |  =====>              ||   ..            |
+---------------+           ID103-104  ||    ..           |
                                       \/     ..          |
                                    +======+  ..          |
               tag: 123566452654 -> | 104  |  .. ID103    |
                                    +======+  .. -105     |
                                       ||     ..          | ID0-105
                            ID104-105  ||     ..          |
                                       \/   |._           /
                                    +======+             /
               tag: 123567838392 -> | 105  |<-----------/
                                    +======+
                                       ||
                            ID105-106  ||
                                       \/
                                    +======+
               tag: 123566470983 -> | 106  |
                                    +======+

          tag: denotes the version of the resource at node i
          ID#i-#j: denotes update item (op, data) to transition from
                        version at node i to version at node j

      ]]></artwork>
      </figure>
    </section>
    <section anchor="location-schema" numbered="true" toc="default">
        <name>Resource Location Schema</name>
        <t>To access each individual update in an updates graph, consider the model represented
        as a "virtual" file system (adjacency list), contained within the root of a TIPS view URI (see <xref target="tips-createresp" format="default"/> for tips-view-uri definition).
        For example:</t>
        <figure anchor="location-schema-fig">
        <name>Location Schema for Figure 2</name>
        <artwork name="" type="" align="left" alt=""><![CDATA[

      <tips-view-uri>  // relative URI to TIPS view
          ug    // updates graph
              0
                  101    // full 101 snapshot
                  103
                  105
              101
                  102    // 101 -> 102 incremental update
              102
                  103
              103
                  104
                  105    // optional shortcut 103 -> 105 incr. update
              104
                  105
              105
                  106
          push           // server push metadata
            ...
          meta           // TIPS view meta
            ...

      ]]></artwork>
        </figure>

        <t>TIPS uses this file structure schema to generate template URIs which allow clients to construct
        the location of incremental updates after receiving the tips-view-uri path from the server.
        The generic template for the location of the update item on the edge from node i to node j in the updates graph is:</t>
        <artwork name="" type="" align="left" alt=""><![CDATA[
    <tips-view-uri>/ug/<i>/<j>
             ]]></artwork>

        <t> Due to the sequential nature of the update item IDs, a client can long poll a future update
        that does not yet exist (e.g., the incremental update from 106 to 107) by constructing the URI for the next edge that will be added,
        starting from the sequence number of the current last node in the graph to the next sequential node (last node sequence number + 1):</t>
        <artwork name="" type="" align="left" alt=""><![CDATA[
    GET /<tips-view-uri>/ug/<end-seq>/<end-seq + 1>
             ]]></artwork>

        </section>

        <section anchor="update-invariants" numbered="true" toc="default">
          <name>Updates Graph Modification Invariants</name>
          <t>A server MAY change its updates graph (to compact, to add nodes, etc.), but it MUST ensure that any
          resource state that it makes available is reachable by clients, either directly via a snapshot (that is, relative to 0)
          or indirectly by requesting an earlier snapshot and a contiguous set of incremental updates.  Additionally, to allow clients to
          proactively construct URIs for future update items, the ID of each added node in the updates graph must increment
          contiguously by 1.  More specifically,
          the updates graph MUST satisfy the following invariants:</t>
        <ul>
          <li>Continuity: ns -&gt; ne, anything in between ns and ne also exists (implies ni -&gt; ni + 1 update item exists),
          where ns is start-seq and ne is end-seq.</li>
          <li>Feasibility: let n0 denote the smallest version in N (where N is the complete set of nodes in the updates graph),
          the server can provide a snapshot of n0. In other words, there is always a direct link to ns, where ns is start-seq.</li>
          <li>"Right shift" only: if a server provides [n1, n2] at time t and [n1', n2'] at time t'. If t' &gt; t and get [n1', n2'], then n1' &gt;= n1 and n2' &gt;= n2.</li>
        </ul>
        <t>For example, in the case of a server compacting a resource's updates graph to conserve space, using the example model in <xref target="basic-data-model" format="default"/>, assume at time 0, the server provides the valid set [101,
        102, 103, 104, 105, 106].  At time 1, both [103, 104, 105, 106] and [105, 106] are valid sets. However, [102, 103, 104, 105, 106]
        is not a valid set as there is no snapshot of the version at 102 and [104, 105, 106] is not a valid set as there is no snapshot of the version at 104.
        Thus, there is a risk that the right content of the version at 102, in the first example, and 104, in the second example,
        cannot be obtained by a client that does not have the previous version at 101 or 103, respectively.</t>
      </section>
    </section>

    <section anchor="tipsinfo-workflow" numbered="true" toc="default">
        <name>TIPS High-level Workflow</name>

        <t>There are two ways a client can receive updates for a resource:</t>
        <ol>
          <li>Client Pull (see <xref target="client-pull" format="default"/>)</li>
          <li>Server Push (see <xref target="server-push" format="default"/>)</li>
        </ol>

        <t>At a high level, an ALTO client opens a persistent HTTP connection with an ALTO server and uses
           TIPS to retrieve a JSON object that contains a URI to a TIPS view of each network
           information resource that the client wants to monitor, along with a summary of each TIPS view
           (which provides, at minimum, the start and end sequence number of the updates graph
           and a server-recommended edge to consume first).
        </t>

        <t>In the simplest use case, for client pull, the TIPS view summary provides enough
           information for the client to continuously pull each additional
           update, resulting in the following workflow:
        </t>

        <figure anchor="FigInfoWorkflowPull">
          <name>ALTO TIPS Workflow Supporting Client Pull</name>
        <artwork name="" type="" align="left" alt=""><![CDATA[
Client                                  TIPS
  o                                       .
  | Open persistent HTTP connection       .
  |-------------------------------------->|
  |                                       .
  | POST to create/receive a TIPS view    .
  |           for resource 1              .
  | ------------------------------------> |
  | <tips-view-uri1>, <tips-view-summary> .
  |<------------------------------------- |
  |                                       .
  | GET /<tips-view-uri1>/ug/<i>/<j>      .
  | --------------------------------------|
  | content on edge i to j                .
  |<--------------------------------------|
  |                                       .
  | GET /<tips-view-uri1>/ug/<j>/<j+1>    .
  | ------------------------------------->|
  |                                       .
  |                                       .
  | content on edge j to j+1              .
  |<--------------------------------------|
  |                                       .
  | DELETE TIPS view for resource 1       .
  |-------------------------------------> |
  |                                       .
  | Close HTTP connection                 .
  |-------------------------------------->|
  o

  TIPS: Transport Information Publication Service

      ]]></artwork>
      </figure>

      <t>Note: in <xref target="FigInfoWorkflowPull" format="default"/>,
      the update item at /&lt;tips-view-uri1&gt;/ug/&lt;j&gt;/&lt;j+1&gt; may not yet
      exist, so the server holds the request until the update becomes available (long polling).</t>

      <t>A client that prefers server push can use the following workflow:</t>
        <figure anchor="FigInfoWorkflowPush">
          <name>ALTO TIPS Workflow Supporting Server Push</name>
        <artwork name="" type="" align="left" alt=""><![CDATA[
Client                                  TIPS
  o                                       .
  | Open persistent HTTP connection       .
  |-------------------------------------->|
  |                                       .
  | POST to create/receive a TIPS view    .
  |      for resource 1 and add           .
  |      self to receiver set             .
  | ------------------------------------> |
  | <tips-view-uri1>, <tips-view-summary> .
  |<------------------------------------- |
  |                                       .
  | PUSH <tips-view-uri1>/ug/<i>/<j>      .
  | <-------------------------------------|
  |                                       .
  | PUSH <tips-view-uri1>/ug/<j>/<j+1>    .
  | <-------------------------------------|
  |                                       .
  | PUT to remove self from receiver      .
  |      set of resource 1                .
  |-------------------------------------> |
  |                                       .
  | Close HTTP connection                 .
  |-------------------------------------->|
  o

  TIPS: Transport Information Publication Service

        ]]></artwork>
        </figure>
      <section anchor="tipsinfo-httpversions" numbered="true" toc="default">
        <name>TIPS With Different HTTP Versions</name>

        <t>
          The HTTP version a "https" connection uses is negotiated between client and server using the TLS ALPN extension, described in
          <xref target="RFC9113" section="3.1"/> for HTTP/2 and <xref target="RFC9114" section="3.1"/> for HTTP/3.  For a "http" connection, the explicit
          announcement of HTTP/2 or HTTP/3 support by the server is outside the scope of this document.
        </t>

        <t>
            While TIPS is designed to take advantage of newer HTTP features like
            server push and substreams for concurrent fetch, TIPS still functions with HTTP/1.x for client pull
            defined in <xref target="client-pull" format="default"/>,
            with the limitation that it cannot cancel any outstanding requests or
            fetch resources concurrently over the same connection due to the blocking nature
            of HTTP/1.x requests.  Additionally, because HTTP/1.x does not support server push,
            the use of TIPS with server push defined in <xref target="server-push" format="default"/>
            is not available if a client connects to an ALTO server with HTTP/1.x.
            If a client only capable of HTTP/1.x desires to monitor multiple resources at the same time,
            it must open multiple connections, one for each resource, so that an outstanding long-poll request
            can be issued for each resource to monitor for new updates.
            For HTTP/2 and /3, because of substreams, multiple resources can be
            monitored simultaneously.
        </t>

      </section>
      </section>

    <section anchor="tips-ird" numbered="true" toc="default">
      <name>TIPS Information Resource Directory (IRD) Announcement</name>

      <t>An ALTO server's IRD (Information Resource Directory) MAY define
          one or more transport information publication services, which
          ALTO clients use to request new TIPS instances.  An IRD entry
          defining a TIPS MUST declare the "media-type", and specify
          "capabilities" and "uses" as follows.
      </t>

      <section anchor="tips-media-type" numbered="true" toc="default">
        <name>Media Type</name>
        <t>The media type of the Transport Information Publication Service resource is
          "application/alto-tips+json".
        </t>
        </section>

        <section anchor="tips-cap" numbered="true" toc="default">
          <name>Capabilities</name>
          <t>The capabilities declaration of TIPS is modelled on that defined
            in <xref target="RFC8895" section="6.3"/>.
          </t>

        <t>Specifically, the capabilities are defined as an object of
          type TIPSCapabilities:
        </t>
        <artwork name="" type="" align="left" alt=""><![CDATA[
     object {
       IncrementalUpdateMediaTypes incremental-change-media-types;
       Boolean                     support-server-push;
     } TIPSCapabilities;

     object-map {
        ResourceID -> String;
     } IncrementalUpdateMediaTypes;
        ]]></artwork>

        <t>with field:</t>
        <dl newline="true" spacing="normal" indent="3">
          <dt>incremental-change-media-types: </dt>
          <dd>
          <t>If a TIPS can provide updates with incremental changes
              for a resource, the "incremental-change-media-types" field has an
              entry for that resource-id, and the value is the
              supported media types of the incremental change separated by commas.
              For the implementation of this specification, this will be
              "application/merge-patch+json", "application/json-patch+json",
              or "application/merge-patch+json,application/json-patch+json".
              Future extensions may define other types of incremental changes.
          </t>

          <t>When choosing the media types to encode incremental updates for a
              resource, the server MUST consider the limitations of
              the encoding.  For example, when a JSON merge patch specifies that
              the value of a field is null, its semantics are that the field is
              removed from the target and hence the field is no longer defined
              (i.e., undefined).  This, however, may not be the intended
              result for the resource, when null and undefined have different
              semantics for the resource.  In such a case, the server
              MUST choose JSON patch over JSON merge patch if JSON patch is
              indicated as a capability of the TIPS.  If the server
              does not support JSON patch to handle such a case, the server then
              needs to send a full replacement.
          </t>
          </dd>
          <dt>support-server-push: </dt>
          <dd>
          <t>The "support-server-push" field specifies whether the given TIPS
              supports server push.  If the "support-server-push"
              field is TRUE, this TIPS will allow a client to start or stop server
          push. If the field is FALSE or not present, this TIPS does not provide server push.</t>
          </dd>
        </dl>
      </section>

      <section anchor="tips-uses" numbered="true" toc="default">
        <name>Uses</name>
          <t>The "uses" attribute MUST be an array with the resource-ids of every
              network information resource for which this TIPS can provide service. </t>

          <t>This set may be any subset of the ALTO server's network information resources and may
              include resources defined in linked IRDs.  However, it is RECOMMENDED
              that the ALTO server selects a set that is closed under the resource
              dependency relationship.  That is, if a TIPS' "uses" set
              includes resource R1 and resource R1 depends on ("uses") resource R0,
              then the TIPS' "uses" set SHOULD include R0 as well as R1.
              For example, if a TIPS provides a TIPS view for a cost map, it
              SHOULD also provide a TIPS view for the network map upon which
              that cost map depends. </t>
         <t>If the set is not closed, at least one resource R1 in the "uses" field of a TIPS depends on another resource R0 which is not in the "uses" field of the same TIPS. Thus, a client cannot receive incremental updates for R0 from the same TIPS service. If the client observes in an update of R1 that the version tag for R0 has changed, it must make a request to retrieve the full content of R0, which is likely to be less efficient than receiving the incremental updates of R0.</t>
      </section>

      <section anchor="tips-ird-example" numbered="true" toc="default">
        <name>Example</name>

        <t>Extending the IRD example in <xref target="RFC8895" section="8.1"/>, below is the
          IRD of an ALTO server supporting ALTO base protocol, ALTO/SSE, and
          ALTO TIPS.
        </t>

        <artwork name="" type="" align="left" alt=""><![CDATA[
    "my-network-map": {
      "uri": "https://alto.example.com/networkmap",
      "media-type": "application/alto-networkmap+json"
    },
    "my-routingcost-map": {
      "uri": "https://alto.example.com/costmap/routingcost",
      "media-type": "application/alto-costmap+json",
      "uses": ["my-networkmap"],
      "capabilities": {
        "cost-type-names": ["num-routingcost"]
      }
    },
    "my-hopcount-map": {
      "uri": "https://alto.example.com/costmap/hopcount",
      "media-type": "application/alto-costmap+json",
      "uses": ["my-networkmap"],
      "capabilities": {
        "cost-type-names": ["num-hopcount"]
      }
    },

    "my-filtered-cost-map": {
      "uri":
        "https://alto.example.com/costmap/filtered/constraints",
      "media-type": "application/alto-costmap+json",
      "accepts": "application/alto-costmapfilter+json",
      "uses": ["my-networkmap"],
      "capabilities": {
        "cost-type-names": ["num-routingcost", "num-hopcount"],
        "cost-constraints": true
      }
    },

    "my-simple-filtered-cost-map": {
      "uri": "https://alto.example.com/costmap/filtered/simple",
      "media-type": "application/alto-costmap+json",
      "accepts": "application/alto-costmapfilter+json",
      "uses": ["my-networkmap"],
      "capabilities": {
        "cost-type-names": ["num-routingcost", "num-hopcount"],
        "cost-constraints": false
      }
    },

    "my-props": {
      "uri": "https://alto.example.com/properties",
      "media-type": "application/alto-endpointprops+json",
      "accepts": "application/alto-endpointpropparams+json",
      "capabilities": {
        "prop-types": ["priv:ietf-bandwidth"]
      }
    },

    "my-pv": {
      "uri": "https://alto.example.com/endpointcost/pv",
      "media-type": "multipart/related;
                      type=application/alto-endpointcost+json",
      "accepts": "application/alto-endpointcostparams+json",
      "capabilities": {
        "cost-type-names": [ "path-vector" ],
        "ane-properties": [ "maxresbw", "persistent-entities" ]
      }
    },

    "update-my-costs": {
      "uri": "https://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-change-media-types": {
          "my-network-map": "application/json-patch+json",
          "my-routingcost-map": "application/merge-patch+json",
          "my-hopcount-map": "application/merge-patch+json"
        },
        "support-stream-control": true
      }
    },

    "update-my-costs-tips": {
      "uri": "https://alto.example.com/updates-new/costs",
      "media-type": "application/alto-tips+json",
      "accepts": "application/alto-tipsparams+json",
      "uses": [
          "my-network-map",
          "my-routingcost-map",
          "my-hopcount-map",
          "my-simple-filtered-cost-map"
      ],
      "capabilities": {
        "incremental-change-media-types": {
          "my-network-map": "application/json-patch+json",
          "my-routingcost-map": "application/merge-patch+json",
          "my-hopcount-map": "application/merge-patch+json",
          "my-simple-filtered-cost-map": "application/merge-patch+json"
        },
        "support-server-push": true
      }
    },

    "update-my-props": {
      "uri": "https://alto.example.com/updates/properties",
      "media-type": "text/event-stream",
      "uses": [ "my-props" ],
      "accepts": "application/alto-updatestreamparams+json",
      "capabilities": {
        "incremental-change-media-types": {
          "my-props": "application/merge-patch+json"
        },
        "support-stream-control": true
      }
    },
    "update-my-pv": {
      "uri": "https://alto.example.com/updates/pv",
      "media-type": "text/event-stream",
      "uses": [ "my-pv" ],
      "accepts": "application/alto-updatestreamparams+json",
      "capabilities": {
        "incremental-change-media-types": {
          "my-pv": "application/merge-patch+json"
        },
        "support-stream-control": true
      }
    }
        ]]></artwork>

        <t>Note that it is straightforward for an ALTO sever to run HTTP/2 and
          support concurrent retrieval of multiple resources such as "my-
          network-map" and "my-routingcost-map" using multiple HTTP/2 streams.</t>

        <t>The resource "update-my-costs-tips" provides an ALTO TIPS based
          connection, and this is indicated by the media-type
          "application/alto-tips+json".</t>

      </section> <!-- IRD Sec-->

    </section> <!-- TIPS IRD -->

    <section anchor="tips-create" numbered="true" toc="default">
      <name>TIPS Open/Close</name>

      <t>Upon request, a server sends a TIPS view to a client. This TIPS view may be
      created at the time of the request or may already exist (either
      because another client has an active connection to a TIPS view for the
      same requested network resource or because the server perpetually
      maintains a TIPS view for an often-requested resource).  The server
      MAY keep track of which clients have an active connection
      to each TIPS view to determine whether or not it should delete a TIPS view
      and its corresponding updates graph and associated data. </t>

      <section anchor="tips-createreq" numbered="true" toc="default">
        <name>Open Request</name>
        <t>An ALTO client requests that the server provide a TIPS view for a
            given resource by sending an HTTP POST body with the media type
            "application/alto-tipsparams+json".  That body contains a JSON object
            of type TIPSReq, where:</t>
        <artwork name="" type="" align="left" alt=""><![CDATA[

     object {
        ResourceID   resource-id;
        [JSONString  tag;]
        [Object      input;]
        [Boolean     server-push;]
     } TIPSReq;

        ]]></artwork>
        <t>with the following fields:</t>
        <dl newline="true" spacing="normal" indent="3">
          <dt>resource-id: </dt>
          <dd>
            <t>The resource-id of an ALTO resource and MUST be in the TIPS' "uses"
                list (<xref target="tips-ird" format="default"/>).  If a client does not support all incremental methods
                from the set announced in the server's capabilities, the client
                MUST NOT use the TIPS service.
              </t>
          </dd>
          <dt>tag: </dt>
          <dd>
            <t>If the resource-id is a GET-mode resource with a version tag (or "vtag"), as defined in
                <xref target="RFC7285" section="10.3"/>, and the ALTO client has
                previously retrieved a version of that resource from ALTO,
                the ALTO client MAY set the "tag" field to the tag
                part of the client's version of that resource.  The server MAY
                use the tag when calculating a recommended starting edge for the client to consume.
                Note that the client MUST support all incremental methods from the set
                announced in the server's capabilities for this resource.</t>
          </dd>
          <dt>input: </dt>
          <dd>
            <t>If the resource is a POST-mode service that requires input, the
                ALTO client MUST set the "input" field to a JSON object with the
                parameters that the resource expects.
            </t>
          </dd>
          <dt>server-push: </dt>
          <dd>
            <t>Set to TRUE if a client desires to receive updates via server push. If the value is FALSE or not present, the client does not accept server push updates. See <xref target="server-push" format="default"/> for detailed specifications.</t>
          </dd>
        </dl>
      </section>

      <section anchor="tips-createresp" numbered="true" toc="default">
        <name>Open Response</name>

        <t>The response to a valid request MUST be a JSON object of
            type AddTIPSResponse, denoted as media type "application/alto-tips+json": </t>

        <artwork name="" type="" align="left" alt=""><![CDATA[
      object {
        JSONString        tips-view-uri;
        TIPSViewSummary   tips-view-summary;
      } AddTIPSResponse;

      object {
        UpdatesGraphSummary   updates-graph-summary;
        [Boolean              server-push;]
      } TIPSViewSummary;

      object {
        JSONNumber       start-seq;
        JSONNumber       end-seq;
        StartEdgeRec     start-edge-rec;
      } UpdatesGraphSummary;

      object {
        JSONNumber       seq-i;
        JSONNumber       seq-j;
      } StartEdgeRec;
        ]]></artwork>

        <t>with the following fields:</t>
          <dl newline="true" spacing="normal" indent="3">
            <dt>tips-view-uri: </dt>
            <dd>
              <t>Relative URI to the TIPS view of a network resource,  which MUST be unique per connection,
              and is de-aliased by the server to refer to the actual location of the TIPS view which may
              be shared by other clients.
              </t>

              <t>When creating the URI for the TIPS view, TIPS MUST
                 NOT use other properties of an HTTP request, such as cookies or
                 the client's IP address, to determine the TIPS view.
                 Furthermore, TIPS MUST NOT reuse a URI for a different object
                 in the same connection.
              </t>

              <t>It is expected that there is an internal mechanism to map a
                 tips-view-uri to the TIPS view to be accessed.
                 For example, TIPS may assign a unique, internal state id to each
                 TIPS view instance.  However, the exact mechanism is left to
                 the TIPS provider.
              </t>
            </dd>
            <dt>tips-view-summary: </dt>
            <dd>
              <t>Contains both an updates-graph-summary and an optional server-push boolean value
              which is set to TRUE if and only if the client indicates server push.</t>

              <t>The updates-graph-summary field contains the starting sequence number (start-seq) of the updates graph
              and the last sequence number (end-seq) that is currently available, along with
              a recommended edge to consume (start-edge-rec).  How the server calculates the recommended edge
              depends on the implementation.  Ideally, if the client does not provide a version
              tag, the server should recommend the edge of the latest snapshot available.  If the client
              does provide a version tag, the server should calculate the cumulative size of the
              incremental updates available from that version onward and compare it to the size of the
              complete resource snapshot.  If the snapshot is bigger, the server should
              recommend the first incremental update edge starting from client's tagged version. Else,
              the server should recommend the latest snapshot edge.  If the client indicates
              server push, the recommended edge will be the first content pushed. </t>
            </dd>
          </dl>

        <t>If the request has any errors, the TIPS service MUST return an HTTP "400 Bad
            Request" to the ALTO client; the body of the response follows the generic
            ALTO error response format specified in
            <xref target="RFC7285" section="8.5.2"/>.
            Hence, an example ALTO error response has the format:
        </t>
        <artwork name="" type="" align="left" alt=""><![CDATA[
          HTTP/1.1 400 Bad Request
          Content-Length: 131
          Content-Type: application/alto-error+json
          Connection: close

          {
              "meta":{
                  "code":  "E_INVALID_FIELD_VALUE",
                  "field": "resource-id",
                  "value": "my-network-map/#"
              }
          }

        ]]></artwork>

        <t>Note that "field" and "value" are optional fields.  If the "value"
            field exists, the "field" field MUST exist.</t>

        <ul spacing="normal">
          <li>If the TIPS request does not have a "resource-id" field, the error
              code of the error message MUST be E_MISSING_FIELD and the "field"
              field SHOULD be "resource-id".  The TIPS service MUST NOT create
              any TIPS view.
          </li>

          <li>If the "resource-id" field is invalid or is not associated with
              the TIPS, the error code of the error message MUST be
              E_INVALID_FIELD_VALUE.  The "field" field SHOULD be the full path
              of the "resource-id" field, and the "value" field SHOULD be the
              invalid resource-id.
          </li>

          <li>If the resource is a POST-mode service that requires input, the
              client MUST set the "input" field to a JSON object with the
              parameters that that resource expects.  If the "input" field is
              missing or invalid, TIPS MUST return the same error response that
              resource would return for missing or invalid input
              (see <xref target="RFC7285" format="default"/>).</li>
        </ul>

      </section>

      <section anchor="tips-example" numbered="true" toc="default">
        <name>Open Example</name>
        <t>For simplicity, assume that the ALTO server is using the Basic
          authentication.  If a client with username "client1" and password
          "helloalto" wants to create a TIPS view of an ALTO Cost Map
          resource with resource ID "my-routingcost-map", it can send the
          following request:
        </t>

        <artwork name="" type="" align="left" alt=""><![CDATA[
    POST /tips HTTP/1.1
    Host: alto.example.com
    Accept: application/alto-tips+json, application/alto-error+json
    Authorization: Basic Y2xpZW50MTpoZWxsb2FsdG8K
    Content-Type: application/alto-tipsparams+json
    Content-Length: 41

    {
      "resource-id": "my-routingcost-map"
    }
        ]]></artwork>

        <t>If the operation is successful, the ALTO server returns the following message:</t>

        <artwork name="" type="" align="left" alt=""><![CDATA[
    HTTP/1.1 200 OK
    Content-Type: application/alto-tips+json
    Content-Length: 291

    {
        "tips-view-uri": "/tips/2718281828459",
        "tips-view-summary": {
          "updates-graph-summary": {
            "start-seq": 101,
            "end-seq": 106,
            "start-edge-rec" : {
              "seq-i": 0,
              "seq-j": 105
            }
          },
          "server-push": false
        }
    }
        ]]></artwork>
      </section>

      <section anchor="tips-delete" numbered="true" toc="default">
        <name>Close Request</name>

        <t>An ALTO client can indicate it no longer desires to pull/receive updates
        for a specific network resource by "deleting" the TIPS view using the returned
        tips-view-uri and the HTTP DELETE method.  Whether or not the server
            actually deletes the TIPS view is implementation dependent.  For
            example, an ALTO server may maintain a set of clients that subscribe
            to the TIPS view of a resource: a client that deletes the view is
            removed from the set, and the TIPS view is only removed when the
            dependent set becomes empty. See other potential implementations in <xref target="ops-shared" format="default"/>. The DELETE request MUST have the following format:
        </t>

        <artwork name="" type="" align="left" alt=""><![CDATA[
    DELETE /<tips-view-uri>
        ]]></artwork>

        <t>The response to a valid request MUST be 200 if success, and the corresponding
            error code if there is any error.</t>

        <t>If the connection between the client and TIPS provider is severed without a DELETE
        request having been sent, the server MUST treat it as if the client had sent a DELETE request
        because the TIPS view is, at least from the client view, per-session based.</t>

      </section>

    </section>

    <section anchor="client-pull" numbered="true" toc="default">
      <name>TIPS Data Transfers - Client Pull</name>

      <t>TIPS allows an ALTO client to retrieve the content of
         an update item from the updates graph, with an update item
         defined as the content (incremental update or snapshot) on an edge
         in the updates graph.</t>

      <section anchor="pull-request" numbered="true" toc="default">
        <name>Request</name>

        <t>The client sends an HTTP GET request, where the media
        type of an update item resource MUST be the same as
        the "media-type" field of the update item on the specified edge
        in the updates graph. </t>

        <t>For example, if the client wants to query the content of the first
           update item (0 -&gt; 101) whose media type is
           "application/alto-costmap+json", it must set the "Accept" header to
           "application/alto-costmap+json, application/alto-error+json" in the
           request.
        </t>

        <t>The GET request MUST have the following format:</t>

        <artwork name="" type="" align="left" alt=""><![CDATA[
    GET /<tips-view-uri>/ug/<i>/<j>
        ]]></artwork>

        <t>For example, if the client wants to query the content of the first
           update item (0 -&gt; 101), it will send a request to
           "/tips/2718281828459/ug/0/101".
        </t>
      </section>

      <section anchor="urs-response" numbered="true" toc="default">
        <name>Response</name>

        <t>If the request is valid (ug/&lt;i&gt;/&lt;j&gt; exists), the response is encoded as a JSON object
           whose data format is indicated by the media type.
        </t>

        <t>It is possible that a client conducts proactive fetching of future updates, by long polling updates
        that have not been listed in the directory yet. For long-poll prefetch, the client must have
        indicated the media type which may appear. It is RECOMMENDED that the server allows for at
        least the prefetch of &lt;end-seq&gt; -&gt; &lt;end-seq + 1&gt;</t>

        <t>Hence, the server processing logic SHOULD be:</t>
        <ul>
          <li>If ug/&lt;i&gt;/&lt;j&gt; exists: return content using encoding.</li>
          <li>Else if ug/&lt;i&gt;/&lt;j&gt; pre-fetch is acceptable: put request in a backlog queue.</li>
          <li>Else: return error.</li>
        </ul>

        <section anchor="server-errors" numbered="true" toc="default">
          <name>Server Processing "Error" Conditions</name>

          <t>It is RECOMMENDED that the server uses the following HTTP codes to
          indicate errors, with the media type "application/alto-error+json",
          regarding update item requests. </t>

          <ul>
            <li>404 (Not Found): if the requested TIPS view does not exist or is closed.</li>
            <li>410 (Gone): if an update has a seq that is smaller than the start-seq.</li>
            <li>415 (Unsupported Media Type): if the media type(s) accepted by the client
            does not include the media type of the update chosen by the server.</li>
            <li>425 (Too Early): if the seq exceeds the server prefetch window</li>
            <li>429 (Too Many Requests): when the number of pending (long-poll) requests
            exceeds server threshold. Server may indicate when to re-try the request in the
            "Re-Try After" headers.</li>
          </ul>
        </section>
      </section>

      <section anchor="urs-example" numbered="true" toc="default">
        <name>Example</name>

        <t>Assume the client wants to get the contents of the update item on edge 0 to 101. The
           request is:</t>

        <artwork name="" type="" align="left" alt=""><![CDATA[
    GET /tips/2718281828459/ug/0/101 HTTP/1.1
    Host: alto.example.com
    Accept: application/alto-costmap+json, application/alto-error+json
        ]]></artwork>

        <t>And the response will be:</t>

        <artwork name="" type="" align="left" alt=""><![CDATA[
    HTTP/1.1 200 OK
    Content-Type: application/alto-costmap+json
    Content-Length: 50

    { ... full replacement of my-routingcost-map ... }
        ]]></artwork>
      </section>

      <section anchor="new-edge" numbered="true" toc="default">
        <name>New Next Edge Recommendation</name>

        <t>While intended TIPS usage is for the client to recieve a recommended starting edge in the TIPS summary,
        consume that edge, then construct all future URIs by incrementing the sequence count by 1, there
        may be cases in which the client needs to request a new next edge to consume.  For example, if a client has
        an open TIPS view yet has not polled in a while, the client may requests the next logical incremental URI but
        the server has compacted the updates graph so it no longer exists.  Thus, the client must request a new next edge to consume
        based on its current version of the resource.</t>

      <section anchor="new-edge-request" numbered="true" toc="default">
        <name>Request</name>

        <t>An ALTO client requests that the server provide a next edge recommendation for a given TIPS view
        by sending an HTTP POST request with the media type "application/alto-tipsparams+json". The URI has the form:</t>

        <artwork name="" type="" align="left" alt=""><![CDATA[
    POST /<tips-view-uri>/ug
        ]]></artwork>

        <t>The POST body have the following form, where providing the version tag of the resource the client already has is optional:</t>

        <artwork name="" type="" align="left" alt=""><![CDATA[
    object {
        [JSONString  tag;]
     } TIPSNextEdgeReq;

        ]]></artwork>

      </section>

      <section anchor="new-edge-response" numbered="true" toc="default">
        <name>Response</name>

        <t>The response to a valid request MUST be a JSON object of type
        UpdatesGraphSummary (defined in <xref target="tips-createresp" format="default"/> but reproduced below as well), denoted as media type "application/alto-tips+json":</t>

        <artwork name="" type="" align="left" alt=""><![CDATA[
      object {
        JSONNumber       start-seq;
        JSONNumber       end-seq;
        StartEdgeRec     start-edge-rec;
      } UpdatesGraphSummary;

      object {
        JSONNumber       seq-i;
        JSONNumber       seq-j;
      } StartEdgeRec;
        ]]></artwork>

      </section>
      </section>

    </section> <!-- End Client Pull -->

    <section anchor="server-push" numbered="true" toc="default">
      <name>TIPS Data Transfer - Server Push</name>

      <t>TIPS allows an ALTO client to receive an update item pushed by the ALTO server. </t>

      <t>If a client registers for server push, it should not request updates via pull to avoid receiving the same information twice,
      unless the client does not receive the expected updates (see <xref target="ops-clientproc" format="default"/>).</t>

        <section anchor="manage-push" numbered="true" toc="default">
          <name>Manage Server Push</name>

          <t>A client starts to receive server push when it is added to the receiver set.
          A client can read the status of the push state and remove itself from the receiver set to stop server push.</t>

          <section anchor="push-start" numbered="true" toc="default">
            <name>Start Server Push</name>

            <t>A client can add itself explicitly to the receiver set or add itself to the receiver set when
            requesting the TIPS view. Before a client starts receiving server push for a TIPS view, it MUST enable server push in HTTP, i.e., following <xref target="RFC9113" section="8.4"/> for HTTP/2 and <xref target="RFC9114" section="4.6"/> for HTTP/3. If the client does not enable HTTP server push, the ALTO server MUST return an ALTO error with the E_INVALID_FIELD_VALUE code and set the "field" to "server-push".</t>

            <t>Explicit add: A client can explicitly add itself in the receiver set by using the HTTP PUT method with media type
            "application/alto-tipsparams+json", where the
            client may optionally specify a starting edge (next-edge) from which it would like to receive updates:</t>
            <artwork name="" type="" align="left" alt=""><![CDATA[
    PUT /<tips-view-uri>/push

    object {
      Boolean     server-push;
      [NextEdge    next-edge;]
    } PushState;

    object {
      JSONNumber       seq-i;
      JSONNumber       seq-j;
    } NextEdge;
          ]]></artwork>

          <t>with the following fields:</t>
          <dl newline="true" spacing="normal" indent="3">
            <dt>server-push: </dt>
            <dd>
              <t>Set to true if the client desires to receive server push updates.</t>
            </dd>
            <dt>next-edge: </dt>
            <dd>
              <t>Optional field to request a starting edge to be pushed if the client has pulled the
              updates graph directory and has calculated the path it desires to take.  The server
              MAY push this edge first if available.</t>
            </dd>
          </dl>

          <t>Short cut add: When requesting a TIPS view, an ALTO client can
          start server push by setting the option "server-push" field to be true using the HTTP POST method
          defined in <xref target="tips-createreq" format="default"/>.</t>

          <t>Example of a client requesting a TIPS view and starting server push:</t>
          <artwork name="" type="" align="left" alt=""><![CDATA[
    Client -> server request

    HEADERS
      - END_STREAM
      + END_HEADERS
        :method = POST
        :scheme = https
        :path = /tips
        host = alto.example.com
        accept = application/alto-error+json,
                      application/alto-tips+json
        content-type = application/alto-tips+json
        content-length = 67

    DATA
      - END_STREAM
      {
        "resource-id": "my-routingcost-map",
        "server-push": true
      }

    Server -> client response:

    HEADERS
      - END_STREAM
      + END_HEADERS
        :status = 200
        content-type = application/alto-tips+json
        content-length = 196

    DATA
      - END_STREAM
      {
        "tips-view-uri": "/tips/2718281828459",
        "tips-view-summary": {
          "updates-graph-summary": {
            "start-seq": 101,
            "end-seq": 106,
            "start-edge-rec" : {
              "seq-i": 0,
              "seq-j": 105
            }
          },
          "server-push": true
        }
      }

          ]]></artwork>
        </section>

        <section anchor="push-read" numbered="true" toc="default">
          <name>Read Push State</name>
          <t>A client can use the HTTP GET method, with accept header set to "application/alto-tipsparams+json"
          (defined in <xref target="push-start" format="default"/>) to check the status of server push.</t>

          <artwork name="" type="" align="left" alt=""><![CDATA[
    GET /<tips-view-uri>/push
          ]]></artwork>

          <t>Example:</t>

          <artwork name="" type="" align="left" alt=""><![CDATA[
    Client -> server request

    HEADERS
      - END_STREAM
      + END_HEADERS
        :method = GET
        :scheme = https
        :path = /tips/2718281828459/push
        host = alto.example.com
        accept = application/alto-error+json,
                      application/alto-tipsparams+json

    Server -> client response:

    HEADERS
      - END_STREAM
      + END_HEADERS
        :status = 200
        content-type = application/alto-tipsparams+json
        content-length = 519

    DATA
      - END_STREAM
      {
        "server-push": true
      }
          ]]></artwork>

      </section>

      <section anchor="push-stop" numbered="true" toc="default">
        <name>Stop Push</name>

          <t>A client can stop receiving server push updates either explicitly or
            implicitly.</t>

          <dl newline="true" spacing="normal" indent="3">
          <dt>Explicit stop:</dt>
            <dd>A client stops push by using the HTTP PUT method to
            /&lt;tips-view-uri&gt;/push, with content type
            "application/alto-tipsparams+json" and setting server-push to FALSE:</dd>
          </dl>

          <t>Implicit stop (two ways):</t>
          <ol>
            <li>TIPS view is connection ephemeral: the close of connection or
            stream for the TIPS view deletes the TIPS view from the view of the client.</li>
            <li>The client sends a DELETE /&lt;tips-view-uri&gt; request, indicating it no longer is interested
            in the resource, which also deletes the client from the push receiver set if present.</li>
          </ol>

          <t>Note that a client may choose to explicitly stop server push for a resource, but
          may not delete the TIPS view so that it can switch seamlessly from server push to
          client pull in the case that the server push frequency is undesirable, without having
          to request a new TIPS view. </t>

          <t>Example of explicit stop:</t>

          <artwork name="" type="" align="left" alt=""><![CDATA[
    Client -> server request

    HEADERS
      - END_STREAM
      + END_HEADERS
        :method = PUT
        :scheme = https
        :path = /tips/2718281828459/push
        host = alto.example.com
        accept = application/alto-error+json
        content-type = application/alto-tipsparams+json
        content-length = 69

    DATA
      - END_STREAM
      {
        "server-push": false
      }

    Server-> client response

    HEADERS
      - END_STREAM
      + END_HEADERS
        :status = 200
          ]]></artwork>

      </section>

      </section>
      <!-- receiver set -->

      <section anchor="altoh2push" numbered="true" toc="default">
        <name>Push Incremental Updates</name>

        <section anchor="altoh2pushops" numbered="true" toc="default">
          <name>Scheduling Server Push Updates</name>

          <t>The objective of the server is to push the latest version to the client using
          the lowest cost (sum of size) of the updates. Hence, it is RECOMMENDED that the
          server computes the push path using the following algorithm, upon each event computing a push:</t>
          <ul>
            <li>Compute client current version (n_c). During initialization, if the TIPS view request
            has a tag, find that version; otherwise n_c = 0</li>
            <li>Compute the shortest path from current version to latest version, n_c, n1, ... n_e (latest version). Note that
            the shortest path may not involve the tagged version and instead follow the edge from 0 to the latest snapshot.</li>
            <li>push /&lt;tips-view-uri>/ug/n_c/n1</li>
          </ul>

          <t>Note</t>
          <ul spacing="normal">
            <li>Initialization: If the client specifically requests a starting edge to be pushed, the server
              MAY start with that edge even if it is not the shortest path.</li>
            <li>Push state: the server MUST maintain the last entry pushed to the client (and hence
            per client, per connection state) and schedule next update push accordingly.</li>
            <li>Push management: The client MUST NOT cancel (RST_STREAM) a PUSH_PROMISE to avoid
            complex server state management.</li>
          </ul>
        </section>

        <section anchor="altoh2pushexamples" numbered="true" toc="default">
          <name>Examples</name>

          <t>Using the example updates graph in <xref target="basic-data-model" format="default"/>,
          a client can wait on the server for incremental push, where the server first sends PUSH_PROMISE: </t>
          <artwork name="" type="" align="left" alt=""><![CDATA[
    Server -> client PUSH_PROMISE in current stream:

    PUSH_PROMISE
      - END_STREAM
        Promised Stream 4
        HEADER BLOCK
        :method = GET
        :scheme = https
        :path = /tips/2718281828459/ug/0/101
        host = alto.example.com
        accept = application/alto-error+json,
                      application/alto-costmap+json

    Server -> client content Stream 4:

    HEADERS
      + END_STREAM
      + END_HEADERS
        :status = 200
        content-type = application/alto-costmap+json
        content-length = 539

    DATA
      + END_STREAM
      {
        "meta" : {
          "dependent-vtags" : [{
              "resource-id": "my-network-map",
              "tag": "da65eca2eb7a10ce8b059740b0b2e3f8eb1d4785"
            }],
          "cost-type" : {
            "cost-mode"  : "numerical",
            "cost-metric": "routingcost"
          },
          "vtag": {
            "resource-id" : "my-routingcost-map",
            "tag" : "3ee2cb7e8d63d9fab71b9b34cbf764436315542e"
          }
        },
        "cost-map" : {
          "PID1": { "PID1": 1,  "PID2": 5,  "PID3": 10 },
          "PID2": { "PID1": 5,  "PID2": 1,  "PID3": 15 },
          "PID3": { "PID1": 20, "PID2": 15  }
        }
    }

    Server -> client PUSH_PROMISE in current stream:

    PUSH_PROMISE
      - END_STREAM
        Promised Stream 6
        HEADER BLOCK
        :method = GET
        :scheme = https
        :path = /tips/2718281828459/ug/101/102
        host = alto.example.com
        accept = application/alto-error+json,
                      application/merge-patch+json

    Server -> client content Stream 6

    HEADERS
      + END_STREAM
      + END_HEADERS
        :status = 200
        content-type = application/merge-patch+json
        content-length = 7

    DATA
      + END_STREAM
      {
        "meta": {
            "vtag": {
              "tag": "c0ce023b8678a7b9ec00324673b98e54656d1f6d"
            }
        },
        "cost-map": {
          "PID1": {
            "PID2": 9
          },
          "PID3": {
            "PID1": null,
            "PID3": 1
          }
        }
      }
            ]]></artwork>
        </section>
      </section>

      <section anchor="altoh2streams" numbered="true" toc="default">
        <name>Server Push Stream Management</name>

        <section anchor="altoh2streampush" numbered="true" toc="default">
          <name>Server -&gt; Client [PUSH_PROMISE for updates graph on Stream SID_tq]</name>
          <t>The server push MUST satisfy the following requirements:</t>
          <ul spacing="normal">
            <li>PUSH_PROMISE MUST be sent in stream SID_tq to serialize and allow the client to know the push order;</li>
            <li>Each PUSH_PROMISE chooses a new server-selected stream ID, and the stream is closed after push.</li>
          </ul>
        </section>

      </section>
    </section>

    <section anchor="ops" numbered="true" toc="default">
      <name>Operation and Processing Considerations</name>

      <section anchor="ops-loadbalancing" numbered="true" toc="default">
         <name>Considerations for Load Balancing</name>
         <t>TIPS allow clients to make concurrent pulls of the incremental updates potentially through different HTTP connections. As a consequence, it introduces additional complexities when the ALTO server is being load balanced -- a feature widely used to build scalable and fault-tolerant web services. For example, a request may be incorrectly processed if the following two conditions both hold:</t>
         <ul spacing="normal">
           <li>the backend servers are stateful, i.e., the TIPS view is created and stored only on a single server;</li>
           <li>the ALTO server is using layer-4 load balancing, i.e., the requests are distributed based on the TCP 5-tuple.</li>
         </ul>
         <t>Thus, additional considerations are required to enable correct load balancing for TIPS, including:</t>
         <ul>
             <li>Use a stateless architecture: One solution is to follow the stateless computing pattern: states about the TIPS view are not maintained by the backend servers but are stored in a distributed database. Thus, concurrent requests to the same TIPS view can be processed on arbitrary stateless backend servers, which all fetches data from the same database.</li>
           <li>Configure the load balancers properly: In case when the backend servers are stateful, the load balancers must be properly configured to guarantee that requests of the same TIPS view always arrive at the same server. For example, an operator or a provider of an ALTO server may configure layer-7 load balancers that distribute requests based on URL or cookies.</li>
         </ul>
      </section>

      <section anchor="ops-chooseupdates" numbered="true" toc="default">
         <name>Considerations for Choosing Updates</name>

         <t>When implementing TIPS, a developer should be cognizant of the effects of update schedule, which
            includes both the choice of timing (i.e., when/what to trigger an
            update on the updates graph) and the choice of message format
            (i.e., given an update, send a full replacement or an incremental
            change).  In particular, the update schedule can have effects on both
            the overhead and the freshness of information.  To minimize overhead,
            developers may choose to batch a sequence of updates for resources
            that frequently change by cumulative updates or a full
            replacement after a while.  Developers should be
            cognizant that batching reduces the freshness of information and
            should also consider the effect of such delays on client
            behaviors.
          </t>

          <t>For incremental updates, this design allows both JSON patch and JSON
             merge patch for incremental changes.  JSON merge patch is clearly
             superior to JSON patch for describing incremental changes to cost
             maps, endpoint costs, and endpoint properties.  For these data
             structures, JSON merge patch is more space efficient, as well as
             simpler to apply.  There is no advantage allowing a server to use
            JSON patch for those resources.</t>

           <t>The case is not as clear for incremental changes to network maps.</t>

          <t>First, consider small changes, such as moving a prefix from one PID
   to another.  JSON patch could encode that as a simple insertion and
   deletion, while JSON merge patch would have to replace the entire
   array of prefixes for both PIDs.  On the other hand, to process a
   JSON patch update, the ALTO client would have to retain the indexes
   of the prefixes for each PID.  Logically, the prefixes in a PID are
   an unordered set, not an array; aside from handling updates, a client
   has no need to retain the array indexes of the prefixes.  Hence, to
   take advantage of JSON patch for network maps, ALTO clients would
   have to retain additional, otherwise unnecessary, data.</t>

          <t>Second, consider more involved changes, such as removing half of the
   prefixes from a PID.  JSON merge patch would send a new array for
   that PID, while JSON patch would have to send a list of remove
   operations and delete the prefix one by one.</t>

          <t>Therefore, each TIPS instance may choose to encode the updates
   using JSON merge patch or JSON patch based on the type of changes in
   network maps.</t>
         </section>

        <section anchor="ops-scheduling" numbered="true" toc="default">
          <name>Considerations for Cross-Resource Dependency Scheduling</name>

          <t>Dependent ALTO resources result in cross-resource dependencies in TIPS.
          Consider the following pair of resources, where my-cost-map (C) is
          dependent on my-network-map (N).  The updates graph for each resource is shown,
          along with links in between the respective updates graphs to show dependency:</t>

          <figure anchor="dependency-model">
            <name>Example Dependency Model</name>
            <artwork name="" type="" align="left" alt=""><![CDATA[
                       +---+   +---+   +---+   +---+   +---+
  my-network-map (N)   | 0 |-->|89 |-->|90 |-->|91 |-->|92 |
                       +---+   +---+   +---+   +---+   +---+
                                 |   \       \       \
                                 |    \       \       \
                       +---+   +---+   +---+   +---+   +---+
  my-cost-map (C)      | 0 |-->|101|-->|102|-->|103|-->|104|
                       +---+   +---+   +---+   +---+   +---+
                        |_______________________|
            ]]></artwork>
          </figure>

          <t>In <xref target="dependency-model" format="default"/>, the cost-map version at node 101 and 102 is dependent on
          the network-map version at node 89.  The cost-map version at node 103 is dependent on the network-map
          version at node 90, and so on.</t>

          <t>In pull-mode, a client can decide the order in which to receive the updates.</t>

          <t>In push-mode, the server must decide. Pushing order may affect how fast the client
          can build a consistent view and how long the client needs to buffer the update. </t>
          <ul>
            <li>Example 1: The server pushes N89, N90, N91, C101, C102 in that order. The client either gets no consistent
            view of the resources or it has to buffer N90 and N91 </li>
            <li>Example 2: The server pushes C101, C102, C103, N89. The client either gets no consistent view or
            it has to buffer C103. </li>
          </ul>

          <t>Therefore, the server is RECOMMENDED to push updates in the ascending order of the smallest dependent tag,
          e.g., {C101, C102, N89} before {C103, N90}</t>

        </section>

        <section anchor="ops-clientproc" numbered="true" toc="default">
          <name>Considerations for Client Processing Updates</name>

          <t>In general, when an ALTO client receives a full replacement for a
   resource, the ALTO client should replace the current version with the
   new version.  When an ALTO client receives an incremental update for
   a resource, the ALTO client should apply those updates to the current
   version of the resource.</t>

          <t>However, because resources can depend on other resources (e.g., cost
   maps depend on network maps), an ALTO client MUST NOT use a dependent
   resource if the resource on which it depends has changed.  There are
   at least two ways an ALTO client can do that.  The following
   paragraphs illustrate these techniques by referring to network and
   cost map messages, although these techniques apply to any dependent
   resources.</t>

          <t>Note that when a network map changes, the server SHOULD
   send the network map update message before sending the updates for
   the dependent cost maps.</t>

          <t>One approach is for the ALTO client to save the network map update
   message in a buffer and continue to use the previous network map and
   the associated cost maps until the ALTO client receives the update
   messages for all dependent cost maps.  The ALTO client then applies
   all network and cost map updates atomically.</t>

          <t>Alternatively, the ALTO client MAY update the network map
   immediately.  In this case, the cost maps using the network map
   become invalid because they are inconsistent with the current network
   map; hence, the ALTO client MUST mark each such dependent cost map as
   temporarily invalid and MUST NOT use each such cost map until the
   ALTO client receives a cost map update indicating that it is
   based on the new network map version tag.</t>

          <t>When implementing server push, the server SHOULD send updates for dependent resource
   (i.e., the cost maps in the preceding example) in a timely fashion.
   However, if the ALTO client does not receive the expected updates, a
   simple recovery method is that the ALTO client uses client pull to
   request the missing update.  The ALTO client MAY retain the
   version tag of the last version of any tagged resources and search
   those version tags when identifying the new updates to pull.
   Although not as efficient as possible, this recovery method is simple
   and reliable.</t>

          <t>Though a server SHOULD send update items sequentially, it is possible that a client
          receives the update items out of order (in the case of a retransmitted update item or a
          result of concurrent fetch).  The client MUST buffer the update items if they arrive out
          of order and then apply them sequentially (based upon the sequence numbers) due to the
          operation of JSON merge patch and JSON patch.</t>
        </section>

        <section anchor="ops-filtered" numbered="true" toc="default">
          <name>Considerations for Updates to Filtered Cost Maps</name>

          <t>If TIPS provides updates to a Filtered Cost Map that
   allows constraint tests, then an ALTO client MAY request updates to a
   Filtered Cost Map request with a constraint test.  In this case, when
   a cost changes, the updates graph MUST have an update if the
   new value satisfies the test.  If the new value does not, whether
   there is an update depends on whether the previous
   value satisfied the test.  If it did not, the updates graph
   SHOULD NOT have an update.  But if the previous
   value did, then the updates graph MUST add an update with a
   "null" value to inform the ALTO client that this cost no longer
   satisfies the criteria.</t>

          <t>TIPS can avoid having to handle such a complicated
   behavior by offering TIPS only for Filtered Cost Maps that
   do not allow constraint tests.</t>
         </section>

         <section anchor="ops-ordinal" numbered="true" toc="default">
          <name>Considerations for Updates to Ordinal Mode Costs</name>

           <t>For an ordinal mode cost map, a change to a single cost point may
   require updating many other costs.  As an extreme example, suppose
   the lowest cost changes to the highest cost.  For a numerical mode
   cost map, only that one cost changes.  But for an ordinal mode cost
   map, every cost might change.  While this document allows TIPS to
   offer incremental updates for ordinal mode cost
   maps, TIPS implementors should be aware that
   incremental updates for ordinal costs are more complicated than for
   numerical costs, and that small changes of the original cost value
   may result in large updates.</t>

            <t>A TIPS implementation can avoid this complication by only offering
   full replacements as updates in the updates graph for ordinal cost maps.</t>
        </section>

        <section anchor="ops-shared" numbered="true" toc="default">
            <name>Considerations for Managing Shared TIPS Views</name>
            <t>From a client's point of view, it sees only one copy of the TIPS
            view for any resource. However, on the server side, there are
            different implementation options, especially for common resources
            (e.g., network map or cost map) that may be frequently queried by
            many clients. Some potential options are listed below:</t>
            <ul>
                <li>An ALTO server creates one TIPS view of the common resource for each client. When the client deletes the view, the server deletes the view in the server storage.</li>
                <li><t>An ALTO server maintains one copy of the TIPS view for each common resource and all clients requesting the same resources use the same copy. There are two ways to manage the storage for the shared copy:</t>
                    <ul>
                        <li>the ALTO server maintains the set of clients that subscribe to the TIPS view, and only removes the view from the storage when the set becomes empty.</li>
                        <li>the TIPS view is never removed from the storage.</li>
                    </ul>
                </li>
            </ul>

            <t>Developers may choose different implementation options depending on criteria such as request frequency, available resources of the ALTO server, the ability to scale, and programming complexity.</t>
        </section>

        <section anchor="ops-shortcut" numbered="true" toc="default">
            <name>Considerations for Offering Shortcut Incremental Updates</name>

            <t>Besides the mandatory stepwise incremental updates (from i to i+1), an ALTO server may optionally offer shortcut incremental updates, or simple shortcuts, between two non-consecutive versions i and i+k (k > 1). Such shortcuts offer alternative paths in the update graph and can potentially speed up the transmission and processing of incremental updates, leading to faster synchronization of ALTO information, especially when the client has limited bandwidth and computation. However, implementors of an ALTO server must be aware that:</t>
            <ol>
                <li>Optional shortcuts may increase the size of the update graph, in the worst case being the square of the number of updates (i.e., when a shortcut is offered for each version to all future versions).</li>
                <li>Optional shortcuts require additional storage on the ALTO server.</li>
                <li>Optional shortcuts may reduce concurrency when the updates do not overlap, e.g., when the updates apply to different parts of an ALTO resource. In such a case, the total size of the original updates is close to the size of the shortcut, but the original updates can be transmitted concurrently while the shortcut is transmitted in a single connection. </li>
            </ol>
        </section>
    </section>

    <section anchor="sec-sec" numbered="true" toc="default">
       <name>Security Considerations</name>

       <t>The security considerations (<xref target="RFC7285" section="15"/>) of the base
   protocol fully apply to this extension.  For example, the same
   authenticity and integrity considerations (<xref target="RFC7285" section="15.1"/>)
   still fully apply; the same considerations for the privacy of ALTO
   users (<xref target="RFC7285" section="15.4"/>) also still fully apply.</t>

       <t>The additional services (addition of update read service and update
   push service) provided by this extension extend the attack surface
   described in <xref target="RFC7285" section="15.1.1"/>.  Below, we discuss the
   additional risks and their remedies.</t>

       <section anchor="sec-ddos" numbered="true" toc="default">
          <name>TIPS: Denial-of-Service Attacks</name>

          <t>Allowing TIPS views enables a new class of
   Denial-of-Service attacks. In particular, For the TIPS server,
   an ALTO client or clients might create an unreasonable number of TIPS views.</t>

          <t>To avoid these attacks on the TIPS server, the server SHOULD
   choose to limit the number of active views and reject new requests
   when that threshold is reached.  TIPS allows
   predictive fetching and the server SHOULD also choose to limit the
   number of pending requests.  In these cases, the server
   SHOULD return the HTTP status "429 Too many requests".</t>

          <t>It is important to note that the preceding approaches are not the
   only possibilities.  For example, it may be possible for TIPS to
   use somewhat more clever logic involving IP reputation, rate-limiting,
   and compartmentalization of the overall threshold into smaller thresholds
   that apply to subsets of potential clients.</t>
       </section>

       <section anchor="sec-overload" numbered="true" toc="default">
          <name>ALTO Client: Update Overloading or Instability</name>

          <t>The availability of continuous updates, when the client indicates
   receiving server push, can also cause overload for an
   ALTO client, in particular, an ALTO client with limited processing
   capabilities.  The current design does not include any flow control
   mechanisms for the client to reduce the update rates from the server.
   Under overloading, the client MAY choose to remove the information
   resources with high update rates.</t>

           <t>Also, under overloading, the client may no longer be able to detect
   whether information is still fresh or has become stale.  In such a
   case, the client should be careful in how it uses the information to
   avoid stability or efficiency issues.</t>
      </section>

      <section anchor="sec-spoof" numbered="true" toc="default">
          <name>Spoofed URI</name>

          <t>An outside party that can read the TIPS response or that can
   observe TIPS requests can obtain the TIPS view URI and use
   that to send fraudulent "DELETE" requests, thus disabling the service
   for the valid ALTO client.  This can be avoided by encrypting the
   requests and responses (<xref target="RFC7285" section="15"/>).</t>
         </section>

    </section>


    <section anchor="ianaconsider" numbered="true" toc="default">
      <name>IANA Considerations</name>
      <t>IANA is requested to register the following media types following the same process in <xref target="RFC7285" format="default"/>:
      </t>
      <ul spacing="normal">
        <li>application/alto-tips+json: as described in <xref target="tips-createresp" format="default"/>;</li>
        <li>application/alto-tipsparams+json: as described in <xref target="tips-createreq" format="default"/>;</li>
      </ul>
      <section numbered="true" toc="default">
        <name>application/alto-tips+json Media Type</name>
        <dl>
          <dt>Type name:</dt>
          <dd>application</dd>
          <dt>Subtype name:</dt>
          <dd>alto-tips+json</dd>
          <dt>Required parameters:</dt>
          <dd>N/A</dd>
          <dt>Optional parameters:</dt>
          <dd>N/A</dd>
          <dt>Encoding considerations:</dt>
          <dd>Encoding considerations are identical to those specified for the
          "application/json" media type. See <xref target="RFC8259" format="default"/>.
          </dd>
          <dt>Security considerations:</dt>
          <dd>Security considerations relating to the generation and consumption
          of ALTO Protocol messages are discussed in
          <xref target="RFC8895" section="10"/> and <xref target="RFC7285" section="15"/>.
          </dd>
          <dt>Interoperability considerations:</dt>
          <dd>This document specifies format of conforming messages and the
          interpretation thereof.
          </dd>
          <dt>Published specification:</dt>
          <dd><xref target="tips-createresp"/> of this document.</dd>
          <dt>Applications that use this media type:</dt>
          <dd>ALTO servers and ALTO clients either stand alone or are embedded
          within other applications.</dd>
          <dt>Fragment identifier considerations:</dt>
          <dd>N/A</dd>
          <dt>Additional information:</dt>
          <dd>
            <t><br/></t>
            <dl>
              <dt>Deprecated alias names for this type:</dt>
              <dd>N/A</dd>
              <dt>Magic number(s):</dt>
              <dd>N/A</dd>
              <dt>File extension(s):</dt>
              <dd>This document uses the media type to refer to protocol messages
              and thus does not require a file extension.</dd>
              <dt>Macintosh file type code(s):</dt>
              <dd>N/A</dd>
            </dl>
          </dd>
          <dt>Person and email address to contact for further information:</dt>
          <dd>See Authors' Addresses section.</dd>
          <dt>Intended usage:</dt>
          <dd>COMMON</dd>
          <dt>Restrictions on usage:</dt>
          <dd>N/A</dd>
          <dt>Author:</dt>
          <dd>See Authors' Addresses section.</dd>
          <dt>Change controller:</dt>
          <dd>Internet Engineering Task Force (mailto:iesg@ietf.org).</dd>
        </dl>
      </section>
      <section numbered="true" toc="default">
        <name>application/alto-tipsparams+json Media Type</name>
        <dl>
          <dt>Type name:</dt>
          <dd>application</dd>
          <dt>Subtype name:</dt>
          <dd>alto-tipsparams+json</dd>
          <dt>Required parameters:</dt>
          <dd>N/A</dd>
          <dt>Optional parameters:</dt>
          <dd>N/A</dd>
          <dt>Encoding considerations:</dt>
          <dd>Encoding considerations are identical to those specified for the
          "application/json" media type. See <xref target="RFC8259" format="default"/>.
          </dd>
          <dt>Security considerations:</dt>
          <dd>Security considerations relating to the generation and consumption
          of ALTO Protocol messages are discussed in
          <xref target="RFC8895" section="10"/> and <xref target="RFC7285" section="15"/>.
          </dd>
          <dt>Interoperability considerations:</dt>
          <dd>This document specifies format of conforming messages and the
          interpretation thereof.
          </dd>
          <dt>Published specification:</dt>
          <dd><xref target="tips-createreq"/> of this document.</dd>
          <dt>Applications that use this media type:</dt>
          <dd>ALTO servers and ALTO clients either stand alone or are embedded
          within other applications.</dd>
          <dt>Fragment identifier considerations:</dt>
          <dd>N/A</dd>
          <dt>Additional information:</dt>
          <dd>
            <t><br/></t>
            <dl>
              <dt>Deprecated alias names for this type:</dt>
              <dd>N/A</dd>
              <dt>Magic number(s):</dt>
              <dd>N/A</dd>
              <dt>File extension(s):</dt>
              <dd>This document uses the media type to refer to protocol messages
              and thus does not require a file extension.</dd>
              <dt>Macintosh file type code(s):</dt>
              <dd>N/A</dd>
            </dl>
          </dd>
          <dt>Person and email address to contact for further information:</dt>
          <dd>See Authors' Addresses section.</dd>
          <dt>Intended usage:</dt>
          <dd>COMMON</dd>
          <dt>Restrictions on usage:</dt>
          <dd>N/A</dd>
          <dt>Author:</dt>
          <dd>See Authors' Addresses section.</dd>
          <dt>Change controller:</dt>
          <dd>Internet Engineering Task Force (mailto:iesg@ietf.org).</dd>
        </dl>
      </section>
    </section>

    <section numbered="true" toc="default">
      <name>Acknowledgments</name>
      <t>The authors of this document would also like to thank Mark Nottingham and Spencer Dawkins for providing
      invaluable reviews of earlier versions of this document, Adrian Farrel, Qin Wu,
      and Jordi Ros Giralt for their continuous feedback, and Russ White, Donald Eastlake, Martin Thomson, Bernard Adoba, Spencer Dawkins and Sheng Jiang for their
      last call reviews of this document.</t>
    </section>
  </middle>

  <back>
    <references>
      <name>References</name>
      <references>
        <name>Normative References</name>
        <reference anchor="RFC2119" target="https://www.rfc-editor.org/info/rfc2119" xml:base="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.2119.xml">
          <front>
            <title>Key words for use in RFCs to Indicate Requirement Levels</title>
            <author initials="S." surname="Bradner" fullname="S. Bradner">
              <organization/>
            </author>
            <date year="1997" month="March"/>
            <abstract>
              <t>In many standards track documents several words are used to signify the requirements in the specification.  These words are often capitalized. This document defines these words as they should be interpreted in IETF documents.  This document specifies an Internet Best Current Practices for the Internet Community, and requests discussion and suggestions for improvements.</t>
            </abstract>
          </front>
          <seriesInfo name="BCP" value="14"/>
          <seriesInfo name="RFC" value="2119"/>
          <seriesInfo name="DOI" value="10.17487/RFC2119"/>
        </reference>
        <!-- requirements words -->
    <reference anchor="RFC7285" target="https://www.rfc-editor.org/info/rfc7285" xml:base="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.7285.xml">
          <front>
            <title>Application-Layer Traffic Optimization (ALTO) Protocol</title>
            <author initials="R." surname="Alimi" fullname="R. Alimi" role="editor">
              <organization/>
            </author>
            <author initials="R." surname="Penno" fullname="R. Penno" role="editor">
              <organization/>
            </author>
            <author initials="Y." surname="Yang" fullname="Y. Yang" role="editor">
              <organization/>
            </author>
            <author initials="S." surname="Kiesel" fullname="S. Kiesel">
              <organization/>
            </author>
            <author initials="S." surname="Previdi" fullname="S. Previdi">
              <organization/>
            </author>
            <author initials="W." surname="Roome" fullname="W. Roome">
              <organization/>
            </author>
            <author initials="S." surname="Shalunov" fullname="S. Shalunov">
              <organization/>
            </author>
            <author initials="R." surname="Woundy" fullname="R. Woundy">
              <organization/>
            </author>
            <date year="2014" month="September"/>
            <abstract>
              <t>Applications using the Internet already have access to some topology information of Internet Service Provider (ISP) networks.  For example, views to Internet routing tables at Looking Glass servers are available and can be practically downloaded to many network application clients.  What is missing is knowledge of the underlying network topologies from the point of view of ISPs.  In other words, what an ISP prefers in terms of traffic optimization -- and a way to distribute it.</t>
              <t>The Application-Layer Traffic Optimization (ALTO) services defined in this document provide network information (e.g., basic network location structure and preferences of network paths) with the goal of modifying network resource consumption patterns while maintaining or improving application performance.  The basic information of ALTO is based on abstract maps of a network.  These maps provide a simplified view, yet enough information about a network for applications to effectively utilize them.  Additional services are built on top of the maps.</t>
              <t>This document describes a protocol implementing the ALTO services. Although the ALTO services would primarily be provided by ISPs, other entities, such as content service providers, could also provide ALTO services.  Applications that could use the ALTO services are those that have a choice to which end points to connect.  Examples of such applications are peer-to-peer (P2P) and content delivery networks.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="7285"/>
          <seriesInfo name="DOI" value="10.17487/RFC7285"/>
        </reference>
        <!-- alto base -->
        <reference anchor="RFC8259" target="https://www.rfc-editor.org/info/rfc8259">
          <front>
            <title>The JavaScript Object Notation (JSON) Data Interchange Format</title>
            <author fullname="T. Bray" initials="T." role="editor" surname="Bray"/>
            <date month="December" year="2017"/>
            <abstract>
              <t>JavaScript Object Notation (JSON) is a lightweight, text-based, language-independent data interchange format. It was derived from the ECMAScript Programming Language Standard. JSON defines a small set of formatting rules for the portable representation of structured data.</t>
              <t>This document removes inconsistencies with other specifications of JSON, repairs specification errors, and offers experience-based interoperability guidance.</t>
            </abstract>
          </front>
          <seriesInfo name="STD" value="90"/>
          <seriesInfo name="RFC" value="8259"/>
          <seriesInfo name="DOI" value="10.17487/RFC8259"/>
          <format target="https://www.rfc-editor.org/info/rfc8259" type="TXT"/>
        </reference>
    <reference anchor="RFC8174" target="https://www.rfc-editor.org/info/rfc8174" xml:base="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.8174.xml">
          <front>
            <title>Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words</title>
            <author initials="B." surname="Leiba" fullname="B. Leiba">
              <organization/>
            </author>
            <date year="2017" month="May"/>
            <abstract>
              <t>RFC 2119 specifies common key words that may be used in protocol  specifications.  This document aims to reduce the ambiguity by clarifying that only UPPERCASE usage of the key words have the  defined special meanings.</t>
            </abstract>
          </front>
          <seriesInfo name="BCP" value="14"/>
          <seriesInfo name="RFC" value="8174"/>
          <seriesInfo name="DOI" value="10.17487/RFC8174"/>
        </reference>
        <!-- requirements words -->
    <reference anchor="RFC8895" target="https://www.rfc-editor.org/info/rfc8895" xml:base="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.8895.xml">
          <front>
            <title>Application-Layer Traffic Optimization (ALTO) Incremental Updates Using Server-Sent Events (SSE)</title>
            <author initials="W." surname="Roome" fullname="W. Roome">
              <organization/>
            </author>
            <author initials="Y." surname="Yang" fullname="Y. Yang">
              <organization/>
            </author>
            <date year="2020" month="November"/>
            <abstract>
              <t>The Application-Layer Traffic Optimization (ALTO) protocol (RFC 7285) provides network-related information, called network information resources, to client applications so that clients can make informed decisions in utilizing network resources. This document presents a mechanism to allow an ALTO server to push updates to ALTO clients to achieve two benefits: (1) updates can be incremental, in that if only a small section of an information resource changes, the ALTO server can send just the changes and (2) updates can be immediate, in that the ALTO server can send updates as soon as they are available.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="8895"/>
          <seriesInfo name="DOI" value="10.17487/RFC8895"/>
        </reference>
        <!-- ALTO SSE -->
        <reference anchor="RFC9112" target="https://www.rfc-editor.org/info/rfc9112" quoteTitle="true" derivedAnchor="HTTP/1.1">
          <front>
            <title>HTTP/1.1</title>
            <author fullname="Roy T. Fielding" initials="R." role="editor" surname="Fielding">
              <organization showOnFrontPage="true">Adobe</organization>
            </author>
            <author fullname="Mark Nottingham" initials="M." role="editor" surname="Nottingham">
              <organization showOnFrontPage="true">Fastly</organization>
            </author>
            <author fullname="Julian Reschke" initials="J." role="editor" surname="Reschke">
              <organization showOnFrontPage="true">greenbytes</organization>
            </author>
            <date month="June" year="2022"/>
          </front>
          <seriesInfo name="STD" value="99"/>
          <seriesInfo name="RFC" value="9112"/>
          <seriesInfo name="DOI" value="10.17487/RFC9112"/>
        </reference>
        <!-- HTTP/1.1 -->
        <reference anchor="RFC9113">
          <front>
            <title>HTTP/2</title>
            <author fullname="M. Thomson" initials="M." role="editor" surname="Thomson">
              <organization/>
            </author>
            <author fullname="C. Benfield" initials="C." role="editor" surname="Benfield">
              <organization/>
            </author>
            <date month="June" year="2022"/>
            <abstract>
              <t>This specification describes an optimized expression of the semantics of the Hypertext Transfer Protocol (HTTP), referred to as HTTP version 2 (HTTP/2). HTTP/2 enables a more efficient use of network resources and a reduced latency by introducing field compression and allowing multiple concurrent exchanges on the same connection.</t>
              <t>This document obsoletes RFCs 7540 and 8740.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="9113"/>
          <seriesInfo name="DOI" value="10.17487/RFC9113"/>
        </reference>
        <!-- HTTP/2 -->
      <reference anchor="RFC9114" target="https://www.rfc-editor.org/info/rfc9114" quoteTitle="true" derivedAnchor="RFC9114">
          <front>
            <title>HTTP/3</title>
            <author fullname="M. Bishop" initials="M." role="editor" surname="Bishop"/>
            <date month="June" year="2022"/>
            <abstract>
              <t indent="0">The QUIC transport protocol has several features that are desirable in a transport for HTTP, such as stream multiplexing, per-stream flow control, and low-latency connection establishment.  This document describes a mapping of HTTP semantics over QUIC.  This document also identifies HTTP/2 features that are subsumed by QUIC and describes how HTTP/2 extensions can be ported to HTTP/3.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="9114"/>
          <seriesInfo name="DOI" value="10.17487/RFC9114"/>
          <format target="https://www.rfc-editor.org/info/rfc9114" type="TXT"/>
        </reference>
        <!-- HTTP/3 -->
      </references>
      <references>
        <name>Informative References</name>

          <reference anchor="draft-schott-alto-new-transport-push" target="https://datatracker.ietf.org/doc/draft-schott-alto-new-transport-push/">
          <front>
            <title>ALTO New Transport: Server Push</title>
            <author initials="R." surname="Schott" fullname="R. Schott">
              <organization/>
            </author>
            <author initials="Y." surname="Yang" fullname="Y. Yang">
              <organization/>
            </author>
            <date year="2022" month="October"/>
          </front>
          <seriesInfo name="Internet Draft" value="ID"/>
        </reference>

        <reference anchor="RFC7971" target="https://www.rfc-editor.org/info/rfc7971" xml:base="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.7971.xml">
          <front>
            <title>Application-Layer Traffic Optimization (ALTO) Deployment Considerations</title>
            <author initials="M." surname="Stiemerling" fullname="M. Stiemerling">
              <organization/>
            </author>
            <author initials="S." surname="Kiesel" fullname="S. Kiesel">
              <organization/>
            </author>
            <author initials="M." surname="Scharf" fullname="M. Scharf">
              <organization/>
            </author>
            <author initials="H." surname="Seidel" fullname="H. Seidel">
              <organization/>
            </author>
            <author initials="S." surname="Previdi" fullname="S. Previdi">
              <organization/>
            </author>
            <date year="2016" month="October"/>
            <abstract>
              <t>Many Internet applications are used to access resources such as pieces of information or server processes that are available in several equivalent replicas on different hosts.  This includes, but is not limited to, peer-to-peer file sharing applications.  The goal of Application-Layer Traffic Optimization (ALTO) is to provide guidance to applications that have to select one or several hosts from a set of candidates capable of providing a desired resource. This memo discusses deployment-related issues of ALTO.  It addresses different use cases of ALTO such as peer-to-peer file sharing and Content Delivery Networks (CDNs) and presents corresponding examples. The document also includes recommendations for network administrators and application designers planning to deploy ALTO, such as recommendations on how to generate ALTO map information.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="7971"/>
          <seriesInfo name="DOI" value="10.17487/RFC7971"/>
        </reference>


        <reference anchor='RFC9205'>
          <front>
          <title>Building Protocols with HTTP</title>
          <author fullname='M. Nottingham' initials='M.' surname='Nottingham'><organization/></author>
          <date month='June' year='2022'/>
          <abstract><t>Applications often use HTTP as a substrate to create HTTP-based APIs. This document specifies best practices for writing specifications that use HTTP to define new application protocols. It is written primarily to guide IETF efforts to define application protocols using HTTP for deployment on the Internet but might be applicable in other situations.</t><t>This document obsoletes RFC 3205.</t></abstract>
          </front>
          <seriesInfo name='BCP' value='56'/>
          <seriesInfo name='RFC' value='9205'/>
          <seriesInfo name='DOI' value='10.17487/RFC9205'/>
        </reference>
        <!-- requirements -->
      </references>
    </references>
    <section numbered="true" toc="default">
        <name>High-level Service Model</name>

        <t>Conceptually, the TIPS system consists of 3 types of resources:</t>
        <ul>
            <li>(R1) TIPS frontend to manage (create/delete) TIPS views.</li>
            <li>(R2) TIPS view directory, which provides metadata (e.g., references) about the network resource data.</li>
            <li>(R3) The actual network resource data, encoded as complete ALTO network resources (e.g., cost map, network map) or incremental updates.</li>
        </ul>

        <figure anchor="service-model-figure">
          <name>Service Model</name>
          <artwork name="" type="" align="left" alt=""><![CDATA[

                     +------------------------------------------------+
                     |                                                |
+------+             |R1: Frontend/Open  R2: Directory/Meta  R3: Data |
|      | "iget" base |     +-----+           +-----+         +-----+  |
|      | resource 1  |     |     |           |     |         |     |  |
|      |-------------|---->|     |           |     |         |     |  |
|      | incremental |     |     |           |     |-------->|     |  |
|      | transfer    |     |     |           |     |         |     |  |
|      | resource    |     |     |           |     |         |     |  |
|      |<------------|-----|     |           +-----+         +-----+  |
|Client|             |     |     |                                    |
|      | "iget" base |     |     |                                    |
|      | resource 2  |     |     |           +-----+         +-----+  |
|      |-------------|---->|     |           |     |         |     |  |
|      | incremental |     |     |           |     |         |     |  |
|      | transfer    |     |     |           |     | ------->|     |  |
|      | resource    |     |     |           |     |         |     |  |
|      |<------------|-----|     |           |     |         |     |  |
+------+             |     +-----+           +-----+         +-----+  |
                     |                                                |
                     +------------------------------------------------+

      ]]></artwork>
        </figure>

      <t>Design Point: Component Resource Location</t>
        <ul>
            <li>Design 1 (Single): all 3 types at the same, single server (accessed via relative reference)</li>
            <li>Design 2 (Flexible): all 3 types can be at their own server (accessed via absolute reference)</li>
            <li>Design 3 (Dir + Data): R2 and R3 must remain together, though R1 might not be on the same server</li>
        </ul>
      <t>This document specifies Design 1 (keeping R1, R2, and R3 on the same server) in order to simplify session management,
      though at the expense of maximum load balancing flexibility (see <xref target="ops-loadbalancing" format="default"/> for a discussion on load balancing considerations).
      A future companion document may extend the protocol to support Design 2 or Design 3.</t>
    </section>
    <section numbered="true" toc="default">
        <name>Adherence to "Building Protocols with HTTP"</name>

        <t>This work adheres fully to <xref target="RFC9205"/> for the following reasons:</t>

        <ul>
          <li>TIPS does not "redefine, refine, or overlay the semantics of generic protocol elements such as methods,
          status codes, or existing header fields" and instead focuses on "protocol elements that are specific to [the TIPS]
          application -- namely, [its] HTTP resources" (<xref target="RFC9205" section="3.1"/>).</li>
          <li>There are no statically defined URI components (<xref target="RFC9205" section="3.2"/>).</li>
          <li>No minimum version of HTTP is specified by TIPS which is recommended (<xref target="RFC9205" section="4.1"/>).</li>
          <li>This work follows the advice that "When specifying examples of protocol interactions, applications should document
          both the request and response messages with complete header sections, preferably in HTTP/1.1 format" (<xref target="RFC9205" section="4.1"/>).</li>
          <li>TIPS uses URI templates which is recommended (<xref target="RFC9205" section="4.2"/>).</li>
          <li>TIPS follows the pattern that "a client will begin interacting with a given application server by requesting an initial document
          that contains information about that particular deployment, potentially including links to other relevant resources.  Doing so ensures
          that the deployment is as flexible as possible (potentially spanning multiple servers), allows evolution, and also gives the application
          the opportunity to tailor the "discovery document" to the client" (<xref target="RFC9205" section="4.4.1"/>).</li>
          <li>TIPS uses existing HTTP schemes (<xref target="RFC9205" section="4.4.2"/>).</li>
          <li>TIPS defines its errors "to use the most applicable status code" (<xref target="RFC9205" section="4.6"/>).</li>
          <li>TIPS does not "make assumptions about the relationship between separate requests on a single
          transport connection; doing so breaks many of the assumptions of HTTP as a stateless protocol and
          will cause problems in interoperability, security, operability, and evolution" (<xref target="RFC9205" section="4.11"/>).  The
          only relationship between requests is that a client must make a request to first discover where a TIPS
          view of resource will be served, which is consistent with URI discovery in <xref target="RFC9205" section="4.4.1"/>.</li>
          <li>Section <xref target="RFC9205" section="4.14"/> of RFC 9205 notes that there are quite a few caveats with using server push, mostly
          because of lack of widespread support.  We, the authors, have considered these factors and have still
          decided server push can be valuable in the TIPS use case.</li>
        </ul>

    </section>
  </back>
</rfc>
