On Thu, Nov 10, 2011 at 10:19 AM, Bill Roome <[email protected]> wrote:
> I recently implemented cost constraints, and a question came up: If the
> mode is "ordinal", what do constraints mean?

Good question to pose. :)

> First possibility: The constraints apply to the ordinal numbers.  Eg, "lt
> 3" means "only give me the lowest 2". That would make sense if ordinals
> are always 1, 2, 3, etc. But they're not; they can be any value.

Because of the "gotcha" you mentioned at the end there, I would agree
this way may not make much sense.  We'd be asking clients to define
constraints using absolute values when they have no idea what a
particular server is going to use for that absolute value.

> Second choice: Constraints apply to the underlying numeric costs, and then
> the server ordinalizes the src/dest pairs that satisfy the constraints.
> That makes sense, except a client could use that to determine the
> underlying numeric costs, which I assume some servers would like to keep
> hidden.

I completely agree that we don't want to open up the server and
require them to provide cost constraints on the underlying numerical
costs.  In the interest of keeping the protocol simpler to understand,
I would slightly to prefer to not go this route (but I can see a
couple of use cases and I don't feel strongly either way).
Technically, the server *could* still signal using the capabilities
for Information Resources that cost constraints are only allowed for
maps with the numerical cost mode.  That sort of leads directly into
your 3rd option...

> Number 3: Say that constraints only apply when you ask for numeric costs.

I'd opt for #3 here.  Its pretty straightforward to understand
conceptually, simpler to implement, and it seems like it captures the
major use cases to me.  I guess extensions could extend constraints to
ordinal costs if there really was a need.

Rich

>
>        - Bill Roome
>
>
> _______________________________________________
> alto mailing list
> [email protected]
> https://www.ietf.org/mailman/listinfo/alto
>
_______________________________________________
alto mailing list
[email protected]
https://www.ietf.org/mailman/listinfo/alto

Reply via email to