-
Notifications
You must be signed in to change notification settings - Fork 1
VAHub Back End Overview
Below is the list of main libraries and technologies used in the project.
You may explore their manuals beforehand to better understand project source code.
VAHub is a Spring Java application. It's built with Maven and should be normally run using the spring-boot-maven-plugin
. It works with PostgreSQL database and uses MyBatis as an ORM tool. Frontend part is based on Angular and written in Typescript (see frontend part description). To improve performance VAHub widely uses backend caching of data.
VAHub main goal is to provide data presentation to the user, not to modify them somehow, so it performs mostly data querying and only a little of data modification (personal user settings, filters etc).
Project contains several Maven modules:
-
vahub
— is in charge of relations between frontend and backend and contains all REST-based resources providing access to the backend data. It stores the frontend code itself too. Also, this module contains the whole application entry point (com.acuity.visualisations.rest.config.ApplicationWeb
class). -
vahub-model
— contains the most part of application logic: data querying from the DB, data preparation for presentation and data providing to thevahub
module. -
vahub-cohorteditor-model
— contains the backend logic of Cohort Editor, a specific part of VAHub functionality that allows user to compose custom investigation subject combinations -
vahub-config
— contains configuration files and classes and some caching logic -
vahub-common
— contains common logic used by all other modules
Architecturally, the application has several layers of logic. They are implemented for most business logic entities (for some, though, the list is different). They are:
-
Repositories (the lowest level) - this layer provides access to the database data. Typically, a repository is a Java interface annotated with
@Repository
Spring annotation that extendsRawDataRepository
interface and overrides its methodgetRawData
, annotating it with MyBatis annotations@Select
and@Results
. The only repository method usually returns Java objects of data directly mapped to a corresponding database table, "as is", without any custom logic, enrichment etc. This data type is named "raw" below. Repositories are stored invahub-model
module. -
Data providers - this layer receives raw data from the repository layer and wraps the raw data object into a more complex one that has some additional properties, either calculated from basic ones or provided by some enrichment operations (the main such operation for ordinary domain data object is normally the addition of investigation subject data). These wrapper classes usually extend the
SubjectAwareWrapper
class. This data type is named "enriched" below. Data provider class typically extends theDatasetsDataProvider
abstract class and is an ordinary Spring@Component
. Data providers are stored invahub-model
module. -
Services - this layer uses enriched data from data providers to prepare it for UI. Main groups of services are plot services and filter services. Filter services calculate filter values basing on enriched data from data providers. Plot services filter data accordingly with received filters settings, prepare data for visual presentation on different plot types etc. Also, plot services normally provide details-on-demand (DoD) data — it's the transformed enriched data from data providers that may be requested by user to get additional information about the data drawn on the plot itself. There is also some more special services, e. g., for most domain entities a Timeline service exists. Typical service is an ordinary Spring
@Service
. Services are stored invahub-model
module. -
Resources (the highest level) - this layer provides REST resources to which frontend part may send data requests; then a resource returns the data provided by corresponding service. Return types of REST resource methods are (or should be, at least) included (directly, or through wildcards, or through transitive dependencies) in Typescript classes generation list (in settings of
typescript-generator-maven-plugin
inside some ofpom.xml
configs) — it allows to use them also on the frontend. For a domain entity, there are typically either several Resource classes separated by task type or one big Resource class that contains all REST resouces related to it. Typical resource class is an ordinary Spring@RestController
. Resources are stored invahub
module.
VAHub widely uses caching. As users can't change anyway the most part of data, it's quite handy to cache the precalculated data and avoid their recalculation when they are requested again.
- System Requirements
- Azure Setup
- Machine Insights and CBioPortal Integration
- SSL Certificates
- Applications Setup
- Application Spring Configs
- Profiles
- Migrating to ACUITY 9
- Github packages and Docker images
- Result data tables
- Mapping data tables
- Third party solution tables
- Other data tables
- Tables to delete