Hi Sean,
Good question! There are several use cases I had in mind:
1) What if you target URI is "/users/123" and you have two mappings
"/users/{id}/orders/order" and "users/{id}"? Both routes are valid, but the
first one seems preferable because we match 100% of the secode pattern
instead of, let's say, 50% of the second one.
2) Load balancing between several routes where the score would reflect the
current "load" on the route (think about a remote sever that you could
monitor) or a pool of connections.
3) Routing based on custom preferences (like a branch of Restlets optimized
for Firefox, and another for IE). The score could be used to indicate the
level of compatibility of the request with the branch.
There are also several routing modes, like a random and round robin one. And
I'm sure we'll discover new applications of the router/scorer duo in the
future :-)
Best regards,
Jerome
> -----Message d'origine-----
> De : news [mailto:[EMAIL PROTECTED] De la part de Sean Landis
> Envoyé : vendredi 20 octobre 2006 20:57
> À : [email protected]
> Objet : Re: Restlets and JMX
>
> Hi Jerome,
> >
> > Scorers are involved in the call routing process. Each
> scorer attached to a
> > router is acting as a routing option. The router decides on
> the option to
> > follow by computing a scorer for the call with each scorer
> and applying a
> > selection algorithm (first match, best match, etc.).
>
> This much I understood from looking at the code. My lack of
> understanding is
> what use cases (applications) would use scoring rather than
> exact matches for
> routing.
>
> Thanks,
>
> Sean
>
> >
> > Best,
> > Jerome
> >
> >
>
>
>
>
>