draft-ietf-alto-multi-cost-08.txt   draft-ietf-alto-multi-cost-09.txt 
Network Working Group S. Randriamasy Network Working Group S. Randriamasy
Internet-Draft W. Roome Internet-Draft W. Roome
Intended status: Standards Track Nokia Bell Labs Intended status: Standards Track Nokia Bell Labs
Expires: October 7, 2017 N. Schwan Expires: October 27, 2017 N. Schwan
Thales Deutschland Thales Deutschland
April 5, 2017 April 25, 2017
Multi-Cost ALTO Multi-Cost ALTO
draft-ietf-alto-multi-cost-08 draft-ietf-alto-multi-cost-09
Abstract Abstract
The ALTO (Application Layer-Traffic Optimization) Protocol The ALTO (Application Layer-Traffic Optimization) Protocol
([RFC7285]) defines several services that return various metrics ([RFC7285]) defines several services that return various metrics
describing the costs between network endpoints. An ALTO Server may describing the costs between network endpoints.
offer a variety of cost metrics, based on latency,bandwidth, hop
count, jitter, or whatever else the ALTO Server deems useful. For
example, when downloading a file that is mirrored on several sites, a
user application may consider more than one metric, perhaps trading
bandwidth for latency to determine the most efficient mirror site.
While the base ALTO Protocol allows an ALTO Client to use more than This document defines a new service that allows an ALTO Client to
one cost metric, to do so, the Client must request each metric retrieve several cost metrics in a single request for an ALTO
separately. This document defines a new service that allows a Client Filtered Cost Map and Endpoint Cost Map. In addition, it extends the
to retrieve several cost metrics with one request, which is constraints to further filter those maps by allowing a client to
considerably more efficient. In addition, this document extends the specify a logical combination of tests on several cost metrics.
ALTO constraint tests to allow a user to specify an arbitrary logical
combination of tests on several cost metrics.
Requirements Language Requirements Language
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
"SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
document are to be interpreted as described in RFC 2119 [RFC2119]. document are to be interpreted as described in RFC 2119 [RFC2119].
Status of This Memo Status of This Memo
This Internet-Draft is submitted in full conformance with the This Internet-Draft is submitted in full conformance with the
skipping to change at page 2, line 7 skipping to change at page 1, line 46
Internet-Drafts are working documents of the Internet Engineering Internet-Drafts are working documents of the Internet Engineering
Task Force (IETF). Note that other groups may also distribute Task Force (IETF). Note that other groups may also distribute
working documents as Internet-Drafts. The list of current Internet- working documents as Internet-Drafts. The list of current Internet-
Drafts is at http://datatracker.ietf.org/drafts/current/. Drafts is at http://datatracker.ietf.org/drafts/current/.
Internet-Drafts are draft documents valid for a maximum of six months Internet-Drafts are draft documents valid for a maximum of six months
and may be updated, replaced, or obsoleted by other documents at any and may be updated, replaced, or obsoleted by other documents at any
time. It is inappropriate to use Internet-Drafts as reference time. It is inappropriate to use Internet-Drafts as reference
material or to cite them other than as "work in progress." material or to cite them other than as "work in progress."
This Internet-Draft will expire on October 7, 2017. This Internet-Draft will expire on October 27, 2017.
Copyright Notice Copyright Notice
Copyright (c) 2017 IETF Trust and the persons identified as the Copyright (c) 2017 IETF Trust and the persons identified as the
document authors. All rights reserved. document authors. All rights reserved.
This document is subject to BCP 78 and the IETF Trust's Legal This document is subject to BCP 78 and the IETF Trust's Legal
Provisions Relating to IETF Documents Provisions Relating to IETF Documents
(http://trustee.ietf.org/license-info) in effect on the date of (http://trustee.ietf.org/license-info) in effect on the date of
publication of this document. Please review these documents publication of this document. Please review these documents
carefully, as they describe your rights and restrictions with respect carefully, as they describe your rights and restrictions with respect
to this document. Code Components extracted from this document must to this document. Code Components extracted from this document must
include Simplified BSD License text as described in Section 4.e of include Simplified BSD License text as described in Section 4.e of
the Trust Legal Provisions and are provided without warranty as the Trust Legal Provisions and are provided without warranty as
described in the Simplified BSD License. described in the Simplified BSD License.
Table of Contents Table of Contents
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3
2. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 5 2. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 4
3. Overview Of Approach . . . . . . . . . . . . . . . . . . . . 5 3. Overview Of Approach . . . . . . . . . . . . . . . . . . . . 5
3.1. Multi-Cost Data Format . . . . . . . . . . . . . . . . . 5 3.1. Multi-Cost Data Format . . . . . . . . . . . . . . . . . 5
3.2. Compatibility With Legacy ALTO Clients . . . . . . . . . 6 3.2. Compatibility With Legacy ALTO Clients . . . . . . . . . 5
3.3. Filtered Multi Cost Map Resources . . . . . . . . . . . . 6 3.3. Filtered Multi Cost Map Resources . . . . . . . . . . . . 6
3.4. Endpoint Cost Service Resources . . . . . . . . . . . . . 7 3.4. Endpoint Cost Service Resources . . . . . . . . . . . . . 6
3.5. Full Cost Map Resources . . . . . . . . . . . . . . . . . 7 3.5. Full Cost Map Resources . . . . . . . . . . . . . . . . . 7
3.6. Extended Constraint Tests . . . . . . . . . . . . . . . . 8 3.6. Extended Constraint Tests . . . . . . . . . . . . . . . . 7
3.6.1. Extended constraint predicates . . . . . . . . . . . 8 3.6.1. Extended constraint predicates . . . . . . . . . . . 7
3.6.2. Extended logical combination of predicates . . . . . 8 3.6.2. Extended logical combination of predicates . . . . . 7
3.6.3. Testable Cost Types in constraints . . . . . . . . . 9 3.6.3. Testable Cost Types in constraints . . . . . . . . . 8
3.6.4. Testable Cost Type Names in IRD capabilities . . . . 10 3.6.4. Testable Cost Type Names in IRD capabilities . . . . 9
3.6.5. Legacy ALTO Client issues . . . . . . . . . . . . . . 10 3.6.5. Legacy ALTO Client issues . . . . . . . . . . . . . . 9
4. Protocol Extensions for Multi-Cost ALTO Transactions . . . . 11 4. Protocol Extensions for Multi-Cost ALTO Transactions . . . . 11
4.1. Filtered Cost Map Extensions . . . . . . . . . . . . . . 11 4.1. Filtered Cost Map Extensions . . . . . . . . . . . . . . 11
4.1.1. Capabilities . . . . . . . . . . . . . . . . . . . . 12 4.1.1. Capabilities . . . . . . . . . . . . . . . . . . . . 11
4.1.2. Accept Input Parameters . . . . . . . . . . . . . . . 13 4.1.2. Accept Input Parameters . . . . . . . . . . . . . . . 12
4.1.3. Response . . . . . . . . . . . . . . . . . . . . . . 16 4.1.3. Response . . . . . . . . . . . . . . . . . . . . . . 15
4.2. Endpoint Cost Service Extensions . . . . . . . . . . . . 16 4.2. Endpoint Cost Service Extensions . . . . . . . . . . . . 15
4.2.1. Capabilities . . . . . . . . . . . . . . . . . . . . 16 4.2.1. Capabilities . . . . . . . . . . . . . . . . . . . . 16
4.2.2. Accept Input Parameters . . . . . . . . . . . . . . . 16 4.2.2. Accept Input Parameters . . . . . . . . . . . . . . . 16
4.2.3. Response . . . . . . . . . . . . . . . . . . . . . . 17 4.2.3. Response . . . . . . . . . . . . . . . . . . . . . . 17
5. Examples . . . . . . . . . . . . . . . . . . . . . . . . . . 18 5. Examples . . . . . . . . . . . . . . . . . . . . . . . . . . 17
5.1. Information Resource Directory . . . . . . . . . . . . . 18 5.1. Information Resource Directory . . . . . . . . . . . . . 17
5.2. Multi-Cost Filtered Cost Map: Example #1 . . . . . . . . 20 5.2. Multi-Cost Filtered Cost Map: Example #1 . . . . . . . . 19
5.3. Multi-Cost Filtered Cost Map: Example #2 . . . . . . . . 22 5.3. Multi-Cost Filtered Cost Map: Example #2 . . . . . . . . 20
5.4. Multi-Cost Filtered Cost Map: Example #3 . . . . . . . . 23 5.4. Multi-Cost Filtered Cost Map: Example #3 . . . . . . . . 22
5.5. Multi-Cost Filtered Cost Map: Example #4 . . . . . . . . 25 5.5. Multi-Cost Filtered Cost Map: Example #4 . . . . . . . . 23
5.6. Endpoint Cost Service . . . . . . . . . . . . . . . . . . 26 5.6. Endpoint Cost Service . . . . . . . . . . . . . . . . . . 24
6. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 27 6. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 25
7. Privacy And Security Considerations . . . . . . . . . . . . . 27 7. Privacy And Security Considerations . . . . . . . . . . . . . 26
8. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 28 8. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 26
9. References . . . . . . . . . . . . . . . . . . . . . . . . . 28 9. References . . . . . . . . . . . . . . . . . . . . . . . . . 26
9.1. Normative References . . . . . . . . . . . . . . . . . . 28 9.1. Normative References . . . . . . . . . . . . . . . . . . 26
9.2. Informative References . . . . . . . . . . . . . . . . . 28 9.2. Informative References . . . . . . . . . . . . . . . . . 26
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 28 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 27
1. Introduction 1. Introduction
IETF has defined ALTO services in [RFC7285] to provide guidance to IETF has defined ALTO services in [RFC7285] to provide guidance to
overlay applications, which have to select one or several hosts from overlay applications, which have to select one or several hosts from
a set of candidates that are able to provide a desired resource. a set of candidates that are able to provide a desired resource.
This guidance is based on parameters such as the topological This guidance is based on parameters such as the topological
distance, that affect performance and efficiency of the data distance, that affect performance of the data transmission between
transmission between the hosts. The purpose of ALTO is to improve the hosts. The purpose of ALTO is to improve Quality of Experience
Quality of Experience (QoE) in the application while reducing (QoE) in the application while reducing resource consumption in the
resource consumption in the underlying network infrastructure. The underlying network infrastructure. The ALTO protocol conveys a view
ALTO protocol conveys the Internet View from the perspective of a of the Internet called a Network Map and composed of Provider defined
Provider Network region that spans from a region to one or more locations spanning from subnets to several Autonomous Systems (AS).
Autonomous System (AS) and is called a Network Map. ALTO may also ALTO may also convey the Provider determined Costs between Network
provide the Provider determined Cost Map between locations of the Map locations or between groups of individual endpoints.
Network Map or Endpoint Cost Map between groups of individual
endpoints. Last, these costs are provided as numerical or ordinal
values.
Current ALTO Cost Maps and their modes provide values such as
hopcount and administrative routing cost to reflect ISP routing
preferences. Recently, new use cases have extended the usage scope
of ALTO to Content Delivery Networks (CDN), Data Centers and
applications that need additional information to select their
endpoints or handle their Provider-defined IDentifiers (PID)s.
Thus a multitude of new Cost Types that better reflect the Current ALTO Cost Types provide values such as hopcount and
requirements of these applications are expected to be specified. administrative routing cost to reflect ISP routing preferences.
Handling multiple costs, however, can add more complexities, such as Recently, new use cases have extended the usage scope of ALTO to
overheads and consistency. In particular, cost values that change Content Delivery Networks (CDN), Data Centers and applications that
more frequently than previously assumed may require more frequent need additional information to select their endpoints or network
ALTO requests. Moreover, to make sure to have up to date values, locations. Thus a multitude of new Cost Types that better reflect
applications using several frequently changing metrics will tend to the requirements of these applications are expected to be specified.
refresh their values simultaneously.
The ALTO protocol [RFC7285], which this document refers to as the The ALTO protocol [RFC7285], which this document refers to as the
base protocol, restricts ALTO Cost Maps and Endpoint Cost Services to base protocol, restricts ALTO Cost Maps and Endpoint Cost Services to
only one Cost Type and Cost Mode per ALTO request. To retrieve only one Cost Type per ALTO request. To retrieve information for
information for several Cost Types, an ALTO Client must send several several Cost Types, an ALTO Client must send several separate
separate requests to the Server. requests to the Server.
It would be far more efficient, in terms of Round Trip Time (RTT), It is far more efficient, in terms of Round Trip Time (RTT), traffic,
traffic, and processing load on the ALTO Client and Server, to get and processing load on the ALTO Client and Server, to get all costs
all costs with a single query/response transaction. Vector costs with a single query/response transaction. One Cost Map reporting on
provide a robust and natural input to multi-variate path computation N Cost Types is less bulky than N Cost Maps containing one Cost Type
as well as robust multi-variate selection of multiple endpoints. In each. This is valuable for both the storage of these maps and their
particular, one Cost Map reporting on N Cost Types is less bulky than transmission. Additionally, for many emerging applications that need
N Cost Maps containing one Cost Type each. This is valuable for both information on several Cost Types, having them gathered in one map
the storage of these maps and for their transmission. Additionally, will save time. Another advantage is consistency: providing values
for many emerging applications that need information on several Cost for several Cost Types in one single batch is useful for ALTO Clients
Types, having them gathered in one map will save time. Another needing synchronized ALTO information updates. This document defines
potential advantage is consistency: providing values for several Cost how to retrieve multiple cost metrics in a single request for ALTO
Types in one single batch is useful for ALTO Clients needing Filtered Cost Maps and Endpoint Cost Maps. To ensure compatibility
synchronized ALTO information updates. with legacy ALTO Clients, only the Filtered Cost Map and Endpoint
Cost Map services are extended to return Multi-Cost values.
Along with multi-cost values queries, the filtering capabilities need Along with multi-cost values queries, the filtering capabilities need
to be extended to allow constraints on multiple metrics. The base to be extended to allow constraints on multiple metrics. The base
protocol allows an ALTO Client to provide optional constraint tests protocol allows an ALTO Client to provide optional constraint tests
for a Filtered Cost Map or the Endpoint Cost Service. In the base for a Filtered Cost Map or the Endpoint Cost Service, where the
protocol, the constraint tests are limited to the AND-combination of constraint tests are limited to the AND-combination of comparison
simple comparison tests on the value of the (single) requested Cost tests on the value of the (single) requested Cost Type. However,
Type. It is therefore necessary to allow constraints on multiple applications that are sensitive to several metrics and struggle with
metrics. Beyond that, applications that are sensitive to several complicated network conditions may need to arbitrate between
metrics and struggle with complicated network conditions may need to conflicting objectives such as routing cost and network performance.
arbitrate between conflicting objectives such as routing cost and To this end, this document extends the base protocol with constraints
network performance. To address this issue, this document extends that may test multiple metrics and may be combined with logical 'ORs'
the base protocol by extending constraints to test multiple metrics,
and by allowing these constraints to be combined with logical 'ORs'
as well as logical 'ANDs'. This allows an application to make as well as logical 'ANDs'. This allows an application to make
requests such as: "select solutions with either (moderate "hopcount" requests such as: "select solutions with either (moderate "hopcount"
AND high "routingcost") OR (higher "hopcount" AND moderate AND high "routingcost") OR (higher "hopcount" AND moderate
"routingcost")". To ensure compatibility with legacy ALTO Clients, "routingcost")".
only the Filtered Cost Map and Endpoint Cost Map services are
extended to return Multi-Cost values. Full Cost Map services remain
unchanged, and are restricted to returning single cost values.
This document is organized as follows: Section 2 defines terminology This document is organized as follows: Section 2 defines terminology
used in this document. Section 3 gives a non-normative overview of used in this document. Section 3 gives a non-normative overview of
the multi-cost extensions, and Section 4 gives their formal the multi-cost extensions, and Section 4 gives their formal
definitions. Section 5 gives several complete examples. The definitions. Section 5 gives several complete examples. The
remaining sections describe the IANA and privacy considerations. remaining sections describe the IANA and privacy considerations.
2. Terminology 2. Terminology
o {1.2.3}: References with curly brackets are to sections in the
ALTO protocol specification [RFC7285].
o ALTO transaction: A request/response exchange between an ALTO o ALTO transaction: A request/response exchange between an ALTO
Client and an ALTO Server. Client and an ALTO Server.
o Application client (AC): This term generalizes the case of a P2P
client to include the case of a CDN client, a client of an
application running on a virtual server, a Grid application
client, or any application client that can choose between several
connection points for data or resource exchange.
o Client: This term refers to an ALTO client, when used with a o Client: This term refers to an ALTO client, when used with a
capital "C". capital "C".
o Endpoint (EP): An endpoint is defined as in {2.1} of [RFC7285]. o Endpoint (EP): An endpoint is defined as in {2.1} of [RFC7285].
It can be for example a peer, a CDN storage location, a physical It can be for example a peer, a CDN storage location, a physical
server involved in a virtual server-supported application, a party server involved in a virtual server-supported application, a party
in a resource sharing swarm such as a computation grid or an in a resource sharing swarm such as a computation grid or an
online multi-party game. online multi-party game.
o Endpoint Discovery (EP Discovery): This term covers the different
types of processes used to discover the eligible endpoints.
o Network Service Provider (NSP): Includes both ISPs, who provide
means to transport the data, and CDNs who care for the
dissemination, persistent storage and possibly identification of
the best/closest content copy.
o Server: This term refers to an ALTO server, when used with a o Server: This term refers to an ALTO server, when used with a
capital "S". capital "S".
References with curly brackets such as '{1.2.3}' are to sections in
the ALTO protocol specification [RFC7285], to avoid overloading the
document with citations of [RFC7285].
3. Overview Of Approach 3. Overview Of Approach
The following is a non-normative overview of the multi-cost The following is a non-normative overview of the multi-cost
extensions defined in this document. It assumes the reader is extensions defined in this document. It assumes the reader is
familiar with Cost Map resources in the ALTO Protocol ([RFC7285]). familiar with Cost Map resources in the ALTO Protocol ([RFC7285]).
3.1. Multi-Cost Data Format 3.1. Multi-Cost Data Format
Formally, the cost entries in an ALTO Cost Map can be any type of Formally, the cost entries in an ALTO Cost Map can be any type of
JSON value (see the DstCosts object in {11.2.3.6}). However, that JSON value (see the DstCosts object in {11.2.3.6}). However, that
section also says that an implementation may assume costs are JSON section also says that an implementation may assume costs are JSON
numbers, unless the implementation is using an extension which numbers, unless the implementation is using an extension which
signals a different data type. signals a different data type.
Therefore this document extends the definition of a Cost Map to allow Therefore this document extends the definition of a Cost Map to allow
a cost to be an array of costs, one per metric, instead of just one a cost to be an array of costs, one per metric, instead of just one
number. For example, here is a Cost Map with the "routingcost" and number. For example, here is a Cost Map with the "routingcost" and
"hopcount" metrics. Note that this is identical to a regular ALTO "hopcount" metrics. Note that this is identical to a regular ALTO
Cost Map, except that the values are arrays instead of numbers. Cost Map, except that the values are arrays instead of numbers. The
multiple metrics are listed in member "multi-cost-types", indicating
to the Client how to map values in the array to cost metrics.
{ {
"meta" : { "meta" : {
"dependent-vtags" : [ ... ], "dependent-vtags" : [ ... ],
"cost-type" : {}, "cost-type" : {},
"multi-cost-types" : [ "multi-cost-types" : [
{"cost-mode": "numerical", "cost-metric": "routingcost"}, {"cost-mode": "numerical", "cost-metric": "routingcost"},
{"cost-mode": "numerical", "cost-metric": "hopcount"} {"cost-mode": "numerical", "cost-metric": "hopcount"}
] ]
} }
"cost-map" : { "cost-map" : {
"PID1": { "PID1":[1,0], "PID2":[5,23], "PID3":[10,5] }, "PID1": { "PID1":[1,0], "PID2":[5,23], "PID3":[10,5] },
... ...
} }
} }
3.2. Compatibility With Legacy ALTO Clients Note also the presence of member '"cost-type" : {}' to maintain
backwards compatibility with [RFC7285].
The multi-cost extensions defined in this document must not break 3.2. Compatibility With Legacy ALTO Clients
legacy implementations (that is, ALTO Clients and servers which are
not aware of these extensions). One way to achieve that would be to
define a new media type for an array-valued Multi Cost Map. However,
as indicated above, an array-valued Multi Cost Map is almost
identical to a single-valued Cost Map, so it should be simple to
write a parser which handles either type of cost map. Hence defining
a new media type could result in a lot of wasteful duplication.
Therefore this document does not define any new media types. This document does not define any new media types. Instead, as
Instead, as described below, it extends the specifications in the described below, it extends the specifications in the ALTO Server's
ALTO Server's Information Resource Directory (IRD) so that legacy Information Resource Directory (IRD) so that legacy Clients will not
Clients will not request array-valued Multi Cost Map resources. This request array-valued Multi Cost Map resources. This relies on the
relies on the requirement that ALTO Clients MUST ignore unknown requirement that ALTO Clients MUST ignore unknown fields ({8.3.7}).
fields ({8.3.7}).
3.3. Filtered Multi Cost Map Resources 3.3. Filtered Multi Cost Map Resources
This document extends the Filtered Cost Map service to allow the same This document extends the Filtered Cost Map service to allow the same
resource to return either a single-valued Cost Map, as defined in resource to return either a single-valued Cost Map, as defined in
[RFC7285], or an array-valued Multi Cost Map, as defined in this [RFC7285], or an array-valued Multi Cost Map, as defined in this
document. An extended Filtered Cost Map resource has a new document. An extended Filtered Cost Map resource has a new
capability, "max-cost-types". The value is the maximum number of capability, "max-cost-types". The value is the maximum number of
cost types this resource can return for one request. The existence cost types this resource can return for one request. The existence
of this capability means the resource understands the extensions in of this capability means the resource understands the extensions in
skipping to change at page 8, line 5 skipping to change at page 7, line 14
Section 3.3 to extend the Endpoint Cost Service to return array- Section 3.3 to extend the Endpoint Cost Service to return array-
valued costs to ALTO Clients who also are aware of these extensions. valued costs to ALTO Clients who also are aware of these extensions.
3.5. Full Cost Map Resources 3.5. Full Cost Map Resources
Section {11.3.2.3} of [RFC7285] requires a Filtered Cost Map to Section {11.3.2.3} of [RFC7285] requires a Filtered Cost Map to
return the entire Cost Map if the ALTO Client omits the source and return the entire Cost Map if the ALTO Client omits the source and
destination PIDs. Hence a Multi-Cost aware ALTO Client can use an destination PIDs. Hence a Multi-Cost aware ALTO Client can use an
extended Filtered Cost Map resource to get a full Multi Cost Map. extended Filtered Cost Map resource to get a full Multi Cost Map.
Full Cost Map resources are GET-mode requests, with no capabilities Full Cost Map resources are GET-mode requests. The response for a
other than the name of the cost type they return. Therefore unless Full Cost Map conveying multiple cost types would include a "meta"
we create a new media type for array-valued Cost Maps, it is not field that would itself include a "cost-type" field, that would list
possible to define a Multi-Cost Full Cost Map resource so that multi- several values corresponding to the cost types of the cost map. A
cost-aware ALTO Clients can recognize it and legacy ALTO Clients will legacy ALTO Client would not be able to understand this list.
ignore it. Indeed, the response for a Full Cost Map conveying Neither would it be able to interpret the cost values array provided
multiple cost types would include a "meta" field that would itself by a Multi-Cost full maps.
include a "cost-type" field, that would list several values
corresponding to the cost types of the cost map. A legacy ALTO
Client would not be able to understand this list. It would not know
what the cost type of the map is and neither would it be able to
interpret the cost values array provided by a Multi-Cost full maps.
3.6. Extended Constraint Tests 3.6. Extended Constraint Tests
[RFC7285] defines a simple constraint test capability for Filtered [RFC7285] defines a simple constraint test capability for Filtered
Cost Maps and Endpoint Cost Services. If a resource supports Cost Maps and Endpoint Cost Services. If a resource supports
constraints, the Server restricts the response to costs that satisfy constraints, the Server restricts the response to costs that satisfy
a list of simple predicates provided by the ALTO Client. For a list of simple predicates provided by the ALTO Client. For
example, if the ALTO Client gives the constraints example, if the ALTO Client gives the constraints
"constraints": ["ge 10", "le 20"] "constraints": ["ge 10", "le 20"]
skipping to change at page 9, line 17 skipping to change at page 8, line 23
{"cost-metric": "routingcost", "cost-mode": "numerical"}, {"cost-metric": "routingcost", "cost-mode": "numerical"},
{"cost-metric": "hopcount", "cost-mode": "numerical"} {"cost-metric": "hopcount", "cost-mode": "numerical"}
], ],
"or-constraints": [ "or-constraints": [
["[0] le 100", "[1] le 2"], ["[0] le 100", "[1] le 2"],
["[0] le 10", "[1] le 6"] ["[0] le 10", "[1] le 6"]
], ],
"pids": {...} "pids": {...}
} }
Note that a "constraints" parameter with the array of predicates [P1,
P2, ...] is equivalent to an "or-constraints" parameter with one
array of value [[P1, P2, ...]]. A Client is therefore allowed to
express either "constraints" or "or-constraints" but not both.
3.6.3. Testable Cost Types in constraints 3.6.3. Testable Cost Types in constraints
Finally, a Client may want to test a cost type whose actual value is Finally, a Client may want to test a cost type whose actual value is
irrelevant, as long as it satisfies the tests. For example, a Client irrelevant, as long as it satisfies the tests. For example, a Client
may want the value of the cost metric "routingcost" for all PID pairs may want the value of the cost metric "routingcost" for all PID pairs
that satisfy constraints on the metric "hopcount", without needing that satisfy constraints on the metric "hopcount", without needing
the actual value of "hopcount". the actual value of "hopcount".
To this end, we add a specific parameter named "testable-cost-types",
that does not contain the same cost types as parameter "multi-cost-
types". The Client can express constraints only on cost types listed
in "testable-cost-types".
For example, the following request tells the Server to return just For example, the following request tells the Server to return just
"routingcost" for those source and destination pairs for which "routingcost" for those source and destination pairs for which
"hopcount" is <= 6: "hopcount" is <= 6:
{ {
"multi-cost-types": [ "multi-cost-types": [
{"cost-metric": "routingcost", "cost-mode": "numerical"}, {"cost-metric": "routingcost", "cost-mode": "numerical"},
], ],
"testable-cost-types": [ "testable-cost-types": [
{"cost-metric": "hopcount", "cost-mode": "numerical"}, {"cost-metric": "hopcount", "cost-mode": "numerical"},
], ],
"constraints": ["[0] le 6"], "constraints": ["[0] le 6"],
"pids": {...} "pids": {...}
} }
In this example, "[0]" means the constraint applies to "hopcount"
because that is the first cost type in the "testable-cost-types"
parameter. (If "testable-cost-types" is omitted, it is assumed to be
the same as "multi-cost-types".)
The choice of using an index to refer to cost-types aims at
minimizing the length of the expression of constraints, especially
for those combining several OR and AND expressions. It was also the
shortest path from the constraints design in RFC 7285.
3.6.4. Testable Cost Type Names in IRD capabilities 3.6.4. Testable Cost Type Names in IRD capabilities
In [RFC7285], when a resource's capability "constraints" is true, the In [RFC7285], when a resource's capability "constraints" is true, the
Server accepts constraints on all the cost types listed in the "cost- Server accepts constraints on all the cost types listed in the "cost-
type-names" capability. However, some ALTO Servers may not be type-names" capability. However, some ALTO Servers may not be
willing to allow constraint tests on all available cost metrics. willing to allow constraint tests on all available cost metrics.
Therefore the Multi-Cost ALTO protocol extension defines the Therefore the Multi-Cost ALTO protocol extension defines the
capability field "testable-cost-type-names". Like "cost-type-names", capability field "testable-cost-type-names". Like "cost-type-names",
it is an array of cost type names. If present, that resource only it is an array of cost type names. If present, that resource only
allows constraint tests on the cost types in that list. "testable- allows constraint tests on the cost types in that list. "testable-
cost-type-names" must be a subset of "cost-type-names". cost-type-names" must be a subset of "cost-type-names".
3.6.5. Legacy ALTO Client issues 3.6.5. Legacy ALTO Client issues
While a multi-cost-aware Client will recognize the "testable-cost- While a multi-cost-aware Client will recognize the "testable-cost-
type-names" field, and will honor those restrictions, a legacy Client type-names" field, and will honor those restrictions, a legacy Client
will not. Hence a legacy client may send a request with a constraint will not. Hence, when "constraints" has the value 'true', a legacy
test on any of the cost types listed in "cost-type-names". client may send a request with a constraint test on any of the cost
types listed in "cost-type-names".
To avoid that problem, the "testable-cost-type-names" and "cost- To avoid that problem, the "testable-cost-type-names" and "cost-
constraints" fields are mutually exclusive: a resource may define one constraints" fields are mutually exclusive: a resource may define one
or the other capability, but must not define both. Thus a resource or the other capability, but MUST NOT define both. Thus a resource
that does not allow constraint tests on all cost metrics will set that does not allow constraint tests on all cost metrics will set
"testable-cost-type-names" to the testable metrics, and will set "testable-cost-type-names" to the testable metrics, and will set
"cost-constraints" to "false". A multi-cost-aware Client will "cost-constraints" to "false". A multi-cost-aware Client will
recognize the "testable-cost-type-names" field, and will realize that recognize the "testable-cost-type-names" field, and will realize that
its existence means the resource does allow (limited) constraint its existence means the resource does allow (limited) constraint
tests, while a legacy Client will think that resource does not allow tests, while a legacy Client will think that resource does not allow
constraint tests at all. To allow legacy Clients to use constraint constraint tests at all. To allow legacy Clients to use constraint
tests, the ALTO Server may define an additional resource with "cost- tests, the ALTO Server can define an additional resource with "cost-
constraints" set to "true" and "cost-type-names" set to the metrics constraints" set to "true" and "cost-type-names" set to the metrics
which can be tested. which can be tested.
In the IRD example below, the resource "filtered-cost-map-extended" In the IRD example below, the resource "filtered-cost-map-extended"
provides values for three metrics: "num-routingcost", "num-hopcount" provides values for three metrics: "num-routingcost", "num-hopcount"
and "num-bwscore". The capability "testable-cost-type-names" and "num-bwscore". The capability "testable-cost-type-names"
indicates that the Server only allows constraints on "routingcost" indicates that the Server only allows constraints on "routingcost"
and "hopcount". A multi-cost capable Client will see this and "hopcount". A multi-cost capable Client will see this
capability, and will limit its constraint tests to those metrics. capability, and will limit its constraint tests to those metrics.
Because capability "cost-constraints" is false (by default), a legacy Because capability "cost-constraints" is false (by default), a legacy
Client will not use constraint tests on this resource at all. Client will not use constraint tests on this resource at all.
The second resource, "filtered-multicost-map", is similar to the The second resource, "filtered-multicost-map", is similar to the
first, except that all the metrics it returns are testable. first, except that all the metrics it returns are testable.
Therefore it sets "cost-constraints" to "true", and does not set the Therefore it sets "cost-constraints" to "true", and does not set the
"testable-cost-type-names" field. A legacy Client that needs a "testable-cost-type-names" field. A legacy Client that needs a
constraint test will use this resource rather than the first. A constraint test will use this resource rather than the first. A
multi-cost-aware Client that does not need to retrieve the "num- multi-cost-aware Client that does not need to retrieve the "num-
bwscore" metric may use either resource. bwscore" metric may use either resource.
Note that if a multi-cost Server specifies a "filtered-cost-map-
extended", it will most likely not specify an "filtered-multicost-
map" if the capabilities of the latter are covered by the
capabilities of the former or unless the "filtered-multicost-map"
ressource is also intended for legacy Clients.
"filtered-cost-map-extended" : { "filtered-cost-map-extended" : {
"uri" : "http://alto.example.com/multi/extn/costmap/filtered", "uri" : "http://alto.example.com/multi/extn/costmap/filtered",
"media-types" : [ "application/alto-costmap+json" ], "media-types" : [ "application/alto-costmap+json" ],
"accepts" : [ "application/alto-costmapfilter+json" ], "accepts" : [ "application/alto-costmapfilter+json" ],
"uses" : [ "my-default-network-map" ], "uses" : [ "my-default-network-map" ],
"capabilities" : { "capabilities" : {
"max-cost-types" : 3, "max-cost-types" : 3,
"cost-type-names" : [ "num-routingcost", "cost-type-names" : [ "num-routingcost",
"num-hopcount", "num-hopcount",
"num-bwscore"], "num-bwscore"],
skipping to change at page 11, line 40 skipping to change at page 11, line 10
"cost-type-names" : [ "num-routingcost", "cost-type-names" : [ "num-routingcost",
"num-hopcount"], "num-hopcount"],
} }
} }
4. Protocol Extensions for Multi-Cost ALTO Transactions 4. Protocol Extensions for Multi-Cost ALTO Transactions
This section formally specifies the extensions to [RFC7285] to This section formally specifies the extensions to [RFC7285] to
support Multi-Cost ALTO transactions. support Multi-Cost ALTO transactions.
This document uses the notation rules specified in {8.2}. In
particular, an optional field is enclosed by [ ]. In the
definitions, the JSON names of the fields are case sensitive. An
array is indicated by two numbers in angle brackets, <m..n>, where m
indicates the minimal number of values and n is the maximum. When
this document uses * for n, it means no upper bound.
4.1. Filtered Cost Map Extensions 4.1. Filtered Cost Map Extensions
This document extends Filtered Cost Maps, as defined in {11.3.2} of This document extends Filtered Cost Maps, as defined in {11.3.2} of
[RFC7285], by adding new input parameters and capabilities, and by [RFC7285], by adding new input parameters and capabilities, and by
returning JSONArrays instead of JSONNumbers as the cost values. returning JSONArrays instead of JSONNumbers as the cost values.
The media type (11.3.2.1}, HTTP method (11.3.2.2} and "uses" The media type (11.3.2.1}, HTTP method (11.3.2.2} and "uses"
specifications (11.3.2.5} are unchanged. specifications (11.3.2.5} are unchanged.
4.1.1. Capabilities 4.1.1. Capabilities
The filtered cost map capabilities are extended with two new members: The filtered cost map capabilities are extended with two new members:
o max-cost-types, o max-cost-types,
o testable-cost-type-names o testable-cost-type-names
The capability "max-cost-types" indicates whether this resource The capability "max-cost-types" indicates whether this resource
supports the Multi-Cost ALTO extensions, and the capability supports the Multi-Cost ALTO extensions, and the capability
"testable-cost-type-names" allows the resource to restrict constraint "testable-cost-type-names" allows the resource to restrict constraint
tests to a subset of the available cost types. The tests to a subset of the available cost types. With these two
FilteredCostMapCapabilities object in {11.3.2.4} is extended as additional members, the FilteredCostMapCapabilities object in
follows: {11.3.2.4} is structured as follows:
object { object {
JSONString cost-type-names<1..*>; JSONString cost-type-names<1..*>;
[JSONBool cost-constraints;] [JSONBool cost-constraints;]
[JSONNumber max-cost-types;] [JSONNumber max-cost-types;]
[JSONString testable-cost-type-names<1..*>;] [JSONString testable-cost-type-names<1..*>;]
} FilteredCostMapCapabilities; } FilteredCostMapCapabilities;
cost-type-names and cost-constraints: As defined in {11.3.2.4} of cost-type-names: As defined in {11.3.2.4} of [RFC7285].
[RFC7285].
cost-constraints: As defined in {11.3.2.4} of [RFC7285]. Thus if
"cost-constraints" is true, the resource MUST accept constraint
tests on any cost type in "cost-type-names". Note in addition
that if "cost-constraints" is "true", the "testable-cost-type-
names" capability MUST NOT be present
max-cost-types: If present with value N greater than 0, this max-cost-types: If present with value N greater than 0, this
resource understands the multi-cost extensions in this document, resource understands the multi-cost extensions in this document,
and can return a Multi Cost Map with any combination of N or fewer and can return a Multi Cost Map with any combination of N or fewer
cost types in the "cost-type-names" list. If omitted, the default cost types in the "cost-type-names" list. If omitted, the default
value is 0. value is 0.
testable-cost-type-names: If present, the resource allows constraint testable-cost-type-names: If present, the resource allows constraint
tests, but only on the cost type names in this array. Each name tests, but only on the cost type names in this array. Each name
in "testable-cost-type-names" MUST also be in "cost-type-names". in "testable-cost-type-names" MUST also be in "cost-type-names".
If "testable-cost-type-names" is present, the "cost-constraints" If "testable-cost-type-names" is present, the "cost-constraints"
capability MUST NOT be "true", and if "cost-constraints" is capability MUST NOT be true.
"true", "testable-cost-type-names" MUST NOT be present. Thus if
"cost-constraints" is "true", the resource MUST accept constraint
tests on any cost type in "cost-type-names".
As discussed in Section 3.6.4, this capability is useful when a As discussed in Section 3.6.4, this capability is useful when a
Server is unable or unwilling to implement constraint tests on all Server is unable or unwilling to implement constraint tests on all
cost types. As discussed in Section 3.6.5, "testable-cost-type- cost types. As discussed in Section 3.6.5, "testable-cost-type-
names" and "cost-constraints" are mutually exclusive to prevent names" and "cost-constraints" are mutually exclusive to prevent
legacy Clients from issuing constraint tests on untestable cost legacy Clients from issuing constraint tests on untestable cost
types. types.
4.1.2. Accept Input Parameters 4.1.2. Accept Input Parameters
The ReqFilteredCostMap object in {11.3.2.3} of [RFC7285] is extended The ReqFilteredCostMap object in {11.3.2.3} of [RFC7285] is extended
as follows: as follows:
object { object {
[CostType cost-type;] [CostType cost-type;]
[CostType multi-cost-types<1..*>;] [CostType multi-cost-types<1..*>;]
[CostType testable-cost-types<1..*>;] [CostType testable-cost-types<1..*>;]
[JSONString constraints<0..*>;] [JSONString constraints<0..*>;]
[JSONString or-constraints<1..*><1..*>;] [JSONString or-constraints<1..*><1..*>;]
PIDFilter pids; [PIDFilter pids];
} ReqFilteredCostMap; } ReqFilteredCostMap;
object {
PIDName srcs<0..*>;
PIDName dsts<0..*>;
} PIDFilter;
cost-type: As defined in {11.3.2.3} of [RFC7285], with the cost-type: As defined in {11.3.2.3} of [RFC7285], with the
additional requirement that the Client MUST specify either "cost- additional requirement that the Client MUST specify either "cost-
type" or "multi-cost-types", but MUST NOT specify both. type" or "multi-cost-types", but MUST NOT specify both. Therefore
this field is made optional. When placing a single cost request
as specified in [RFC7285], a Client MUST use "cost-type".
multi-cost-types: If present, the ALTO Server MUST return array- multi-cost-types: If present, the ALTO Server MUST return array-
valued costs for the cost types in this list. For each entry, the valued costs for the cost types in this list. For each entry, the
"cost-metric" and "cost-mode" fields MUST match one of the "cost-metric" and "cost-mode" fields MUST match one of the
supported cost types indicated in member "cost-type-names" of this supported cost types indicated in member "cost-type-names" of this
resource's "capabilities" field (Section 4.1.1). The Client MUST resource's "capabilities" field (Section 4.1.1). The Client MUST
NOT use this field unless this resource's "max-cost-types" NOT use this field unless this resource's "max-cost-types"
capability exists and has a value greater than 0. This field MUST capability exists and has a value greater than 0. This field MUST
NOT have more than "max-cost-types" cost types. The Client MUST NOT have more than "max-cost-types" cost types. The Client MUST
specify either "cost-type" or "multi-cost-types", but MUST NOT specify either "cost-type" or "multi-cost-types", but MUST NOT
skipping to change at page 15, line 37 skipping to change at page 15, line 9
This parameter MUST NOT contain any empty array of AND predicates. This parameter MUST NOT contain any empty array of AND predicates.
An empty array would be equivalent to a constraint that is always An empty array would be equivalent to a constraint that is always
"true". An OR combination including such a constraint would be "true". An OR combination including such a constraint would be
always "true" and thus useless. always "true" and thus useless.
As an example, suppose "multi-cost-types" has the two elements As an example, suppose "multi-cost-types" has the two elements
"routingcost" and "bandwidthscore", and "testable-cost-types" has "routingcost" and "bandwidthscore", and "testable-cost-types" has
the two elements "routingcost" and "hopcount", and "or- the two elements "routingcost" and "hopcount", and "or-
constraints" has the two elements ["[0] le 100", "[1] le 2"] and constraints" has the two elements ["[0] le 100", "[1] le 2"] and
["[0] le 10", "[1] le 6"]. This is equivalent to the database ["[0] le 10", "[1] le 6"]. This is equivalent to the words:
query: "SELECT and provide routingcost and bandwidthscore WHERE "SELECT and provide routingcost and bandwidthscore WHERE
("routingcost" <= 100 AND "hopcount" <= 2) OR ("routingcost" <= 10 ("routingcost" <= 100 AND "hopcount" <= 2) OR ("routingcost" <= 10
AND "hopcount" <= 6)". AND "hopcount" <= 6)".
Note that if the "max-cost-types" capability has a value greater Note that if the "max-cost-types" capability has a value greater
than 0, a Client MAY use the "or-constraints" parameter together than 0, a Client MAY use the "or-constraints" parameter together
with the "cost-type" parameter. That is, if the Client and Server with the "cost-type" parameter. That is, if the Client and Server
are both aware of the extensions in this document, a Client MAY are both aware of the extensions in this document, a Client MAY
use an "OR" test for a single-valued cost request. use an "OR" test for a single-valued cost request.
pids, srcs, dsts: As defined in {11.3.2.3} of [RFC7285]. pids: As defined in {11.3.2.3} of [RFC7285].
4.1.3. Response 4.1.3. Response
If the Client specifies the "cost-type" input parameter, the response If the Client specifies the "cost-type" input parameter, the response
is exactly as defined in {11.2.3.6} of [RFC7285]. If the Client is exactly as defined in {11.2.3.6} of [RFC7285]. If the Client
provides the "multi-cost-types" instead, then the response is changed provides the "multi-cost-types" instead, then the response is changed
as follows: as follows:
o In "meta", the value of field "cost-type" will be ignored by the o In "meta", the value of field "cost-type" will be ignored by the
receiver and set to {}. Instead, the field "multi-cost-types" is receiver and set to {}. Instead, the field "multi-cost-types" is
skipping to change at page 16, line 33 skipping to change at page 15, line 50
destination, the ALTO Server MAY omit the entry for that source destination, the ALTO Server MAY omit the entry for that source
and destination. and destination.
4.2. Endpoint Cost Service Extensions 4.2. Endpoint Cost Service Extensions
This document extends the Endpoint Cost Service, as defined in This document extends the Endpoint Cost Service, as defined in
{11.5.1} of [RFC7285], by adding new input parameters and {11.5.1} of [RFC7285], by adding new input parameters and
capabilities, and by returning JSONArrays instead of JSONNumbers as capabilities, and by returning JSONArrays instead of JSONNumbers as
the cost values. the cost values.
The media type (11.5.1.1}, HTTP method (11.5.1.2} and "uses" The media type {11.5.1.1}, HTTP method {11.5.1.2} and "uses"
specifications (11.5.1.5} are unchanged. specifications {11.5.1.5} are unchanged.
4.2.1. Capabilities 4.2.1. Capabilities
The extensions to the Endpoint Cost Service capabilities are The extensions to the Endpoint Cost Service capabilities are
identical to the extensions to the Filtered Cost Map (see identical to the extensions to the Filtered Cost Map (see
Section 4.1.1). Section 4.1.1).
4.2.2. Accept Input Parameters 4.2.2. Accept Input Parameters
The ReqEndpointCostMap object in {11.5.1.3} of [RFC7285] is extended The ReqEndpointCostMap object in {11.5.1.3} of [RFC7285] is extended
as follows: as follows:
object { object {
[CostType cost-type;] [CostType cost-type;]
[CostType multi-cost-types<1..*>;] [CostType multi-cost-types<1..*>;]
[CostType testable-cost-types<1..*>;] [CostType testable-cost-types<1..*>;]
[JSONString constraints<0..*>;] [JSONString constraints<0..*>;]
[JSONString or-constraints<1..*><1..*>;] [JSONString or-constraints<1..*><1..*>;]
EndpointFilter endpoints; EndpointFilter endpoints;
} ReqFilteredCostMap; } ReqEndpointCostMap;
object {
[TypedEndpointAddr srcs<0..*>;]
[TypedEndpointAddr dsts<0..*>;]
} EndpointFilter;
cost-type: As defined in {11.5.1.3} of [RFC7285], with the cost-type: As defined in {11.5.1.3} of [RFC7285], with the
additional requirement that the Client MUST specify either "cost- additional requirement that the Client MUST specify either "cost-
type" or "multi-cost-types", but MUST NOT specify both. type" or "multi-cost-types", but MUST NOT specify both.
multi-cost-types: If present, the ALTO Server MUST return array- multi-cost-types: If present, the ALTO Server MUST return array-
valued costs for the cost types in this list. For each entry, the valued costs for the cost types in this list. For each entry, the
"cost-metric" and "cost-mode" fields MUST match one of the "cost-metric" and "cost-mode" fields MUST match one of the
supported cost types indicated in this resource's "capabilities" supported cost types indicated in this resource's "capabilities"
field (Section 4.2.1). The Client MUST NOT use this field unless field (Section 4.2.1). The Client MUST NOT use this field unless
skipping to change at page 17, line 40 skipping to change at page 16, line 46
types" cost types. The Client MUST specify either "cost-type" or types" cost types. The Client MUST specify either "cost-type" or
"multi-cost-types", but MUST NOT specify both. "multi-cost-types", but MUST NOT specify both.
Note that if "multi-cost-types" has one cost type, the values in Note that if "multi-cost-types" has one cost type, the values in
the cost map will be arrays with one value. the cost map will be arrays with one value.
testable-cost-types, constraints, or-constraints: Defined testable-cost-types, constraints, or-constraints: Defined
equivalently to the corresponding input parameters for an extended equivalently to the corresponding input parameters for an extended
Filtered Cost Map (Section 4.1.2). Filtered Cost Map (Section 4.1.2).
endpoints, srcs, dsts: As defined in {11.5.1.3} of [RFC7285]. endpoints: As defined in {11.5.1.3} of [RFC7285].
4.2.3. Response 4.2.3. Response
The extensions to the Endpoint Cost Service response are similar to The extensions to the Endpoint Cost Service response are similar to
the extensions to the Filtered Cost Map response (Section 4.1.3). the extensions to the Filtered Cost Map response (Section 4.1.3).
Specifically, if the Client specifies the "cost-type" input Specifically, if the Client specifies the "cost-type" input
parameter, the response is exactly as defined in {11.5.1.6} of parameter, the response is exactly as defined in {11.5.1.6} of
[RFC7285]. If the Client provides the "multi-cost-types" instead, [RFC7285]. If the Client provides the "multi-cost-types" instead,
then the response is changed as follows: then the response is changed as follows:
skipping to change at page 18, line 18 skipping to change at page 17, line 30
the same cardinality as the "multi-cost-types" input parameter, the same cardinality as the "multi-cost-types" input parameter,
and contain the cost type values in that order. If a cost type is and contain the cost type values in that order. If a cost type is
not available for a particular source and destination, the ALTO not available for a particular source and destination, the ALTO
Server MUST use the JSON "null" value for that array element. If Server MUST use the JSON "null" value for that array element. If
none of the cost types are available for a particular source and none of the cost types are available for a particular source and
destination, the ALTO Server MAY omit the entry for that source destination, the ALTO Server MAY omit the entry for that source
and destination. and destination.
5. Examples 5. Examples
The examples exposed in this section use cost metrics such as This section provides examples of Multi-Cost ALTO transactions. It
'hopcount', and 'bandwidthscore' that are not registered at the IANA. uses cost metrics, in addition to the mandatory legacy 'routingcost',
These metrics are only here for illustrative purposes and reflect that are deliberately irrelevant and not registered at the IANA.
widely valued information by applications.
5.1. Information Resource Directory 5.1. Information Resource Directory
The following is an example of an ALTO Server's Information Resource The following is an example of an ALTO Server's Information Resource
Directory. In addition to Network and Cost Map resources, it defines Directory. In addition to Network and Cost Map resources, it defines
two Filtered Cost Map and an Endpoint Cost Service, which all two Filtered Cost Map and an Endpoint Cost Service, which all
understand the multi-cost extensions. understand the multi-cost extensions.
GET /directory HTTP/1.1 GET /directory HTTP/1.1
Host: alto.example.com Host: alto.example.com
Accept: application/alto-directory+json,application/alto-error+json Accept: application/alto-directory+json,application/alto-error+json
HTTP/1.1 200 OK HTTP/1.1 200 OK
Content-Length: [TODO] Content-Length: 2704
Content-Type: application/alto-directory+json Content-Type: application/alto-directory+json
{ {
"meta" : { "meta" : {
"default-alto-network-map" : "my-default-network-map", "default-alto-network-map" : "my-default-network-map",
"cost-types" : { "cost-types" : {
"num-routing" : { "num-routing" : {
"cost-mode" : "numerical", "cost-mode" : "numerical",
"cost-metric" : "routingcost" "cost-metric" : "routingcost"
}, },
"num-hopcount" : { "num-shoesize" : {
"cost-mode" : "numerical", "cost-mode" : "numerical",
"cost-metric" : "hopcount" "cost-metric" : "shoesize"
}, },
"num-bwscore" : { "num-scenery" : {
"cost-mode" : "numerical", "cost-mode" : "numerical",
"cost-metric" : "bandwidthscore" "cost-metric" : "sceneryrate"
}, }
..... }
Other ALTO cost types as described in RFC7285
.....
}
}, },
"resources" : { "resources" : {
"my-default-network-map" : { "my-default-network-map" : {
"uri" : "http://alto.example.com/networkmap", "uri" : "http://alto.example.com/networkmap",
"media-type" : "application/alto-networkmap+json" "media-type" : "application/alto-networkmap+json"
}, },
"numerical-routing-cost-map" : { "numerical-routing-cost-map" : {
"uri" : "http://alto.example.com/costmap/num-routing", "uri" : "http://alto.example.com/costmap/num-routing",
"media-types" : [ "application/alto-costmap+json" ], "media-types" : [ "application/alto-costmap+json" ],
"uses" : [ "my-default-network-map" ], "uses" : [ "my-default-network-map" ],
"capabilities" : { "capabilities" : {
"cost-type-names" : [ "num-routing" ] "cost-type-names" : [ "num-routing" ]
} }
}, },
"numerical-hopcount-cost-map" : { "numerical-shoesize-cost-map" : {
"uri" : "http://alto.example.com/costmap/num-hopcount", "uri" : "http://alto.example.com/costmap/num-shoesize",
"media-types" : [ "application/alto-costmap+json" ], "media-types" : [ "application/alto-costmap+json" ],
"uses" : [ "my-default-network-map" ], "uses" : [ "my-default-network-map" ],
"capabilities" : { "capabilities" : {
"cost-type-names" : [ "num-hopcount" ] "cost-type-names" : [ "num-shoesize" ]
} }
}, },
.........
Other resources as described in RFC7285
.........
"filtered-multicost-map" : { "filtered-multicost-map" : {
"uri" : "http://alto.example.com/multi/costmap/filtered", "uri" : "http://alto.example.com/multi/costmap/filtered",
"media-types" : [ "application/alto-costmap+json" ], "media-types" : [ "application/alto-costmap+json" ],
"accepts" : [ "application/alto-costmapfilter+json" ], "accepts" : [ "application/alto-costmapfilter+json" ],
"uses" : [ "my-default-network-map" ], "uses" : [ "my-default-network-map" ],
"capabilities" : { "capabilities" : {
"cost-constraints" : true, "cost-constraints" : true,
"max-cost-types" : 2, "max-cost-types" : 2,
"cost-type-names" : [ "num-routingcost", "cost-type-names" : [ "num-routingcost",
"num-hopcount" ] "num-shoesize" ]
} }
}, },
"filtered-cost-map-extended" : { "filtered-cost-map-extended" : {
"uri" : "http://alto.example.com/multi/extn/costmap/filtered", "uri" : "http://alto.example.com/multi/extn/costmap/filtered",
"media-types" : [ "application/alto-costmap+json" ], "media-types" : [ "application/alto-costmap+json" ],
"accepts" : [ "application/alto-costmapfilter+json" ], "accepts" : [ "application/alto-costmapfilter+json" ],
"uses" : [ "my-default-network-map" ], "uses" : [ "my-default-network-map" ],
"capabilities" : { "capabilities" : {
"max-cost-types" : 3, "max-cost-types" : 3,
"cost-type-names" : [ "num-routingcost", "cost-type-names" : [ "num-routingcost",
"num-hopcount", "num-shoesize",
"num-bwscore"], "num-scenery"],
"testable-cost-type-names" : [ "num-routingcost", "testable-cost-type-names" : [ "num-routingcost",
"num-hopcount" ] "num-shoesize" ]
} }
}, },
"endpoint-multicost-map" : { "endpoint-multicost-map" : {
"uri" : "http://alto.example.com/multi/endpointcost/lookup", "uri" : "http://alto.example.com/multi/endpointcost/lookup",
"media-types" : [ "application/alto-endpointcost+json" ], "media-types" : [ "application/alto-endpointcost+json" ],
"accepts" : [ "application/alto-endpointcostparams+json" ], "accepts" : [ "application/alto-endpointcostparams+json" ],
"uses" : [ "my-default-network-map" ], "uses" : [ "my-default-network-map" ],
"capabilities" : { "capabilities" : {
"cost-constraints" : true, "cost-constraints" : true,
"max-cost-types" : 2, "max-cost-types" : 2,
"cost-type-names" : [ "num-routingcost", "cost-type-names" : [ "num-routingcost",
"num-hopcount" ] "num-shoesize" ]
} }
} }
} }
} }
5.2. Multi-Cost Filtered Cost Map: Example #1 5.2. Multi-Cost Filtered Cost Map: Example #1
This example illustrates a simple multi-cost ALTO transaction. The This example illustrates a simple multi-cost ALTO transaction. The
ALTO Server provides two Cost Types, "routingcost" and "hopcount", ALTO Server provides two Cost Types, "routingcost" and "shoesize",
both in "numerical" mode. The ALTO Server does not know the value of both in "numerical" mode. The Client wants the entire Multi-Cost
the "routingcost" between PID2 and PID3, and hence uses "null" for Map. The Server does not know the value of "routingcost" between
those costs. PID2 and PID3, and hence returns the value 'null' for "routingcost"
between PID2 and PID3.
POST /multi/costmap/filtered" HTTP/1.1 POST /multi/costmap/filtered" HTTP/1.1
Host: alto.example.com Host: alto.example.com
Accept: application/alto-costmap+json,application/alto-error+json Accept: application/alto-costmap+json,application/alto-error+json
Content-Type: application/alto-costmapfilter+json Content-Type: application/alto-costmapfilter+json
Content-Length: ### Content-Length: 206
{ {
"multi-cost-types": [ "multi-cost-types": [
{"cost-mode": "numerical", "cost-metric": "routingcost"}, {"cost-mode": "numerical", "cost-metric": "routingcost"},
{"cost-mode": "numerical", "cost-metric": "hopcount"} {"cost-mode": "numerical", "cost-metric": "shoesize"}
], ],
"pids" : { "pids" : {
"srcs" : [ ], "srcs" : [ ],
"dsts" : [ ] "dsts" : [ ]
} }
} }
HTTP/1.1 200 OK HTTP/1.1 200 OK
Content-Type: application/alto-costmap+json Content-Type: application/alto-costmap+json
Content-Length: ### Content-Length: 549
{ {
"meta" : { "meta" : {
"dependent-vtags" : [ "dependent-vtags" : [
{"resource-id": "my-default-network-map", {"resource-id": "my-default-network-map",
"tag": "3ee2cb7e8d63d9fab71b9b34cbf764436315542e" "tag": "3ee2cb7e8d63d9fab71b9b34cbf764436315542e"
} }
], ],
"cost-type" : {}, "cost-type" : {},
"multi-cost-types" : [ "multi-cost-types" : [
{"cost-mode": "numerical", "cost-metric": "routingcost"}, {"cost-mode": "numerical", "cost-metric": "routingcost"},
{"cost-mode": "numerical", "cost-metric": "hopcount"} {"cost-mode": "numerical", "cost-metric": "shoesize"}
] ]
}
} }
"cost-map" : { "cost-map" : {
"PID1": { "PID1":[1,0], "PID2":[4,3], "PID3":[10,2] }, "PID1": { "PID1":[1,0], "PID2":[4,3], "PID3":[10,2] },
"PID2": { "PID1":[15,5], "PID2":[1,0], "PID3":[null,9] }, "PID2": { "PID1":[15,5], "PID2":[1,0], "PID3":[null,9] },
"PID3": { "PID1":[20,12], "PID2":[null,1], "PID3":[1,0] } "PID3": { "PID1":[20,12], "PID2":[null,1], "PID3":[1,0] }
} }
} }
5.3. Multi-Cost Filtered Cost Map: Example #2 5.3. Multi-Cost Filtered Cost Map: Example #2
This example uses constraints to restrict the returned source/ This example uses constraints to restrict the returned source/
destination PID pairs to those with "routingcost" between 5 and 10, destination PID pairs to those with "routingcost" between 5 and 10,
or "hopcount" equal to 0. or "shoesize" equal to 0.
POST /multi/costmap/filtered HTTP/1.1 POST /multi/costmap/filtered HTTP/1.1
Host: alto.example.com Host: alto.example.com
Accept: application/alto-costmap+json,application/alto-error+json Accept: application/alto-costmap+json,application/alto-error+json
Content-Type: application/alto-costmapfilter+json Content-Type: application/alto-costmapfilter+json
Content-Length: ### Content-Length: 333
{ {
"multi-cost-types" : [ "multi-cost-types" : [
{"cost-mode": "numerical", "cost-metric": "routingcost"}, {"cost-mode": "numerical", "cost-metric": "routingcost"},
{"cost-mode": "numerical", "cost-metric": "hopcount"} {"cost-mode": "numerical", "cost-metric": "shoesize"}
], ],
"or-constraints" : [ ["[0] ge 5", "[0] le 10"], "or-constraints" : [ ["[0] ge 5", "[0] le 10"],
["[1] eq 0"] ] ["[1] eq 0"] ]
"pids" : { "pids" : {
"srcs" : [ "PID1", "PID2" ], "srcs" : [ "PID1", "PID2" ],
"dsts" : [ "PID1", "PID2", "PID3" ] "dsts" : [ "PID1", "PID2", "PID3" ]
} }
} }
HTTP/1.1 200 OK HTTP/1.1 200 OK
Content-Type: application/alto-costmap+json Content-Type: application/alto-costmap+json
Content-Length: ### Content-Length: 461
{ {
"meta" : { "meta" : {
"dependent-vtags" : [ "dependent-vtags" : [
{"resource-id": "my-default-network-map", {"resource-id": "my-default-network-map",
"tag": "3ee2cb7e8d63d9fab71b9b34cbf764436315542e" "tag": "3ee2cb7e8d63d9fab71b9b34cbf764436315542e"
} }
], ],
"cost-type" : {}, "cost-type" : {},
"multi-cost-types" : [ "multi-cost-types" : [
{"cost-mode": "numerical", "cost-metric": "routingcost"}, {"cost-mode": "numerical", "cost-metric": "routingcost"},
{"cost-mode": "numerical", "cost-metric": "hopcount"} {"cost-mode": "numerical", "cost-metric": "shoesize"}
] ]
} }
"cost-map" : { "cost-map" : {
"PID1": { "PID1": [1,0], "PID3": [10,5] }, "PID1": { "PID1": [1,0], "PID3": [10,5] },
"PID2": { "PID2": [1,0] } "PID2": { "PID2": [1,0] }
} }
} }
5.4. Multi-Cost Filtered Cost Map: Example #3 5.4. Multi-Cost Filtered Cost Map: Example #3
This example uses extended constraints to limit the response to cost This example uses extended constraints to limit the response to cost
points with ("routingcost" <= 10 and "hopcount" <= 2), or else points with ("routingcost" <= 10 and "shoesize" <= 2), or else
("routingcost" <= 3 and "hopcount" <= 6). Unlike the previous ("routingcost" <= 3 and "shoesize" <= 6). Unlike the previous
example, the Client is only interested in the "routingcost" cost example, the Client is only interested in the "routingcost" cost
type, and uses the "cost-type" parameter instead of "multi-cost- type, and uses the "cost-type" parameter instead of "multi-cost-
types" to tell the Server to return scalar costs instead of array types" to tell the Server to return scalar costs instead of array
costs: costs.
In this example, "[0]" means the constraint applies to "routingcost"
because that is the first cost type in the "testable-cost-types"
parameter. (If "testable-cost-types" is omitted, it is assumed to be
the same as "multi-cost-types".) The choice of using an index to
refer to cost types aims at minimizing the length of the expression
of constraints, especially for those combining several OR and AND
expressions. It was also the shortest path from the constraints
design in [RFC7285].
POST /multi/multicostmap/filtered HTTP/1.1 POST /multi/multicostmap/filtered HTTP/1.1
Host: alto.example.com Host: alto.example.com
Accept: application/alto-costmap+json,application/alto-error+json Accept: application/alto-costmap+json,application/alto-error+json
Content-Type: application/alto-costmapfilter+json Content-Type: application/alto-costmapfilter+json
Content-Length: ### Content-Length: 390
{ {
"cost-type" : { "cost-type" : {
"cost-mode": "numerical", "cost-metric": "routingcost" "cost-mode": "numerical", "cost-metric": "routingcost"
}, },
"testable-cost-types" : [ "testable-cost-types" : [
{"cost-mode": "numerical", "cost-metric": "routingcost"}, {"cost-mode": "numerical", "cost-metric": "routingcost"},
{"cost-mode": "numerical", "cost-metric": "hopcount"} {"cost-mode": "numerical", "cost-metric": "shoesize"}
], ],
"or-constraints": [ "or-constraints": [
["[0] le 10", "[1] le 2"], ["[0] le 10", "[1] le 2"],
["[0] le 3", "[1] le 6"] ["[0] le 3", "[1] le 6"]
], ],
"pids" : { "pids" : {
"srcs" : [ ], "srcs" : [ ],
"dsts" : [ ] "dsts" : [ ]
} }
} }
skipping to change at page 24, line 28 skipping to change at page 23, line 4
], ],
"or-constraints": [ "or-constraints": [
["[0] le 10", "[1] le 2"], ["[0] le 10", "[1] le 2"],
["[0] le 3", "[1] le 6"] ["[0] le 3", "[1] le 6"]
], ],
"pids" : { "pids" : {
"srcs" : [ ], "srcs" : [ ],
"dsts" : [ ] "dsts" : [ ]
} }
} }
HTTP/1.1 200 OK HTTP/1.1 200 OK
Content-Type: application/alto-costmap+json Content-Type: application/alto-costmap+json
Content-Length: ### Content-Length: 368
{ {
"meta" : { "meta" : {
"dependent-vtags" : [ "dependent-vtags" : [
{"resource-id": "my-default-network-map", {"resource-id": "my-default-network-map",
"tag": "3ee2cb7e8d63d9fab71b9b34cbf764436315542e" "tag": "3ee2cb7e8d63d9fab71b9b34cbf764436315542e"
} }
], ],
"cost-type" : { "cost-type" : {
"cost-mode": "numerical", "cost-metric": "routingcost" "cost-mode": "numerical", "cost-metric": "routingcost"
skipping to change at page 25, line 8 skipping to change at page 23, line 29
"cost-map" : { "cost-map" : {
"PID1": { "PID1": 1, "PID3": 10 }, "PID1": { "PID1": 1, "PID3": 10 },
"PID2": { "PID2": 1 }, "PID2": { "PID2": 1 },
"PID3": { "PID3": 1 } "PID3": { "PID3": 1 }
} }
} }
5.5. Multi-Cost Filtered Cost Map: Example #4 5.5. Multi-Cost Filtered Cost Map: Example #4
This example uses extended constraints to limit the response to cost This example uses extended constraints to limit the response to cost
points with ("routingcost" <= 10 and "hopcount" <= 2), or else points with ("routingcost" <= 10 and "shoesize" <= 2), or else
("routingcost" <= 3 and "hopcount" <= 6). In this example, the ("routingcost" <= 3 and "shoesize" <= 6). In this example, the
Client is interested in the "routingcost" and "bandwidthscore" cost Client is interested in the "routingcost" and "sceneryrate" cost
metrics, but not in the "hopcount" metric: metrics, but not in the "shoesize" metric:
POST /multi/extn/costmap/filtered HTTP/1.1 POST /multi/extn/costmap/filtered HTTP/1.1
Host: alto.example.com Host: alto.example.com
Accept: application/alto-costmap+json,application/alto-error+json Accept: application/alto-costmap+json,application/alto-error+json
Content-Type: application/alto-costmapfilter+json Content-Type: application/alto-costmapfilter+json
Content-Length: ### Content-Length: 461
{ {
"multi-cost-types" : [ "multi-cost-types" : [
{"cost-mode": "numerical", "cost-metric": "routingcost"}, {"cost-mode": "numerical", "cost-metric": "routingcost"},
{"cost-mode": "numerical", "cost-metric": "bandwidthscore"} {"cost-mode": "numerical", "cost-metric": "sceneryrate"}
], ],
"testable-cost-types" : [ "testable-cost-types" : [
{"cost-mode": "numerical", "cost-metric": "routingcost"}, {"cost-mode": "numerical", "cost-metric": "routingcost"},
{"cost-mode": "numerical", "cost-metric": "hopcount"} {"cost-mode": "numerical", "cost-metric": "shoesize"}
], ],
"or-constraints": [ "or-constraints": [
["[0] le 10", "[1] le 2"], ["[0] le 10", "[1] le 2"],
["[0] le 3", "[1] le 6"] ["[0] le 3", "[1] le 6"]
], ],
"pids" : { "pids" : {
"srcs" : [ ], "srcs" : [ ],
"dsts" : [ ] "dsts" : [ ]
} }
} }
HTTP/1.1 200 OK HTTP/1.1 200 OK
Content-Type: application/alto-costmap+json Content-Type: application/alto-costmap+json
Content-Length: ### Content-Length: 481
{ {
"meta" : { "meta" : {
"dependent-vtags" : [ "dependent-vtags" : [
{"resource-id": "my-default-network-map", {"resource-id": "my-default-network-map",
"tag": "3ee2cb7e8d63d9fab71b9b34cbf764436315542e" "tag": "3ee2cb7e8d63d9fab71b9b34cbf764436315542e"
} }
], ],
"cost-type" : {}, "cost-type" : {},
"multi-cost-types" : [ "multi-cost-types" : [
{"cost-mode": "numerical", "cost-metric": "routingcost"}, {"cost-mode": "numerical", "cost-metric": "routingcost"},
{"cost-mode": "numerical", "cost-metric": "bandwidthscore"} {"cost-mode": "numerical", "cost-metric": "sceneryrate"}
] ]
} }
"cost-map" : { "cost-map" : {
"PID1": { "PID1": [1,16] "PID3": [10,19] }, "PID1": { "PID1": [1,16] "PID3": [10,19] },
"PID2": { "PID2": [1,8] }, "PID2": { "PID2": [1,8] },
"PID3": { "PID3": [1,19] } "PID3": { "PID3": [1,19] }
} }
} }
5.6. Endpoint Cost Service 5.6. Endpoint Cost Service
This example uses the Endpoint Cost Service to retrieve the This example uses the Endpoint Cost Service to retrieve the
"routingcost" and "hopcount" for selected endpoints, limiting the "routingcost" and "shoesize" for selected endpoints, limiting the
response to costs with either low hopcount and reasonable routingcost response to costs with either low shoesize and reasonable routingcost
(hopcount <= 2 and routingcost <= 10), or else low routingcost and (shoesize <= 2 and routingcost <= 10), or else low routingcost and
reasonable hopcount (routingcost <= 3 and hopcount <= 6). reasonable shoesize (routingcost <= 3 and shoesize <= 6).
POST /multi/endpointcost/lookup HTTP/1.1 POST /multi/endpointcost/lookup HTTP/1.1
Host: alto.example.com Host: alto.example.com
Accept: application/alto-endpointcost+json, Accept: application/alto-endpointcost+json,
application/alto-error+json application/alto-error+json
Content-Type: application/alto-endpoincostparams+json Content-Type: application/alto-endpoincostparams+json
Content-Length: ### Content-Length: 455
{ {
"multi-cost-types" : [ "multi-cost-types" : [
{"cost-mode": "numerical", "cost-metric": "routingcost"}, {"cost-mode": "numerical", "cost-metric": "routingcost"},
{"cost-mode": "numerical", "cost-metric": "hopcount"} {"cost-mode": "numerical", "cost-metric": "shoesize"}
], ],
"or-constraints": [ "or-constraints": [
["[0] le 10", "[1] le 2"], ["[0] le 10", "[1] le 2"],
["[0] le 3", "[1] le 6"] ["[0] le 3", "[1] le 6"]
], ],
"endpoints" : { "endpoints" : {
"srcs": [ "ipv4:192.0.2.2", "ipv6:2001:db8::1:0 ], "srcs": [ "ipv4:192.0.2.2", "ipv6:2001:db8::1:0 ],
"dsts": [ "dsts": [
"ipv4:192.0.2.89", "ipv4:192.0.2.89",
"ipv4:198.51.100.34", "ipv4:198.51.100.34",
"ipv4:203.0.113.45", "ipv4:203.0.113.45",
"ipv6:2001:db8::10" "ipv6:2001:db8::10"
] ]
} }
} }
HTTP/1.1 200 OK HTTP/1.1 200 OK
Content-Length: ### Content-Length: 419
Content-Type: application/alto-endpointcost+json Content-Type: application/alto-endpointcost+json
{ {
"meta" : { "meta" : {
"multi-cost-types" : [ "multi-cost-types" : [
{"cost-mode": "numerical", "cost-metric": "routingcost"}, {"cost-mode": "numerical", "cost-metric": "routingcost"},
{"cost-mode": "numerical", "cost-metric": "hopcount"} {"cost-mode": "numerical", "cost-metric": "shoesize"}
] ]
} }
"endpoint-cost-map" : { "endpoint-cost-map" : {
"ipv4:192.0.2.2": { "ipv4:192.0.2.2": {
"ipv4:192.0.2.89": [15, 5], "ipv4:192.0.2.89": [15, 5],
"ipv4:203.0.113.45": [4, 23] "ipv4:203.0.113.45": [4, 23]
} }
"ipv6:2001:db8::1:0": { "ipv6:2001:db8::1:0": {
"ipv4:198.51.100.34": [16, 5], "ipv4:198.51.100.34": [16, 5],
"ipv6:2001:db8::10": [10, 2] "ipv6:2001:db8::10": [10, 2]
skipping to change at page 28, line 4 skipping to change at page 26, line 12
This document does not define any new media types or introduce any This document does not define any new media types or introduce any
new IANA considerations. new IANA considerations.
7. Privacy And Security Considerations 7. Privacy And Security Considerations
This document does not introduce any privacy or security issues not This document does not introduce any privacy or security issues not
already present in the ALTO protocol. already present in the ALTO protocol.
The Multi-Cost optimization even tends to reduce the on the wire data The Multi-Cost optimization even tends to reduce the on the wire data
exchange volume, compared to multiple single cost ALTO transactions. exchange volume, compared to multiple single cost ALTO transactions.
Likewise, the risk related to massive Multi-Cost requests is Likewise, the risk related to massive Multi-Cost requests is
moderated by the fact that Multi-Cost constraints additionally filter moderated by the fact that Multi-Cost constraints additionally filter
ALTO Server responses and thus reduce their volume. ALTO Server responses and thus reduce their volume.
Note that, because queries for multiple metrics represent a stronger
fingerprinting signal than queries for a single metric,
implementations of this protocol may leak more information about the
ALTO client than would occur with a succession of individual queries.
Though, in many cases it would already be possible to link those
queries by using the source IP address or other existing information.
8. Acknowledgements 8. Acknowledgements
The authors would like to thank Richard Alimi, Fred Baker, Dhruv The authors would like to thank Richard Alimi, Fred Baker, Dhruv
Dhodi, Vijay Gurbani, Dave Mac Dysan, Young Lee, Richard Yang, for Dhodi, Vijay Gurbani, Dave Mac Dysan, Young Lee, Richard Yang, for
fruitful discussions and feedback on this document and previous fruitful discussions and feedback on this document and previous
versions. Gao Kai, Hans Seidel, Richard Yang, Qiao Xiang and Wang versions. Gao Kai, Hans Seidel, Richard Yang, Qiao Xiang and Wang
Xin provided substantial review feedback and suggestions to the Xin provided substantial review feedback and suggestions to the
protocol design. protocol design.
9. References 9. References
 End of changes. 89 change blocks. 
259 lines changed or deleted 231 lines changed or added

This html diff was produced by rfcdiff 1.45. The latest version is available from http://tools.ietf.org/tools/rfcdiff/