Greetings, restletfarians, 

I am building a collection of web services that can be viewed as working
together to create a hierarchy of abstractions (err, resources) over a large set
of "atomic" raw data. Thus, the lowest level service provides a bunch of
resources (atomic data) to a higher level service, which builds resources
(abstractions of that raw data) for the next higher service, which builds its
own resources (higher level abstractions) and so forth.

Since the "raw" data is quite fine-grained, it is quite important that the
higher level abstraction services be able to cache the data obtained from lower
level services. (Each of the raw data instances is a "resource" with its own
URI, and a single intermediate abstraction will often require processing several
thousand lower level resource instances.) Making life interesting is the fact
that new raw data is arriving all the time which must percolate up the 
hierarchy.

I think I pretty much understand how to deal with the "server" side of the cache
problem. I can implement, for example, conditional GET in my server to avoid
regenerating and resending the resource to the client, or (even better in my
case) cache-control so that the server can indicate to the client that the
provided resource representation will not change for a given period of time and
to just reuse this one without making an HTTP request to the server. 

What I don't understand is how a Restlet client is supposed to physically cache
the responses returned from a server.  

It would appear to me that shrinkwrapped support for this could be provided
within the Restlet Framework. For example, if the cache-control indicates that
the response from a GET request won't expire for an hour, one would think that
that the Restlet Client class, after flipping a few switches and specifying a
directory, could handle caching in a manner completely transparent to the
application.  

My sense is that this is on the ToDo list for Restlet. So, my questions are:

(1) Does my analysis above make sense? 

(2) What is the likelihood that shrinkwrapped support for client-side caching
will be available in Restlet in the near future? 

(3) Since I need this pretty soon, what advice do people have about the best way
to hand-roll my own client-side caching? Are there open source packages that can
simplify the implementation?  Any issues I should be aware of? 

Thanks very much for your help!

Cheers,
Philip


Reply via email to