Yeah, I wouldn't worry too much about this requirement, I've been thinking about it a bit and I think we could do some decent stuff at the datastore level. Like a caching datastore could just take two other datstores - the source (likely a wfs or some other remote one) and the local.

The goal of caching WFS would be to be able to make use of different strategies that are particular to a WFS. Things like the geosynchronization work, which is looking like it'd be a georss feed notifying on what has changed, or leveraging http cache control headers (though this won't so much work with wfs, needs an atom type thing). Or client controlled caching, like expire after a certain amount of time, or when the user asks for a reload. But yeah, I think we should be able to design something later that covers several use cases, and could work with different datastores that might have different ways of notifying about cache expirations. We can later gather some use cases and make an informed design.

Chris

Gabriel Roldán wrote:
Hi,

so one requirement for this DataStore is to be "caching friendly".
Yet, though doing some caching strategy specific for it, I've always thought of a "cached" datastore as a cross-cutting concern, and both Andrea's original thoughts [1] as well as Christophe Rousson's summer of code work [2] seem to share that conception.

So I guess I'm not going to do anything in particular to support caching. I think as long as a DataStore properly implements feature events would be a good candidate to be wrapped by caching one. It also makes sense for the client application to decide which of them deserve to be cached and which not.

Another possibility would be to supply the DataStoreFactory some sort of implementation hint to, for example, signal the datastore to plug into a SPI discoverable cache. But, I'm not sure this is a good usage of hints.

thoughts?

Gabriel

[1] <http://docs.codehaus.org/display/GEOTOOLS/Datastore+caching>
[2] <http://docs.codehaus.org/display/GEOTOOLS/SoC+2007+Caching+data>

On Thursday 10 January 2008 06:15:39 pm Jody Garnett wrote:
Gabriel Roldán wrote:
If this seems ok, it'd imply moving some stuff around on the wfs plugin,
mostly some package refactoring to isolate version specific code from
general one. In my opinion it shouldn't be a problem as its the DataStore
nature not to be API, and the only public class should be the datastore
factory.
This is the same approach we took for OWS-3 you can find an example of
how to subclass WFS1.0 datastore
and override just enough methods for GML3 parsing.

The code is still available in svn here:
- http://svn.geotools.org/udig/branches/ows3/gt/owswfs/

While you are there see if you can make a public method for
getCapabilities() it is one of the main reasons we still
subclass WFSDataStore in uDig :-)

This may be obvious but the approach to take is make a strictly 1.0
datastore and a 1.1 specific datastore and let the
WFSDataStoreFactory do the version negotiation in order to choose the
correct version. You will find ShapefileDataStoreFactory
takes the same approach when choosing between ShapefileDataStore and
IndexedShapefileDataStore.

Cheers,
Jody





-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
Geotools-devel mailing list
Geotools-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-devel

!DSPAM:4005,47868dea225621137850744!

begin:vcard
fn:Chris Holmes
n:Holmes;Chris
org:The Open Planning Project
adr:;;349 W. 12th Street, #3;New York;NY;10014;USA
email;internet:[EMAIL PROTECTED]
title:Managing Director, Strategic Development
x-mozilla-html:FALSE
url:http://topp.openplans.org
version:2.1
end:vcard

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
Geotools-devel mailing list
Geotools-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to