W3C home > Mailing lists > Public > www-jigsaw@w3.org > May to June 1998

Re: proxy algorithms

From: Roman Dusek <dusek@kolej.mff.cuni.cz>
Date: Tue, 12 May 1998 12:57:25 +0200
Message-Id: <199805121057.MAA02406@mail.kolej.mff.cuni.cz>
To: Yves Lafon <ylafon@w3.org>
Cc: Jigsaw conference <www-jigsaw@w3.org>
At 10:25 12.5.1998 +0200, you wrote:
>On Sun, 10 May 1998, Roman Dusek wrote:
>> Hi,
>> I would like to place my own algorithms into Jigsaw (acting as proxy)
>> instead of contemporary heuristics and clean-up algorithms (I can be more
>> specific if somebody is interested). I've spent many hours examining the
>> way request is processed and response generated from cache or received from
>> origin server, but I'm still not sure about the principle enough.
>> Can anybody describe the way caching (hit/mis/revalidation) is performed in
>> the structure of Jigsaw?
>Well, I will try to make it short and if you want more details on some
>There are two ways of doing filtering in Jigsaw, the server side filtering
>and the client side filtering.

OK, to make it clear: 
Server side filter (e.g. CounterFilter) should be the instance of
ResourceFilter class, and is attached to frame (e.g. HTTPFrame).
Client side filter (CacheFilter) should implement PropRequestFilter
interface, and is attached to some property (e.g. ProxyProp). 
Then, to set up a client side filter, I have to create a FramedResource,
attach a Frame to it, and in its registerFrame() method I have to register
a property. Finally, I can attach client side filter to this property.

Is that OK? Is this the only way how to use the client side filter?

What I didn't find out is where can I attach a default filter to a property
(like is for example CacheFilter attached to ProxyProp). 
Secondly, I've found a record 
in http-server.props file - has it something to do with the fact
CacheFilter is installed as ProxyProp's filter? Would I have to register
any client side filter this way, or is it going to be done automatically?

>As the cache is a client thing, everything is done in a client side
>The processing of a client side filter is the following:
>1/ incoming filters
>2/ request processing
>3/ if the request fails (exception due to a network pb)
>   -> exception filters
>4/ outgoing filters
>The cache use step 1 and 4,
>at step 1 the cache tries to get the version from the cache
>If the resource is not found, the request is processed.
>And at step 4, the reply is cached according to the indication given by
>the target server (If none, the default caching time is 1 day) 
>If it is found in the cache, it serves the resource if it is fresh enough,
>otherwise it tries to revalidate it.
>In case of a revalidation the caching informations are updated.

Thanks, you gave me good explanation of how client side filter works.

For now, I am a bit confused of canUseCache() method of CacheFilter - the
condition in 

	if ((nocache != null) && (nocache.length == 0)) 
	    return false;

IMHO should be 

	if ((nocache != null) && (nocache.length > 0)) 
	    return false;

- am I wrong, or is it a bug?

>For more details, you can read the "caching" section of the HTTP/1.1 spec
>see http://www.w3.org/Protocols

My questions was about implementation of caching in Jigsaw. I've of course
studied caching by HTTP/1.1 spec and several other works concerning caching
in HTTP. My purpose is to develop an universal customizable cache filter
that will help to find out the effectiveness of various caching methods.

R. Dusek

>      /\          - Yves Lafon - World Wide Web Consortium - 
>  /\ /  \                Architecture Domain - Jigsaw
> /  \    \/\    
>/    \   /  \   http://www.w3.org/People/Lafon - ylafon@w3.org    
Received on Tuesday, 12 May 1998 06:57:43 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:25:32 UTC