Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
44d4737
Scaffold Quarkus backend, Maven wrapper, and Nix dev shell~
thoniTUB Mar 23, 2026
ae0b68a
adds frontend config api
thoniTUB Mar 23, 2026
3e88c46
adds me resource
thoniTUB Mar 23, 2026
d7b3b56
adds dataset endpoint
thoniTUB Mar 23, 2026
9a09a7a
adds entity-preview endpoint
thoniTUB Mar 24, 2026
df3d002
adds concepts endpoint
thoniTUB Mar 24, 2026
14c6e6f
adds form-config endpoint
thoniTUB Mar 24, 2026
3211dd6
adds queries endpoint
thoniTUB Mar 24, 2026
82c5e75
adds endpoint for stored query
thoniTUB Mar 24, 2026
a5f3443
adds post query endpoint
thoniTUB Mar 24, 2026
94a0117
adds query cancel endpoint
thoniTUB Mar 24, 2026
aa1cc6b
adds concept endpoint
thoniTUB Mar 24, 2026
9feeb77
adds discriminators for polymorph query nodes
thoniTUB Apr 7, 2026
0f45684
adds query service
thoniTUB Apr 7, 2026
4d0048b
wire query lifecycle and concept API
thoniTUB Apr 7, 2026
0f606bf
adds concept id resolve
thoniTUB Apr 7, 2026
b069464
adds filter service
thoniTUB Apr 7, 2026
eea2440
smaller openapi fixes
thoniTUB Apr 7, 2026
1f0a048
adds patching of query metadata and deleting
thoniTUB Apr 8, 2026
b746ec9
refactor type discrimination on query submission payload
thoniTUB Apr 8, 2026
ae00d44
adds endpoint for entity upload
thoniTUB Apr 8, 2026
1de6b0f
adds entity enpoints and placeholder logic
thoniTUB Apr 8, 2026
61bbdc3
adds discriminator for filtervalue
thoniTUB Apr 8, 2026
955728e
adds form-config endpoints
thoniTUB Apr 8, 2026
1c2f8dc
adds base for storage abstraction
thoniTUB Apr 9, 2026
e02fef9
adds lombok
thoniTUB Apr 9, 2026
6785bce
adds meta storage facade
thoniTUB Apr 9, 2026
87d3fd2
adds facades for xodus
thoniTUB Apr 17, 2026
6b8982a
adds xodus implementation
thoniTUB Apr 23, 2026
adce5d7
static meta data from folder
thoniTUB Jun 16, 2026
39e749b
work on three stage objects models json/domain/ui for concepts
thoniTUB Jul 6, 2026
0c79642
fix concepts show all tables as connectors
thoniTUB Jul 7, 2026
e551ceb
introduce id system that looks like the old one
thoniTUB Jul 7, 2026
d7c9f29
add concept filter models
thoniTUB Jul 8, 2026
ccfa065
add converter to normalize column and table references in old concepts
thoniTUB Jul 28, 2026
b7e99fa
adds revamped CPSType resolving
thoniTUB Jul 31, 2026
f05fe14
integrate select definitions
thoniTUB Jul 31, 2026
b4c6a34
adds support for structure nodes
thoniTUB Aug 3, 2026
1605b0f
adds validity dates
thoniTUB Aug 3, 2026
f0ed7dd
adds polymorphism for concept conditions
thoniTUB Aug 3, 2026
d12dc31
adds concept selects
thoniTUB Aug 3, 2026
ccb468d
polymorph filtervalues
thoniTUB Aug 3, 2026
01115bc
fix openapi spec for classes annotated with JsonCreator
thoniTUB Aug 3, 2026
ee8d10c
Move polymorphic type definition to definition class
thoniTUB Aug 10, 2026
999fec5
bring back frontend's .env.example
thoniTUB Aug 10, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -77,3 +77,5 @@ tutorial/mimic_iii_demo/data/**
/node_modules
cypress/screenshots/
cypress/videos/

.codex
3 changes: 3 additions & 0 deletions .mvn/wrapper/maven-wrapper.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
distributionType=bin
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.11/apache-maven-3.9.11-bin.zip
wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.3.4/maven-wrapper-3.3.4.jar
27 changes: 27 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,33 @@ configurations, such as:

## Development

### Backend Development

#### Dropwizard backend (current production backend)

From the repository root:

```bash
./mvnw -pl backend -am test
./mvnw -pl executable -am package
java -jar executable/target/conquery.jar standalone <path-to-config.json>
```

#### Quarkus backend (migration target)

From the repository root:

```bash
./mvnw -pl backend-quarkus quarkus:dev
```

Useful endpoints while running:

- `http://localhost:8090/api/ping`
- `http://localhost:8090/api/config/frontend`
- `http://localhost:8090/q/health`
- `http://localhost:8090/q/swagger-ui`

### Testing

#### Integration Tests
Expand Down
109 changes: 109 additions & 0 deletions backend-quarkus/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
# Conquery Quarkus Backend (Migration Scaffold)

This module is the starting point for migrating the Dropwizard backend to Quarkus in small, safe increments.

## Current state

- Maven module: `backend-quarkus`
- Quarkus REST runtime with JSON support
- Health and OpenAPI extensions wired
- Baseline endpoint: `GET /api/ping`

## Run locally

From repository root:

```bash
mvn -pl backend-quarkus quarkus:dev
```

Default port is `8090`.

### Ingest generated dataset metadata folders at startup

You can mount generated metadata folders (for example `.../gen/demo`) into the container and let the backend ingest
them during boot:

```properties
conquery.metadata.enabled=true
conquery.metadata.root-path=/data/gen
conquery.metadata.folders[0]=demo
```

This reads `conceptTrees/*.concept.json` and `tables/*.table.json` from each configured folder and loads them as
dataset metadata.

### Concept JSON migration helpers

Some Dropwizard concept metadata still uses connector column references in the old `table.column` form. The migration
helper `scripts/normalize_concept_connector_columns.py` rewrites those references for the Quarkus metadata loader:

- connector `"column": "table.column"` becomes `"table": "table", "column": "column"`
- filter `"column": "table.column"` becomes `"column": "column"`
- validity-date `column`, `startColumn`, and `endColumn` references become local column names

Run it from the repository root:

```bash
python3 scripts/normalize_concept_connector_columns.py path/to/*.concept.json
```

Use `--dry-run` first to see how many connector, filter, connector-select, and validity-date columns would be changed. Select fields
covered by the script are `column`, `startColumn`, `endColumn`, `subtractColumn`, `distinctByColumn`, `distinctBy`, and
the column values in `flags`. This script is intended to grow with additional concept metadata migration steps as they
become necessary.

### Polymorphic metadata models

Metadata models are code-first. Java model classes, Jackson annotations, Bean Validation constraints, and OpenAPI
`@Schema` annotations are used both for loading metadata files and for generating their schemas. Registered model
families are exposed in the OpenAPI document at `GET /q/openapi` as `oneOf` schemas with discriminator mappings.

Filter, select, and concept-condition implementations are extensible from another CDI-enabled JAR. A filter extension provides:

1. A concrete class implementing `FilterDefinition`, annotated with OpenAPI `@Schema` and
`@PolymorphicModelSubtype(base = FilterDefinition.class, id = "...")`.
2. A CDI bean implementing `FilterDefinitionProvider<T>` for its model class and business-model conversion and integrity validation. The
provider remains the discovery hook for implementations from external JARs.
3. The filter value model types accepted by that provider. Each model type needs a registered `FilterValueProvider<T>`.

Connector selects use the equivalent `SelectDefinition` and `SelectDefinitionProvider<T>` extension points. Concept-level
selects form a separate family with `ConceptSelectDefinition` and `ConceptSelectDefinitionProvider<T>`. Unknown types
fail startup by default; `conquery.metadata.strict-filter-types` and
`conquery.metadata.strict-select-types` can independently switch their family to warning-and-skip behavior.

Concept-tree conditions use `ConceptCondition` and `ConceptConditionProvider<T>`. Because skipping a condition would
change the meaning of a concept node, unknown condition types always fail metadata validation. The built-in condition
types are `EQUAL`, `PREFIX_LIST`, `PREFIX_RANGE`, `COLUMN_EQUAL`, `PRESENT`, `AND`, `OR`, and `NOT`. The old `GROOVY`
condition is intentionally not registered because script execution requires a separate security and runtime decision.

Query filter values use the separate `FilterValue` and `FilterValueProvider<T>` family. Their discriminator ids may
overlap metadata filter definitions (for example `SELECT`) because polymorphic registrations are scoped by base type.
Filter providers declare their accepted `FilterValue` model classes through `acceptedValueTypes()`. Startup verifies
that each declared model has a registered value provider, and metadata conversion verifies the emitted value type.
Entity-query execution is intentionally not implemented yet. The filter value and entity-history API models are kept,
but the entity-history and entity-resolution endpoints return `501 Not Implemented` until their business semantics are migrated.

The generic `PolymorphicModelRegistry` validates duplicate type ids and base/model compatibility at startup. Its
registrations are also installed into Jackson and projected into OpenAPI. Extension JARs must be discoverable by
Quarkus bean and Jandex indexing so their provider and annotated model class are available during application assembly.

## Migration strategy

1. Keep `backend` (Dropwizard) running while we port feature slices.
2. Move framework-neutral logic first (services, models, utility layers).
3. Port HTTP resources incrementally:
- `resources/api/*`
- `resources/admin/rest/*`
4. Replace Dropwizard-specific primitives with Quarkus equivalents:
- `@Auth` + Dropwizard Auth -> CDI + Quarkus Security/JAX-RS filters
- Dropwizard `Task` -> scheduled jobs/admin endpoints
- `Managed` lifecycle hooks -> Quarkus startup/shutdown events
- Freemarker views -> keep server-side templates via Quarkus Qute/Freemarker extension or move to frontend
5. Port CLI commands (`ShardCommand`, `PreprocessorCommand`, etc.) to Quarkus CLI/Picocli entrypoints.

## Immediate next slices

- Add one real API resource from `backend/src/main/java/com/bakdata/conquery/resources/api`.
- Introduce shared core module for code that should be reused by both runtimes.
- Add compatibility tests that hit both old and new endpoints for parity.
146 changes: 146 additions & 0 deletions backend-quarkus/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,146 @@
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>com.bakdata.conquery</groupId>
<artifactId>parent</artifactId>
<version>${revision}</version>
</parent>

<artifactId>backend-quarkus</artifactId>
<name>Conquery Backend (Quarkus)</name>

<properties>
<quarkus.platform.group-id>io.quarkus.platform</quarkus.platform.group-id>
<quarkus.platform.artifact-id>quarkus-bom</quarkus.platform.artifact-id>
<quarkus.platform.version>3.23.4</quarkus.platform.version>
<skipITs>true</skipITs>
</properties>

<dependencyManagement>
<dependencies>
<dependency>
<groupId>${quarkus.platform.group-id}</groupId>
<artifactId>${quarkus.platform.artifact-id}</artifactId>
<version>${quarkus.platform.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>org.jboss.logging</groupId>
<artifactId>jboss-logging</artifactId>
<version>3.6.1.Final</version>
</dependency>
</dependencies>
</dependencyManagement>

<dependencies>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-arc</artifactId>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-rest</artifactId>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-rest-jackson</artifactId>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-smallrye-openapi</artifactId>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-info</artifactId>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-smallrye-health</artifactId>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-hibernate-validator</artifactId>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>${lombok.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.jetbrains.xodus</groupId>
<artifactId>xodus-environment</artifactId>
<version>1.3.232</version>
</dependency>

<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-junit5</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-test-security</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.rest-assured</groupId>
<artifactId>rest-assured</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>jakarta.validation</groupId>
<artifactId>jakarta.validation-api</artifactId>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>${quarkus.platform.group-id}</groupId>
<artifactId>quarkus-maven-plugin</artifactId>
<version>${quarkus.platform.version}</version>
<extensions>true</extensions>
<executions>
<execution>
<goals>
<goal>build</goal>
<goal>generate-code</goal>
<goal>generate-code-tests</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<systemPropertyVariables>
<java.util.logging.manager>org.jboss.logmanager.LogManager</java.util.logging.manager>
</systemPropertyVariables>
</configuration>
</plugin>
<plugin>
<artifactId>maven-failsafe-plugin</artifactId>
<version>3.2.5</version>
<executions>
<execution>
<goals>
<goal>integration-test</goal>
<goal>verify</goal>
</goals>
<configuration>
<systemPropertyVariables>
<native.image.path>${project.build.directory}/${project.build.finalName}-runner</native.image.path>
<java.util.logging.manager>org.jboss.logmanager.LogManager</java.util.logging.manager>
</systemPropertyVariables>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
Loading
Loading