hi Andrea,

comments in-line.

On Fri, 8 Apr 2016 09:47:53 +0200, Andrea Aime wrote:

> Hi Raif,
> thorny question. In an ideal world we could:
> 1) Go down in GeoTools and replace gt-jdbc-h2 with h2gis
> 2) Provide an upgrade path for those using jt-jdbc-h2 to h2gis
> 3) Find a way to upgrade the GWC disk quota database with the newer H2
> 4) Find a way to upgrade the KML superoverlay database with newer H2
> 5) Same as 2-3 for any other H2 usage I don't remember now
> 
> In the reality, 1) is not possible because H2Gis decided on a license
> that's incompatible with GeoTools (only compatible with GeoServer).
> 1) would thus be real problem because gt-jdbc-h2 is the only store
> that actually runs tests by default in the build, if we remove it,
> we'd have no test coverage left for those modules (by default at
> least). So... I believe we'd have to try and upgrade gt-jdbc-h2 to v
> 2.x, not sure how hard it would be.

i take it you meant version 1.2 or later referring to H2.

over the weekend i downloaded the sources for Justin's geodb [5]
(tagged version 0.8) and GT 14.3.  i was able to build locally a geodb
0.9-SNAPSHOT using the latest stable H2 (1.3.176) and hatbox [6]
(1.0.b9) (the library used by geodb for spatial indexing) w/o problems.

i then used this version to build gt-jdbc-h2.  i was able to do that w/
few modifications to the SQL used in 3 H2xxxTestSetup classes [7].

w/ this all 325 tests pass.  this to me means it's possible w/ little
effort.


> 2) is hard to justify because I believe not very many people use
> gt-jdbc-h2 as the storage, but all of our database integration tests
> in GeoServer and some in geotools do, so ... uff... we'd have to do
> some work here anyways  (basicaly back to 1), assuming it's ok to
> drop the axe on actual gt-jdbc-h2 production
> users, hopefully there are few/none)

i think gt-jdbc-h2 should stay as is relying on geodb.  in addition to
what you've already mentioned it is an example implementation for adding
spatial capability to Derby/JavaDB if needed using hatbox --a Google
Summer of Code project may be?

 
> 3/4/5 is annoying because H2 seems to have provided no upgrade path
> from 1.x to 2.x...

i take it you don't consider H2's 'Database Upgrade Helper' tool
appropriate.  w/ this tool upgrading existent databases sounds analog
to upgrading PostgreSQL + PostGIS tables: the upgrade is done
separately from GS.

>... for disk quota and superoverlay I guess we could
> just change the location/name of files, drop the old ones, and
> have the system rebuild the database from scratch (might take
> hours the first startup, especially if one has a large tile cache on
> disk with disk quota enabled, the system would have to crawl each and
> every tile).

all valid issues for the developers to consider.  for me as a GS user
having the standard distribution contain the latest stable H2 is a step
forward.


> All in all it's not impossible but looks like a fair amount of work
> with some upgrade hiccups for the user base.
> 
> Going back to your other question, do I know of production usage of
> h2gis with GeoServer? Not personally, sorry :-)
> 
> On Fri, Apr 8, 2016 at 4:37 AM, Raif S. Naffah <r...@forge.com.au>
> wrote:
> 
> > hi all,
> >
> > i recently upgraded from GS 2.2.5 to 2.8.3 (w/ JDK 8) and everything
> > works fine.  now i'd like to start using 'h2gis' [1] and its GS
> > data-store [2].
> >
> > the (potential) problem i'm facing is the version of the 'H2'.  in
> > the standard GS 2.8.3 release the H2 JAR is at 1.1.119 and is
> > present in the webapp's lib.  'h2gis' uses a newer version of H2
> > (1.4.189) which has an incompatible (disk format) w/ the one used
> > in 1.1.  H2 also provides a utility to 'upgrade database from
> > 1.1...' [3].
> >
> > this thread [4] (which i believe is still relevant) suggests that
> > H2 is only used in specific use-cases...
> >
> > QUOTE
> > ...once a data directory
> > is converted to use it (either because of superoverlays or gwc
> > metastore) you cannot go back.
> > UNQUOTE
> >
> > in my case, after upgrading to GS 2.8.3 (re-using a copy of the
> > data-dir previously used by GS 2.2.5, which in turn was a copy of
> > the same data-dir used by GS 1.5.4) i tried:
> >
> > * removing the h2-1.1.119 JAR, and separately
> > * replacing it w/ a newer version (1.4.191)
> >
> > everything continues to work fine in both instances.  this,
> > empirically at least, tells me that my data-dir is not using any
> > 'feature' that would otherwise cause an H2 database to be generated.
> >
> > my questions are --and thanks for reading so far :-)
> >
> > * is there a reliable check to apply _before_ upgrading to ensure a
> >   data-dir will continue to be operational after the upgrade?
> >
> >   i guess if an H2 database when created/used is always in a
> > specific location w/in the data-dir then checking for the presence
> > of such file system object should be enough.  is this the case?
> >
> > * has any body attempted migrating to a newer version of H2, had to
> > use the (H2) upgrade utility to 'fix' a GS data-dir, and would like
> > to share their experience?
> >
> >
> > [1] http://www.h2gis.org/
> > [2] https://github.com/orbisgis/h2gis-gs
> > [3] http://h2database.com/html/download.html
> > [4]
> >
> > https://sourceforge.net/p/geoserver/mailman/geoserver-devel/thread/4C2070F7.4000507%40opengeo.org/#msg25582876


[5] https://github.com/jdeolive/geodb
[6] http://hatbox.sourceforge.net/
[7] replace GEOMETRY in the 'CREATE TABLE ...' w/ either BLOB or a
concrete geometry class; i.e. POINT and POLYGON.

-- 
cheers;
rsn

Attachment: pgpdS6mqgSjoH.pgp
Description: OpenPGP digital signature

------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial! http://pubads.g.doubleclick.net/
gampad/clk?id=1444514301&iu=/ca-pub-7940484522588532
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to