Opened 4 years ago

Closed 4 weeks ago

#502 closed enhancement (fixed)

ORM in petascope with Spring Boot

Reported by: pcampalani Owned by: vmerticariu
Priority: critical Milestone: 9.5
Component: petascope Version: development
Keywords: refactoring dbmetadatasource gmlcov Cc: vmerticariu, dmisev
Complexity: Hard

Description (last modified by bphamhuu)

Updated: Petascope will change to use Spring to make the legacy code easier to maintain, especially the Data Access Layer which is dependent to Postgresql which will use Hibernate to decouple.

Class petascope.core.DbMetadataSource is very fat, getting fatter. Its .read() method especially.
On one side there is the need for a more handy interface with the database (maybe through Java persistence APIs, or some other ORM).

Additionally, there is the need for a new supporting package which abstracts the GMLCOV coverage metadata (petascope.gmlcov ?), to avoid the extensive use of Java Lists and Maps and to support the creation of petascope.CoverageMetadata objects.

A linkage with class petascope.wcps.server.core.CoverageInfo to let WCS and WCPS have a single source of metadata information should be evaluated.

Change History (7)

comment:1 Changed 4 years ago by pcampalani

Additionally, petascope.CoverageMetadata needs restructuring: hierarchy should be exploited to reflect the tree of coverage types in GML, for gridded and multipoint coverages, and in case, for different grids.

comment:2 Changed 4 years ago by abeccati

  • Version changed from 8.5 to development

Does not look a requirement for 8.5 so moving to dev, version should be changed to whatever released version we have once it gets tackled

comment:3 Changed 4 years ago by dmisev

  • Complexity changed from Hard to Easy
  • Priority changed from major to minor

I was just going to open a ticket for this. There are a few rather large classes/methods that might be good to refactor at some point into smaller pieces, most notably the DbMetadataSource. E.g. (ignore the generated wcpsParser/Lexer though)

$ find -name '*.java' | xargs wc -l | sort -n -r
  81914 total
  21431 ./petascope/wcps/grammar/
   8777 ./petascope/wcps/grammar/
   2200 ./petascope/core/
   1733 ./petascope/util/
   1276 ./petascope/wms/
   1145 ./petascope/util/
   1132 ./petascope/wms/
   1093 ./petascope/wcst/transaction/
   1020 ./petascope/wms/commander/
    886 ./petascope/core/
    864 ./petascope/wms/commander/
    797 ./petascope/wms/
    774 ./petascope/
    756 ./petascope/wms/commander/
    724 ./petascope/util/
    701 ./petascope/wms/commander/
    681 ./petascope/wms/
    674 ./petascope/wms/commander/
    649 ./petascope/wms/
    627 ./petascope/wms/commander/
    505 ./petascope/wcs2/legacy/
    501 ./petascope/wcs2/parsers/
    487 ./petascope/wcs/server/core/
    481 ./petascope/wcs2/extensions/
    481 ./petascope/wcps/server/core/
    468 ./petascope/wcst/transaction/tools/
    463 ./petascope/wms/commander/
    427 ./petascope/util/
    420 ./petascope/wcps/server/core/
    386 ./petascope/util/ras/
    384 ./petascope/wcs2/parsers/

Should be low priority in any case.

Last edited 4 years ago by dmisev (previous) (diff)

comment:4 Changed 2 years ago by dmisev

  • Cc vmerticariu mdumitru added
  • Owner changed from pcampalani to dmisev
  • Priority changed from minor to major
  • Status changed from new to assigned
  • Summary changed from DbMetadataSource and Coverageclass needs refactoring to ORM in petascope

comment:5 Changed 7 months ago by bphamhuu

  • Cc dmisev added; mdumitru removed
  • Complexity changed from Easy to Hard
  • Description modified (diff)
  • Milestone changed from Future to 9.4
  • Owner changed from dmisev to vmerticariu
  • Priority changed from major to critical
  • Summary changed from ORM in petascope to ORM in petascope with Spring Boot

comment:6 Changed 5 months ago by dmisev

  • Milestone changed from 9.4 to 9.5

comment:7 Changed 4 weeks ago by dmisev

  • Resolution set to fixed
  • Status changed from assigned to closed
Note: See TracTickets for help on using tickets.