Re: #29: correcting corrected_initial_age

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