On Wed, Jan 16, 2013 at 6:16 PM, Justin Deoliveira <[email protected]>wrote:
> Hey Andrea,
>
> Agreed that storing all resources in a database or off the file system is
> a larger issue. For now my goal is just to focus on the catalog since it is
> typically the part of the configuration that changes most frequently, or is
> updated in an automated way.
>
> That said, I have been using this problem to think about the larger goal
> of storing all resources in a database and making it so GeoServer can run
> without a file system. Here are some of my random thoughts.
>
> The idea would be to use GeoServerResourceLoader as the base which I think
> makes sense since much of GeoServer uses this class for data directory /
> file system access. But obviously it works with java.io.File which is a
> problem. So the first step would be to make the api be stream based. There
> would be a lot of code around the edges that would port to the stream based
> methods but it could be done in a gradual way.
>
> In terms of loading resources you could look at the current
> GeoServerResourceLoader api as a key value store where the keys are just
> file paths. Once the values are streams it should be possible to swap out
> the file based approach for one that stores blobs in a database . The key
> can remain the same:
>
> stream = rl.findResource("workspaces/topp/states/description.ftl")
>
> Whether that is a file in the data directory, or a row in a database
> becomes an implementation detail. Or at least that would be the idea.
>
Right, that's what I was thinking as well.
>
> Now gwc... well i don't have any bright ideas about that :) I guess the
> bits that live in the GeoServer extension could potentially be ported over
> to the new resource loader... but the upstream bits... not sure.
>
Eh, some parts of GWC will have to be refactored, several objects over
there read directly from disk as they get initialized,
GWC also needs some notion of a facade to access the configuration bits, so
that they also can be stored in places
other than a file system
Cheers
Andrea
--
==
Our support, Your Success! Visit http://opensdi.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
-------------------------------------------------------
------------------------------------------------------------------------------
Master Java SE, Java EE, Eclipse, Spring, Hibernate, JavaScript, jQuery
and much more. Keep your Java skills current with LearnJavaNow -
200+ hours of step-by-step video tutorials by Java experts.
SALE $49.99 this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122612
_______________________________________________
Geoserver-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-devel