W3C home > Mailing lists > Public > www-jigsaw@w3.org > November to December 1996

Re: Database as proxy cache

From: Mark Friedman <mark@intraspect.com>
Date: Fri, 1 Nov 1996 17:17:33 -0800 ()
To: Anselm Baird-Smith <abaird@w3.org>
cc: www-jigsaw@w3.org
Message-ID: <SIMEON.9611011733.B@cumulus.intraspect.com>
Forgive me if you already received this. I haven;t received it yet from the 
mailing list and the archive seems to be a couple of weeks behind, so I 
can't see if it went through the first time.

On Thu, 31 Oct 1996 10:13:01 +0100 (MET) Anselm Baird_Smith 
<abaird@www43.inria.fr> wrote:

> Mark Friedman writes:
>  > I wonder if I could get some specific details on how I could extend (or 
>  > change) Jigsaw to enable the proxy cache pages to be cached in a database?
> I am not sure where you want to use a database ? Is it (a) for cached
> entries, or (b) for pages content.

For starters, I'm unsure what exactly is in the cached entries. Is it the 
basically just the metadata? What is the relationship between what is in 
CacheFilter and CachedResource? 

In any case I probably want to save (a) and (b) in my database.

> If (a) the best way is to write a resource store implementation that
> uses jdbc to connect to a database (check the
> w3c.jigsaw.resources.ResourceStore interface).

Well, I'll be using an OODB but I know about that part of things. Is there 
anything I should know about how to implement a ResourceStore that isn't 
mentioned in ResourceStore.java? For example, do I need to do anything with 
the ResourceStoreManager and File that's passed into the initialize() method?

> If (b), its even easier: each cached entries has a filename attribute
> giving the file where the content for that entry is stored.

Are you referring to the ATTR_FILE in CachedResource?

> You need
> to change that to some ref into your database of the content, and then
> change slightly the CachedResource class to fetch the content from the
> db instead of a file.

Could I get some more specific guidance here? Do I need to define a new 
attribute type and create get and put methods for it? is there anything else 
I need to do? It looks like if I created streams for accessing and modifying 
the database then I could reuse a lot of the existing CachedResource code. 
Am I on the right track, or did you have something better in mind? 

Also, I'm confused by the the use of both the relationship of CachedResource 
and the jdbmResourceStore. Could someone explain this a little?

> Does this helps ?

It does, but I might need a little more handholding because I'm not sure of 
the relationship of the various cache pieces and how they fit into the 
general Jigsaw framework.

Received on Friday, 1 November 1996 20:16:37 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:41:21 UTC