From cae269917d91e9fdd08804e043f2fbdaba10cee6 Mon Sep 17 00:00:00 2001 From: Patrick Gniza Date: Sun, 28 Jun 2026 19:43:02 +0000 Subject: [PATCH] =?UTF-8?q?Architecture=20hinzugef=C3=BCgt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Architecture.md | 168 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 168 insertions(+) create mode 100644 Architecture.md diff --git a/Architecture.md b/Architecture.md new file mode 100644 index 0000000..bf5ea85 --- /dev/null +++ b/Architecture.md @@ -0,0 +1,168 @@ +Willkommen im Wiki.# Architecture + +## High-Level Runtime Architecture + +Default Microsoft SQL Server mode: + +```text ++----------------------+ +| Romexis Clients | ++----------+-----------+ + | + | RMI / Romexis protocol ports + v ++----------------------+ +| Romexis Server | +| Docker Container | ++----------+-----------+ + | + | JDBC + v ++----------------------+ +| Microsoft SQL Server | +| Docker Container | ++----------------------+ +``` + +Firebird mode: + +```text ++----------------------+ +| Romexis Clients | ++----------+-----------+ + | + | RMI / Romexis protocol ports + v ++----------------------+ +| Romexis Server | +| Docker Container | ++----------+-----------+ + | + | JDBC / Jaybird + v ++----------------------+ +| Firebird Server | +| Docker Container | ++----------------------+ +``` + +--- + +## Image Architecture + +```text +romexis-payload: + /opt/romexis + /opt/romexis-mssql-db + /opt/romexis/version + +romexis-firebird-payload:latest + /opt/romexis-firebird-db + Firebird SQL scripts + Firebird backup/restore helpers + romexis_new.fdb template/reference + +romexis-base-jre:11- + Java 11 + JavaFX/OpenJFX + database client tools + system dependencies + +romexis-server:- + Romexis payload + Firebird payload + base runtime + Java property agent + initialization scripts + entrypoint +``` + +--- + +## Why Payload Images? + +The original Dockerfile downloaded and extracted installer files inside the final server build. + +That worked, but had drawbacks: + +- repeated large downloads +- slow builds +- harder debugging +- installer extraction tightly coupled to server image build +- poor reuse across architectures + +Payload images solve this by making the extracted installer content a reusable build artifact. + +--- + +## Runtime Data Layout + +The runtime stack uses persistent volumes or host directories for: + +```text +/data/romexis_images +/data/romexis_ergodata +/data/romexis_cache +/opt/romexis/sconfig +/opt/romexis/programdata +``` + +Database data is backend-specific: + +```text +Microsoft SQL Server: + /var/opt/mssql + +Firebird: + /firebird/data/romexis.fdb +``` + +--- + +## Startup Flow + +```text +entrypoint.sh + | + |-- prepare persistent directories + |-- generate database URL if needed + |-- write Romexis configuration + |-- run /opt/init-romexis-db.sh + | | + | |-- route to MSSQL init if SERVER_DB=5 + | |-- route to Firebird init if SERVER_DB=4 + | + |-- fix keystore alias + |-- start Romexis Server +``` + +--- + +## Database Initialization Router + +The runtime uses a small router script: + +```text +/opt/init-romexis-db.sh +``` + +It detects the backend using: + +```text +ROMEXIS_DB_URL +SERVER_DB +``` + +Supported backend identifiers: + +| Value | Backend | +|---|---| +| `SERVER_DB=5` | Microsoft SQL Server | +| `SERVER_DB=4` | Firebird | + +Backend-specific logic is split into: + +```text +/opt/init-romexis-mssql-db.sh +/opt/init-romexis-firebird-db.sh +```