W3C home > Mailing lists > Public > ietf-http-wg@w3.org > January to March 2010

Re: #29: correcting corrected_initial_age

From: Julian Reschke <julian.reschke@gmx.de>
Date: Mon, 08 Mar 2010 20:21:27 +0100
Message-ID: <4B954E37.3060307@gmx.de>
To: Mark Nottingham <mnot@mnot.net>
CC: HTTP Working Group <ietf-http-wg@w3.org>, Alex Rousskov <rousskov@measurement-factory.com>, Roy Fielding <fielding@gbiv.com>
On 04.03.2010 05:39, Mark Nottingham wrote:
> We haven't heard back from Alex, and the other issue I mentioned didn't seem to get enough support to move on. So, I suggest we do the conservative thing:
>
> Current text:
>>    age_value     - Age header field-value received with the response
>>    date_value    - Date header field-value received with the response
>>    request_time  - local time when the cache made the request
>>                   resulting in the stored response
>>    response_time - local time when the cache received the response
>>    now           - current local time
>>
>>    apparent_age = max(0, response_time - date_value);
>>    corrected_received_age = max(apparent_age, age_value);
>>    response_delay = response_time - request_time;
>>    corrected_initial_age = corrected_received_age + response_delay;
>>    resident_time = now - response_time;
>>    current_age   = corrected_initial_age + resident_time;
>
> Replacement text:
>>    age_value     - Age header field-value received with the response;
>>                                 0 if not available.
>>    date_value    - Date header field-value received with the response;
>>                                 see [ref] for requirements regarding responses
>>                                 without a date_value.
>>    request_time  - local time when the cache made the request
>>                   resulting in the stored response
>>    response_time - local time when the cache received the response
>>    now           - current local time
>>
>>    apparent_age = max(0, response_time - date_value);
>>    response_delay = response_time - request_time;
>>    corrected_initial_age = max(apparent_age, age_value + response_delay)
>>    resident_time = now - response_time;
>>    current_age   = corrected_initial_age + resident_time;
>
> Comments?

Looks good to me. I tried both the old and the new formula with a set of 
input values, and came up with:

Request_time Age_value Date_value Response_time 
RFC2616_corrected_initial_age proposed_corrected_initial_age
1000 2 0995 1020 45 25
1000 2 1000 1020 40 22
1000 2 1005 1020 35 22
1000 2 1010 1020 30 22
1000 2 1015 1020 25 22
1000 2 1020 1020 22 22
1000 2 1025 1020 22 22
1000 0 1001 1002 3 2
1000 1 1001 1002 3 3
1000 2 1001 1002 4 4
1000 3 1001 1002 5 5
1000 4 1001 1002 6 6
1000 5 1001 1002 7 7

...so the new formula (last column) indeed is less conservative.

I agree with Adrien's comment that we should also avoid the term "local 
time".

Best regards, Julian
Received on Monday, 8 March 2010 19:23:12 UTC

This archive was generated by hypermail 2.4.0 : Thursday, 2 February 2023 18:43:21 UTC