Here is a controversial question prompted by today's virtual meeting: Why
must ordinal costs be integers? Given that we do not require them to be
consecutive, and we do not require them to start with 1 (or 0), what is
the benefit to requiring them to be integers?
Note that JSON does not distinguish between integers and floating point,
and in the JSON libraries I've seen, numbers are always floating point.
When parsing JSON, libraries do not distinguish between 1 and 1.0. When
generating JSON, most libraries will generate 1, but a library could
generate 1.0.
I believe the difference between "numerical" and "ordinal" costs is in the
interpretation, not the format. Numerical costs have two properties
clients may find useful. First, numerical costs are scalable, while
ordinal costs are not. That is, suppose an ECS query returns the values
10, 11 and 100. If the costs are numerical, the client knows 10 is better
than 11 -- but not by much. And both are much better than 100. So the
client might randomly pick the cost 10 or cost 11 server. If the costs are
ordinal, the client knows 10 is better than 11, and 11 is better than 100.
But the client cannot tell whether 11 is close to 10, or close to 100, or
somewhere in the middle. So the client must select the cost 10 server.
The other property is that numerical costs are comparable between queries.
In our 10/11/100 example again, suppose that the client picked the server
with cost 11, and discovered that server was fast enough. Now suppose the
client sends another ECS query an hour later, for a different set of
servers. If the costs are numerical, the client can use its previous
experience to decide that any server with cost 11 or less is acceptable.
If costs are ordinal, the client cannot; the costs in the first query
cannot be compared to those in the second query.
RFC 7285 has oonly two references to ordinal costs as integers. The first
is {6.1.2.2}: "The values are non-negative integers". The second is
{11.3.2.4}: "... ordinal costs are not restricted to being sequential
integers". And that one is ambiguous: does that mean they must be
integers, just not sequential? Or does that mean ordinals are not required
to be integers?
- Wendy Roome
_______________________________________________
alto mailing list
[email protected]
https://www.ietf.org/mailman/listinfo/alto