---------- Forwarded message ----------
From: Graham Triggs <grahamtri...@gmail.com>
Date: 19 January 2011 22:45
Subject: Re: content negotiating for package formats
To: Ian Stuart <ian.stu...@ed.ac.uk>
Cc: techadvisorypa...@swordapp.org



On 19 January 2011 08:44, Ian Stuart <ian.stu...@ed.ac.uk> wrote:
>
> On 19/01/11 08:06, Richard Jones wrote:
>>
>> and your content negotiation header says:
>>
>> Accept: A; q=1.0, B; q=0.8
>> Accept-Packaging: Z; q=1.0, X; q=1.0
>>
>> Which combination do you return?
>
> I agree its not a clear-cut case..... however it also has to be said that the 
> content negotiation header isn't helping by declaring two options to be of 
> equal "value"
>
> I would say:
> A+Z, then A+X, then B+Z, then B+X
>
> .... FIFO-style
>
> (after all, if you have a preference for order, try:
>
>  Accept-Packaging: X; q=1.0, Z; q=1.0
>
> instead)
>
>
> Even under the concept of a combined Accept model, what do you do when you 
> receive
>
>  Accept-Media-Feature: A(Z); q=1.0, A(X); q=1.0, B(Z); q=0.8, B(X); q=0.8


It's complicated even beyond what you are suggesting. What if as the
server, you consider your support of format A to only be partial - say
q=0.6 equivalent? Or if your support of format B is also only q=0.8
equivalent?
Basically, you end up with two sides negotiating with no [declared]
perfect support in common. Is 'perfect' support on one side and poor
support on the other better or worse than so/so support on either
side?
So what do you do when you receive the kind of negotiation that you
mention? Answer: whatever you choose to do. You should use the quality
indications to steer you to a format/packaging that is better
supported by the client. But you can weight your choice with whatever
factors you choose to use. Is it twice as fast/efficient for you to
return packaging X? Then return A(X) - the client has declared that it
doesn't care which of A(Z) or A(X) it gets, it's only said that it
would prefer to get one of them instead of B(Z).
Content negotiation isn't an exact discipline, because you are having
to make generalisations. How do you express that in one metadata
schema you only support 10% of the fields, but they are far more
important than the 95% of fields you support in another? Or that there
is such a vast difference in resources used that you don't care about
a 5% loss in quality to take a JPEG rather than a TIF? All you can do
is rank them as best you can for the general case, and that sometimes
that might mean you get a format that isn't optimal for that
particular case.
G

------------------------------------------------------------------------------
Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
Finally, a world-class log management solution at an even better price-free!
Download using promo code Free_Logger_4_Dev2Dev. Offer expires 
February 28th, so secure your free ArcSight Logger TODAY! 
http://p.sf.net/sfu/arcsight-sfd2d
_______________________________________________
Sword-app-techadvisorypanel mailing list
Sword-app-techadvisorypanel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sword-app-techadvisorypanel

Reply via email to