>>>   Gabriel is about
>>> to commit a Least Recently Used cache to GWC, which will allow an admin
>>> to set a total max for the cache.
> Right now the diskquota is an opt-in process meaning there's no global
> cache size cap, but you need to set the limit on a layer by layer basis.
> I think it would be easy to add a global limit so any non explicitly
> configured layer gets evenly capped to cope up with the global limit.
> How does that sound?
>

That's an ok measure, if the truly global limit is hard.  But I think 
it's a lot more likely that we'll have a few layers that get a ton of 
access, and a number that just get viewed a couple times.  It'd be much 
better if the few that get accessed a ton have bigger caches at the 
expense of those that get rarely accessed.

But if that's hard then go ahead and build it the easy way, and we can 
see the actual nature of use.

>     So we could let people add any layer,
>>> but the admin of GeoNode can configure it to just cache the most used
>>> tiles, up to a limit they set, be it 100 megs or 2 terabytes.  For this
>>> first step the caches may just get invalid, but the admin would have the
>>> ability to truncate them in the GWC admin.
>>>
>> LRU worries me a bit; if we set the disk limit too low we may just end
>> up with a lot of cache churn for little/no performance benefit.

I think we should just default it to be quite high.  And recommend 
people turn it off if they really don't have much disk space.  I just 
think we should put some limit (50 gigs?) so everyone running geonodes 
doesn't always run out of space.  I can see an argument that we should 
just wait till that happens, but I'm pretty sure if we start caching 
every remote and local layer we'll get there pretty fast.

> In my mind, GeoWebcache is "incomplete" as a product until we add the
> following enhancements:
>    - configuration option to cache layers only up to a certain zoom
> level, and from that level on, defer to pure proxy mode
>    - diskquota, which is kind of in beta testing now
>    - Identify and avoid seeding empty tiles. This can be easily done with
> the JAI Extrema operation (or even Histogram) or the user might
> configure a no-data color for the layer?
>    - Definition of an area of interest, so that a geometry defines the
> allowed seeding area for a layer
>

I agree on all this, though we should definitely integrate before we're 
complete.  Indeed for fully complete I'd add gui configuration, ideally 
through the GeoNode.


>>> * Cache local layers, coordinating with Style changes.  I think Arne may
>>> have coded this up, at least for the embedded GWC.
> Yes. The problem with the embedded GWC is that is completely wipes out
> the entire layer cache upon _any_ modification, including WFS
> transactions, resulting too heavily truncated caches. You
> add/remote/edit a single feature, the whole layer cache is discarded.
> There's room to improve that based on bounding box/bounding polygon with
> some stuff created for the GeoRSS module though.

+1.  We're not doing any GeoNode editing now though, so it's fairly moot.

>     We could perhaps
>>> start with just doing the cache on the embedded maps, since those won't
>>> have people switching to 'style mode'.  Maybe that intermediary step
>>> isn't necessary, but when we're in the map composer view we want to be
>>> sure that when people are styling they're not seeing GWC tiles.
> Related: I've been wondering since some time now if it wouldn't make
> sense to also integrate the WMS service endpoints for WMS and GWC, like
> in GWC being a front barrier for /geosever/wms instead of having to
> explicitly go through /geoserver/gwc?service=WMS...
>

At some point yes.  Ideally for me a WMS request to GS would 
transparently check if it was a tile that GWC is configured to 
understand, cache it if it's not there, retrieve it if it is.

> Back to topic: couldn't the styles just use a CGI flag to indicate when
> to ignore the cache and go straight to the WMS? AFAIK tiled=false would
> make the trick.
>

Yeah, I was thinking something along those lines.

>     When
>>> they finish styling we should then truncate the existing cache and start
>>> over.  Another simplifying assumption we could also consider making is
>>> only cache on the default style.  Not sure how much that actually helps.
>>>
>> I don't think we need to avoid caching alternative styles.
> I think right now GWC only seeds on the default style, and lazily caches
> non default styles. Are we talking about preseeding here or just lazy
> cacheing?
>

Lazy caching - all lazy caching, even for default style.

>>
>> I do think we need to skip the cache while editing styles.
>>
>> It would be nice if we could use cached layers everywhere, and have only
>> the layer being styled switch to "straight" WMS when styling is active.
>>> * Remote layer management.  This is sort of more general, I think in the
>>> future we should figure out some more full representation in each
>>> GeoNode of a remote layer.  Right now remote layers can be added, but no
>>> metadata can be found out about it.  This is another whole topic, but
>>> the implication for here is that such a page should/could have a way to
>>> manage the cache of the local GeoNode.  So you could truncate the cache
>>> there (maybe just the person who added?  Maybe you can set permissions
>>> of who can truncate?).  And then possibly also add a GeoRSS location to
>>> automatically truncate from.
>>>
>> Yeah, it would be awesome if adding a WMS to the composer application
>> got that service added to the GeoNode's GeoNetwork index, complete with
>> metadata pages in the Django web app.  And GeoNode can periodically scan
>> the capabilities for added/removed layers, updated descriptions, new
>> styles.  These would be reflected in GeoNetwork and GeoWebCache as well
>> as the Django database.
>>

+1  Ideally it would also follow the WMS's links to metadata documents 
if they are there, and use that to populate.  But that's a pretty minor 
use case I think, at least to start.

>> It might be nice to also provide a listing of indexed services so users
>> can track down the originating WMS services if they want.
>>> The cool thing this set of things should lead to is to give a benefit to
>>> people adding remote servers.  They get increased speed and reliability
>>> if they just add it to a map on a geoNode.  So we can come in with a
>>> GeoNode to an existing nice SDI implementation that already has a bunch
>>> of WMS services, and then people can start creating maps on top of it,
>>> and those maps perform even faster than the straight WMS.
>>>
>>> Thoughts?  I think this could be a nice performance win, as most all our
>>> maps are tiled.  Should obviously be complemented by other
>>> optimizations, like on the javascript side, but the two together should
>>> make things quite zippy.
>>>
>> Having the WMS capabilities handled on the server side (and cached
>> there) would probably be a nice win for loading services.  We could do
>> away with reading capabilities entirely until the user pulls up the add
>> layers dialog (which is not available in the embedded viewers).
>>

Makes sense.

C

Reply via email to