This section documents extensions to two basic ALTO information resources (Filtered Cost Maps and Endpoint Cost Service) to provide calendared information services for them.
Both extensions return calendar start time (calendar-start-time, a point in time), which
MUST be specified as an HTTP "Date" header field using the IMF-fixdate format specified in
Section 7.1.1.1 of
RFC 7231. Note that the IMF-fixdate format uses "GMT", not "UTC", to designate the time zone, as in this example:
Date: Tue, 15 Nov 2019 08:12:31 GMT
A legacy ALTO Client requests and gets Filtered Cost Map responses, as specified in [
RFC 7285].
The input parameters of a "legacy" request for a Filtered Cost Map, defined by object ReqFilteredCostMap in
Section 11.3.2 of
RFC 7285, are augmented with one additional member. The same augmentation applies to object ReqFilteredCostMap defined in
Section 4.1.2 of
RFC 8189.
A Calendar-aware ALTO Client requesting a Calendar on a given cost type for a Filtered Cost Map resource having Calendar capabilities
MUST add the following field to its input parameters:
JSONBoolean calendared<1..*>;
This field is an array of 1 to N boolean values, where N is the number of requested metrics. N is greater than 1 when the Client and the Server also implement [
RFC 8189].
Each entry corresponds to the requested metric at the same array position. Each boolean value indicates whether or not the ALTO Server should provide the values for this cost type as a Calendar. The array
MUST contain exactly N boolean values, otherwise, the Server returns an error.
This field
MUST NOT be included if no member "calendar-attributes" is specified in this information resource.
If a value of field "calendared" is 'true' for a cost type name for which no Calendar attributes have been specified, an ALTO Server, whether it implements the extensions of this document or only implements [
RFC 7285],
MUST ignore it and return a response with a single cost value, as specified in [
RFC 7285].
If this field is not present, it
MUST be assumed to have only values equal to 'false'.
A Calendar-aware ALTO Client that supports requests for only one cost type at a time and wants to request a Calendar
MUST provide an array of 1 element:
A Calendar-aware ALTO Client that supports requests for more than one cost type at a time, as specified in [
RFC 8189],
MUST provide an array of N values set to 'true' or 'false', depending whether it wants the applicable cost type values as a single or calendared value.
In a calendared ALTO Filtered Cost Map, a cost value between a source and a destination is a JSON array of JSON values. An ALTO Calendar values array has a number of values equal to the value of member "number-of-intervals" of the Calendar attributes that are indicated in the IRD. These attributes will be conveyed as metadata in the Filtered Cost Map response. Each element of the array is valid for the time interval that matches its array position.
The FCM response conveys metadata, among which:
-
some are not specific to Calendars and ensure compatibility with [RFC 7285] and [RFC 8189] and
-
some are specific to Calendars.
The non-Calendar-specific "meta" fields of a calendared Filtered Cost Map response
MUST include at least:
-
if the ALTO Client requests cost values for one cost type at a time, only the "meta" fields specified in [RFC 7285] for these information service responses:
-
"dependent-vtags" and
-
"cost-type" field.
-
if the ALTO Client implements the Multi-Cost ALTO extension specified in [RFC 8189] and requests cost values for several cost types at a time, the "meta" fields specified in [RFC 8189] for these information service responses:
-
"dependent-vtags",
-
"cost-type" field with value set to '{}', for backwards compatibility with [RFC 7285], and
-
"multi-cost-types" field.
If the Client request does not provide member "calendared" or if it provides it with a value equal to 'false' for all the requested cost types, then the ALTO Server response is exactly as specified in [
RFC 7285] and [
RFC 8189].
If the value of member "calendared" is equal to 'false' for a given requested cost type, the ALTO Server
MUST return, for this cost type, a single cost value as specified in [
RFC 7285].
If the value of member "calendared" is equal to 'true' for a given requested cost type, the ALTO Server returns, for this cost type, a cost value Calendar, as specified above in this section. In addition to the above cited non-Calendar-specific "meta" members, the Server
MUST provide a Calendar-specific metadata field.
The Calendar-specific "meta" field that a calendared Filtered Cost Map response
MUST include is a member called "calendar-response-attributes", which describes properties of the Calendar and where:
-
member "calendar-response-attributes" is an array of one or more objects of type "CalendarResponseAttributes",
-
each "CalendarResponseAttributes" object in the array is specified for one or more cost types for which the value of member "calendared", in object ReqFilteredCostMap provided in the Client request, is equal to 'true' and for which a Calendar is provided for the requested information resource, and
-
the "CalendarResponseAttributes" object that applies to a cost type name has a corresponding "CalendarAttributes" object defined for this cost type name in the IRD capabilities of the requested information resource. This object is the entry in the "calendar-attributes" array member of the IRD resource entry, which includes the name of the requested cost type. This corresponding "CalendarAttributes" object has the same values as object "CalendarResponseAttributes" for members "time-interval-size" and "number-of-intervals". The members of the "CalendarResponseAttributes" object include all the members of the corresponding "CalendarAttributes" object.
The format of member "CalendarResponseAttributes is defined as follows:
CalendarResponseAttributes calendar-response-attributes <1..*>;
object{
[JSONString cost-type-names <1..*>;]
JSONString calendar-start-time;
JSONNumber time-interval-size;
JSONNumber number-of-intervals;
[JSONNumber repeated;]
} CalendarResponseAttributes;
Object CalendarResponseAttributes has the following attributes:
-
"cost-type-names":
-
An array of one or more cost type names to which the value of the other members of CalendarResponseAttributes apply and for which a Calendar has been requested. The value of this member is a subset of the "cost-type-names" member of the abovementioned corresponding "CalendarAttributes" object in the "calendar-attributes" array member in the IRD. This member MUST be present when Cost Calendars are provided for more than one cost type.
-
"calendar-start-time":
-
Indicates the date at which the first value of the Calendar applies. The value is a string that, as specified in Section 5, contains an HTTP "Date" header field using the IMF-fixdate format specified in Section 7.1.1.1 of RFC 7231. The value provided for attribute "calendar-start-time" SHOULD NOT be later than the request date.
-
"time-interval-size":
-
As specified in Section 4.1 and with the same value as in the abovementioned corresponding "CalendarAttributes" object.
-
"number-of-intervals":
-
As specified in Section 4.1 and with the same value as in the abovementioned corresponding "CalendarAttributes" object.
-
"repeated":
-
An optional field provided for Calendars. It is an integer N greater or equal to '1' that indicates how many iterations of the Calendar value array starting at the date indicated by "calendar-start-time" have the same values. The number N includes the iteration provided in the returned response.
For example, suppose the "calendar-start-time" member has value "Mon, 30 Jun 2019 00:00:00 GMT", the "time-interval-size" member has value '3600', the "number-of-intervals" member has value '24', and the value of member "repeated" is equal to '4'. This means that the Calendar values are the same on Monday, Tuesday, Wednesday, and Thursday on a period of 24 hours starting at 00:00:00 GMT. The ALTO Client thus may use the same Calendar for the next 4 days starting at "calendar-start-time" and will only need to request a new one for Friday, July 4th at 00:00:00 GMT.
Attribute "repeated" may take a very high value if a Calendar represents a cyclic value pattern that the Server considers valid for a long period and hence will only update once this period has elapsed or if an unexpected event occurs on the network. In the latter case, the Client will be notified if it uses the "ALTO Incremental Updates Using Server-Sent Events (SSE)" Service, specified in [
RFC 8895]. To this end, it is
RECOMMENDED that ALTO Servers providing ALTO Calendars also provide the "ALTO Incremental Updates Using Server-Sent Events (SSE)" Service, which is specified in [
RFC 8895]. Likewise, ALTO Clients capable of using ALTO Calendars
SHOULD also use the SSE Service. See also discussion in
Section 8 "Operational Considerations".
An example of non-real-time information that can be provisioned in a Calendar is the expected path throughput. While the transmission rate can be measured in real time by end systems, the operator of a data center is in the position of formulating preferences for given paths at given time periods to avoid traffic peaks due to diurnal usage patterns. In this example, we assume that an ALTO Client requests a Calendar of network-provider-defined throughput ratings as specified in the IRD to schedule its bulk data transfers as described in the use cases.
In the example IRD, Calendars for cost type name "num-throughputrating" are available for the information resources "filtered-cost-calendar-map" and "endpoint-cost-map-calendar". The ALTO Client requests a Calendar for "num-throughputrating" via a POST request for a Filtered Cost Map.
We suppose in the present example that the ALTO Client sends its request on Tuesday, July 1st 2019 at 13:15. The Server returns Calendars with arrays of 12 numbers for each source and destination pair. The values for metric "throughputrating", in this example, are assumed to be encoded in 2 digits.
POST /calendar/costmap/filtered HTTP/1.1
Host: custom.alto.example.com
Content-Length: 217
Content-Type: application/alto-costmapfilter+json
Accept: application/alto-costmap+json,application/alto-error+json
{
"cost-type" : {"cost-mode" : "numerical",
"cost-metric" : "throughputrating"},
"calendared" : [true],
"pids" : {
"srcs" : [ "PID1", "PID2" ],
"dsts" : [ "PID1", "PID2", "PID3" ]
}
}
HTTP/1.1 200 OK
Content-Length: 1043
Content-Type: application/alto-costmap+json
{
"meta" : {
"dependent-vtags" : [
{"resource-id": "my-default-network-map",
"tag": "3ee2cb7e8d63d9fab71b9b34cbf764436315542e"
}
],
"cost-type" : {"cost-mode" : "numerical",
"cost-metric" : "throughputrating"},
"calendar-response-attributes" : [
{"calendar-start-time" : "Tue, 1 Jul 2019 13:00:00 GMT",
"time-interval-size" : 7200,
"number-of-intervals" : 12}
]
},
"cost-map" : {
"PID1": { "PID1": [ 1, 12, 14, 18, 14, 14,
14, 18, 19, 20, 11, 12],
"PID2": [13, 4, 15, 16, 17, 18,
19, 20, 11, 12, 13, 14],
"PID3": [20, 20, 18, 14, 12, 12,
14, 14, 12, 12, 14, 16] },
"PID2": { "PID1": [17, 18, 19, 10, 11, 12,
13, 14, 15, 16, 17, 18],
"PID2": [20, 20, 18, 16, 14, 14,
14, 16, 16, 16, 14, 16],
"PID3": [20, 20, 18, 14, 12, 12,
14, 14, 12, 12, 14, 16] }
}
}
The extensions to the requests for calendared Endpoint Cost Maps are the same as for the Filtered Cost Map Service, specified in
Section 5.1.1 of this document. Likewise, the rules defined around the extensions to ECM requests are the same as those defined in
Section 5.1.1 for FCM requests.
The ReqEndpointCostMap object for a calendared ECM request will have the following format:
object {
[CostType cost-type;]
[CostType multi-cost-types<1..*>;]
[JSONBoolean calendared<1..*>;]
EndpointFilter endpoints;
} ReqEndpointCostMap;
object {
[TypedEndpointAddr srcs<0..*>;]
[TypedEndpointAddr dsts<0..*>;]
} EndpointFilter;
Member "cost-type" is optional because, in the ReqEndpointCostMap object definition of this document, it is jointly present with member "multi-cost-types" to ensure compatibility with [
RFC 8189]. In [
RFC 8189], members "cost-type" and "multi-cost-types" are both optional and have to obey the rule specified in
Section 4.1.2 of
RFC 8189 stating that "the Client
MUST specify either "cost-type" or "multi-cost-types" but
MUST NOT specify both".
The interpretation of member "calendared" is the same as for the ReqFilteredCostMap object defined in
Section 5.1.1 of this document. The interpretation of the other members is the same as for object ReqEndpointCostMap defined in [
RFC 7285] and [
RFC 8189]. The type TypedEndpointAddr is defined in
Section 10.4.1 of
RFC 7285.
For the reasons explained in
Section 3.3, a Calendar-aware ALTO Server does not support constraints. Therefore, member "[constraints]" is not present in the ReqEndpointCostMap object, and member "constraints"
MUST NOT be present in the input parameters of a request for an Endpoint Cost Calendar. If this member is present, the Server
MUST ignore it.
The "meta" field of a calendared Endpoint Cost response
MUST include at least:
-
if the ALTO Client supports cost values for one cost type at a time only, the "meta" fields specified in Section 11.5.1.6 of RFC 7285 for the Endpoint Cost response:
-
if the ALTO Client supports cost values for several cost types at a time, as specified in [RFC 8189], the "meta" fields specified in [RFC 8189] for the Endpoint Cost response:
-
"cost-type" field with value set to '{}', for backwards compatibility with [RFC 7285].
-
"multi-cost-types" field.
If the Client request does not provide member "calendared" or if it provides it with a value equal to 'false', for all the requested cost types, then the ALTO Server response is exactly as specified in [
RFC 7285] and [
RFC 8189].
If the ALTO Client provides member "calendared" in the input parameters with a value equal to 'true' for given requested cost types, the "meta" member of a calendared Endpoint Cost response
MUST include, for these cost types, an additional member "calendar-response-attributes", the contents of which obey the same rules as for the Filtered Cost Map Service, specified in
Section 5.1.2. The Server response is thus changed as follows, with respect to [
RFC 7285] and [
RFC 8189]:
-
the "meta" member has one additional field "CalendarResponseAttributes", as specified for the Filtered Cost Map Service, and
-
the calendared costs are JSONArrays instead of the JSONNumbers format used by legacy ALTO implementations. All arrays have a number of values equal to 'number-of-intervals'. Each value corresponds to the cost in that interval.
If the value of member "calendared" is equal to 'false' for a given requested cost type, the ALTO Server
MUST return, for this cost type, a single cost value as specified in [
RFC 7285].
Let us assume an Application Client is located in an end system with limited resources and has access to the network that is either intermittent or provides an acceptable quality in limited but predictable time periods. Therefore, it needs to schedule both its resource-greedy networking activities and its ALTO transactions.
The Application Client has the choice to trade content or resources with a set of endpoints and needs to decide with which one it will connect and at what time. For instance, the endpoints are spread in different time zones or have intermittent access. In this example, the 'routingcost' is assumed to be time-varying, with values provided as ALTO Calendars.
The ALTO Client associated with the Application Client queries an ALTO Calendar on 'routingcost' and will get the Calendar covering the 24-hour time period "containing" the date and time of the ALTO Client request.
For cost type "num-routingcost", the solicited ALTO Server has defined 3 different daily patterns, each represented by a Calendar to cover the week of Monday, June 30th at 00:00 to Sunday, July 6th 23:59:
-
C1 for Monday, Tuesday, Wednesday, and Thursday (weekdays)
-
C2 for Saturday and Sunday (weekends)
-
C3 for Friday (maintenance outage on July 4, 2019 from 02:00:00 GMT to 04:00:00 GMT or a big holiday that is widely celebrated and generates a large number of connections).
In the following example, the ALTO Client sends its request on Tuesday, July 1st 2019 at 13:15.
The "routingcost" values are assumed to be encoded in 3 digits.
POST /calendar/endpointcost/lookup HTTP/1.1
Host: custom.alto.example.com
Content-Length: 304
Content-Type: application/alto-endpointcostparams+json
Accept: application/alto-endpointcost+json,
application/alto-error+json
{
"cost-type" : {"cost-mode" : "numerical",
"cost-metric" : "routingcost"},
"calendared" : [true],
"endpoints" : {
"srcs": [ "ipv4:192.0.2.2" ],
"dsts": [
"ipv4:192.0.2.89",
"ipv4:198.51.100.34",
"ipv4:203.0.113.45",
"ipv6:2001:db8::10"
]
}
}
HTTP/1.1 200 OK
Content-Length: 1351
Content-Type: application/alto-endpointcost+json
{
"meta" : {
"cost-type" : {"cost-mode" : "numerical",
"cost-metric" : "routingcost"},
"calendar-response-attributes" : [
{"calendar-start-time" : "Mon, 30 Jun 2019 00:00:00 GMT",
"time-interval-size" : 3600,
"number-of-intervals" : 24,
"repeated": 4
}
]
},
"endpoint-cost-map" : {
"ipv4:192.0.2.2": {
"ipv4:192.0.2.89" : [100, 100, 100, 100, 100, 150,
200, 300, 300, 300, 300, 250,
250, 300, 300, 300, 300, 300,
400, 250, 250, 200, 150, 150],
"ipv4:198.51.100.34" : [ 80, 80, 80, 80, 150, 150,
250, 400, 400, 450, 400, 200,
200, 350, 400, 400, 400, 350,
500, 200, 200, 200, 100, 100],
"ipv4:203.0.113.45" : [300, 400, 250, 250, 200, 150,
150, 100, 100, 100, 100, 100,
100, 100, 100, 100, 100, 150,
200, 300, 300, 300, 300, 250],
"ipv6:2001:db8::10" : [200, 250, 300, 300, 300, 300,
250, 300, 300, 300, 300, 350,
300, 400, 250, 150, 100, 100,
100, 150, 200, 250, 250, 300]
}
}
}
When the Client gets the Calendar for "routingcost", it sees that the "calendar-start-time" is Monday at 00h00 GMT and member "repeated" is equal to '4'. It understands that the provided values are valid until Thursday and will only need to get a Calendar update on Friday.
In this example, it is assumed that the ALTO Server implements multi-cost capabilities, as specified in [
RFC 8189] . That is, an ALTO Client can request and receive values for several cost types in one single transaction. An illustrating use case is a path selection done on the basis of 2 metrics: routingcost and owdelay.
As in the previous example, the IRD indicates that the ALTO Server provides "routingcost" Calendars in terms of 24 time intervals of 1 hour (3600 seconds) each.
For metric "owdelay", the IRD indicates that the ALTO Server provides Calendars in terms of 12 time interval values lasting 5 minutes (300 seconds) each.
In the following example transaction, the ALTO Client sends its request on Tuesday, July 1st 2019 at 13:15.
This example assumes that the values of metric "owdelay" and "routingcost" are encoded in 3 digits.
POST calendar/endpointcost/lookup HTTP/1.1
Host: custom.alto.example.com
Content-Length: 390
Content-Type: application/alto-endpointcostparams+json
Accept: application/alto-endpointcost+json,
application/alto-error+json
{
"cost-type" : {},
"multi-cost-types" : [
{"cost-mode" : "numerical", "cost-metric" : "routingcost"},
{"cost-mode" : "numerical", "cost-metric" : "owdelay"}
],
"calendared" : [true, true],
"endpoints" : {
"srcs": [ "ipv4:192.0.2.2" ],
"dsts": [
"ipv4:192.0.2.89",
"ipv4:198.51.100.34",
"ipv4:203.0.113.45",
"ipv6:2001:db8::10"
]
}
}
HTTP/1.1 200 OK
Content-Length: 2165
Content-Type: application/alto-endpointcost+json
{
"meta" : {
"multi-cost-types" : [
{"cost-mode" : "numerical", "cost-metric" : "routingcost"},
{"cost-mode" : "numerical", "cost-metric" : "owdelay"}
],
"calendar-response-attributes" : [
{"cost-type-names" : [ "num-routingcost" ],
"calendar-start-time" : "Mon, 30 Jun 2019 00:00:00 GMT",
"time-interval-size" : 3600,
"number-of-intervals" : 24,
"repeated": 4 },
{"cost-type-names" : [ "num-owdelay" ],
"calendar-start-time" : "Tue, 1 Jul 2019 13:00:00 GMT",
"time-interval-size" : 300,
"number-of-intervals" : 12}
]
},
"endpoint-cost-map" : {
"ipv4:192.0.2.2": {
"ipv4:192.0.2.89" : [[100, 100, 100, 100, 100, 150,
200, 300, 300, 300, 300, 250,
250, 300, 300, 300, 300, 300,
400, 250, 250, 200, 150, 150],
[ 20, 400, 20, 80, 80, 90,
100, 90, 60, 40, 30, 20]],
"ipv4:198.51.100.34" : [[ 80, 80, 80, 80, 150, 150,
250, 400, 400, 450, 400, 200,
200, 350, 400, 400, 400, 350,
500, 200, 200, 200, 100, 100],
[ 20, 20, 50, 30, 30, 30,
30, 40, 40, 30, 20, 20]],
"ipv4:203.0.113.45" : [[300, 400, 250, 250, 200, 150,
150, 100, 100, 100, 100, 100,
100, 100, 100, 100, 100, 150,
200, 300, 300, 300, 300, 250],
[100, 90, 80, 60, 50, 50,
40, 40, 60, 90, 100, 80]],
"ipv6:2001:db8::10" : [[200, 250, 300, 300, 300, 300,
250, 300, 300, 300, 300, 350,
300, 400, 250, 150, 100, 100,
100, 150, 200, 250, 250, 300],
[ 40, 40, 40, 40, 50, 50,
50, 20, 10, 15, 30, 40]]
}
}
}
When receiving the response, the Client sees that the Calendar values for metric "routingcost" are repeated for 4 iterations. Therefore, in its next requests until the "routingcost" Calendar is expected to change, the Client will only need to request a Calendar for "owdelay".
Without the ALTO Calendar extensions, the ALTO Client would have no clue on the dynamicity of the metric value change and would spend needless time requesting values at an inappropriate pace. In addition, without the Multi-Cost ALTO capabilities, the ALTO Client would duplicate this waste of time as it would need to send one request per cost metric.