It looks like we are now using StyledMapRenderer in JAIMapResponse?
My understanding was that we should be using LiteRenderer, because it
has a faster load for the first response, and thus is better in a
stateless environment. Is that true, or was there a reason to change
to StyledMapRenderer (I admit close to complete ignorance on this front
(which is why I never updated those classes, sorry David. Though it
was probably a good thing Andrea deleted, so we did actually stop using
them, I'm just sorry it fell on you)). I'd change it right now, but
I'm not super positive. Andrea? GeoServer should be using
LiteRenderer?
Actually, looking at JAIMapResponse, I have a few more questions Andrea.
It looks like we are still using FeatureCollections in GeoServer, we
get FeatureResults, but then call results.collection. It looks like
DefaultMapLayer then just turns this back into a FeatureSource? And we
can pass a FeatureSource directly to DefaultMapLayer, and liteRenderer
then calls getFeatureSource().getFeatureResults(), and it looks like it
actually streams from there.
But in GeoServer we do not want to pass a FeatureSource in, since our
FeatureResults are the result of a Query, and thus we just want those
rendered. Was there a reason FeatureResults were not used in the
DefaultMapContext stuff? It would seem to make more sense to me, as
all that is done with the FeatureSource in the lite renderer is that it
just gets everything from the FeatureSource. Or does the other
renderer actually query the FeatureSource?
In short, what I'm asking is, what is the best way to get GeoServer to
use the jai rendering stuff and to actually stream, not load from
memory? Because right now we are loading from memory. And we want to
do the query beforehand, so passing in the whole FeatureSource does not
make sense, we only want the results of our query rendered. One hacky
way out would be to somehow wrap our FeatureResults in a FeatureSource,
but that seems silly. With refactoring we could probably pass the
DefaultMap stuff a FeatureSource and a Query, but it seems to me to
make more sense to change DefaultMapLayer to take a FeatureResult.
Though yes, I admit close to near ignorance on this front, so any help
would be appreciated.
And while we're at it, is there a way to _stop_ the rendering? In
GeoServer we have this nice abort() method, and perhaps the most useful
thing that it does is that it is called when GeoServer detects that a
client has closed a connection. So it stops using the resources that
are being used to make the response. This is super nice if a client
requests a really large map but gets impatient with how long it takes
to render. Abort will get called, and for the SVGEncoder we stop
writing the response. Is there anything like that in the geotools
renderers? Where we can stop the loading of features? (looking right
now we still need to implement this on the wfs side of things, I'm just
asking for the future, no rush).
thanks,
Chris
----------------------------------------------------------
This mail sent through IMP: https://webmail.limegroup.com/