On Thu, May 23, 2013 at 5:48 AM, Ben Caradoc-Davies <
ben.caradoc-dav...@csiro.au> wrote:

> Mauro,
>
> your improvements to SchemaCache have also introduced an unanticipated
> problem triggered by download failure:
> https://jira.codehaus.org/browse/GEOT-4467
>
> You set a 10 second timeout on connections and reads. It turns out that
> some application schemas, including that used in the GeoServer
> app-schema tutorial, import this W3 schema, which often takes more than
> 10 seconds to connect:
> http://www.w3.org/2001/xml.xsd


Ah, this one is a nightmare, it's always super-slow to download (I guess
because
anything XML ends up linking it).
Imho, we should have a copy of it baked directly into code to avoid
downloading it
over and over.


> (1) Why do you set a timeout at all? Just a best practice to avoid an
> application hang? (Good idea!) If so, the obvious workaround is to
> increase the timeout (60 seconds?) to accommodate slow servers. Would
> this be a satisfactory solution?
>

I'd say, make it configurable. 10 seconds to start responding in 2013 is
not slow,
it's a geologic era...


>
> (2) Please look at the logic in SchemaCache.startDownload(). Why is it
> necessary to create an empty file? How should SchemaCache recover when a
> download fails? Please have a look and recommend a solution. I know you
> gave this some thought and I do not want to introduce a deadlock or
> thread blocking that might impact your performance.
>

Fully agree this is a problem


>
> The original AppSchemaCache had no timeout and did not write to a file
> until it had all the bytes of the remote resource, so 9.x is not
> affected by these issues.
>

Right right, good idea to complete the write on disk only when the download
is complete to avoid half downloaded files. But keeping everything in memory
could be dangerous, maybe write a temp file and rename it to the final
destination once done

Cheers
Andrea

-- 
==
GeoServer training in Milan, 6th & 7th June 2013!  Visit
http://geoserver.geo-solutions.it for more information.
==

Ing. Andrea Aime
@geowolf
Technical Lead

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054  Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39  339 8844549

http://www.geo-solutions.it
http://twitter.com/geosolutions_it

-------------------------------------------------------
------------------------------------------------------------------------------
Try New Relic Now & We'll Send You this Cool Shirt
New Relic is the only SaaS-based application performance monitoring service 
that delivers powerful full stack analytics. Optimize and monitor your
browser, app, & servers with just a few lines of code. Try New Relic
and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_may
_______________________________________________
GeoTools-Devel mailing list
GeoTools-Devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to