wiki:Petascope_9.5

Version 13 (modified by dmisev, 3 months ago) (diff)

--

Petacope 9.5

There are two major changes:

  • internally it uses the Spring Boot Framework with Hibernate as object relational mapping data model
  • implements support for the Coverage Schema Implementation (CIS version 1.1) for GridCoverage, RectifiedGridCoverage and ReferenceableGridCoverage.

This brings the following advantages:

  • Petascope can be deployed on more backend DBMS beside PostgreSQL like MySQL, Oracle, DB2, HSQLDB, H2, etc. Postgresql is still the most stable database for deploying Petascope, but the user can easily switch to other databases by changing the configuration in petascope.properties (see list of tested databases).
    • With the data migration tool Liquibase, existing petascopedb can be migrated to the new schema in database petascopedb_cis
  • The Spring Boot Framework provides many utilities that aid in quicker development of petascope.
  • Petascope can now start as an embedded web application with an internal embedded Tomcat (i.e: no need to deploy to external Tomcat).

Changes in petascope.properties

The only change is triggered by the support for new JDBC database connections (see list of tested databases). The options following the spring.* convention are used directly by the Spring framework. For example, to use postgresql as a backend database for petascope, the following (default) configuration is specified:

spring.datasource.url=jdbc:postgresql://localhost:5432/petascopedb_cis
spring.datasource.username=petauser
spring.datasource.password=petapasswd
spring.jpa.database-platform=org.hibernate.dialect.PostgreSQLDialect

The existing database configuration is kept without any change (note that it is only used during migration, as the source of existing petascopedb or, later on, petascopedb_cis):

metadata_url=jdbc:postgresql://localhost:5432/petascopedb
metadata_user=petauser
metadata_pass=petapasswd

If you have been using the embedded Jetty setup of petascope: the jetty_port option is now renamed to server.port.

old: jetty_port=8080
new: server.port=8080

How to migrate

The database schema in petascope 9.5 has changed, so existing rasdaman installation would need to migrate by executing a migration script update_petascopedb.sh.

This will create a new database petascopedb_cis, and will not modify the existing petascopedb.

Developer's guide on update_petascopedb.sh

List of tested databases

Note that only a single datasource can be specified in petascope.properties; more than one is not supported.

# Postgresql (default)
spring.datasource.url=jdbc:postgresql://localhost:5432/petascopedb_cis
spring.datasource.username=petauser
spring.datasource.password=petapasswd
spring.jpa.database-platform=org.hibernate.dialect.PostgreSQLDialect

# Mysql
spring.datasource.url=jdbc:mysql://localhost:3306/petascopedb_cis?createDatabaseIfNotExist=true
spring.datasource.username=root
spring.datasource.password=abc!123!ABC!123
spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.MySQLDialect

# HSQLDB
spring.datasource.url=jdbc:hsqldb:file://home/rasdaman/petascopedb_cis.db
spring.datasource.username=sa
spring.datasource.password=

# H2
spring.datasource.url=jdbc:h2:file://home/rasdaman/petascopedb_cis.db;DB_CLOSE_ON_EXIT=FALSE;DB_CLOSE_DELAY=-1
spring.datasource.username=sa
spring.datasource.password=
spring.h2.console.enabled=true

3rd party libraries

Petascope 9.5 uses various 3rd party libraries, documented on the overall rasdaman code provenance page.

TODO

  • Support dynamic loading of JDBC drivers by specifying the path to the jar file in petascope.properties