Skip to main content

Database Architecture

Database Isolation at Domain Level

In the vNext Runtime platform, each domain has its own independent database. This approach ensures complete data isolation between domains and is critical for security and data integrity.

Database Isolation Principles

Core Principles:

  • Each domain = One database
  • Direct database access between domains is prohibited
  • Data sharing occurs only through API or Events
  • Each domain implements its own data governance policies

Multi-Flow Schema Structure

vNext Runtime uses a multi-flow schema (multi-schema) approach within the database. This structure organizes database objects for different flows and system components.

System Schemas

When the platform starts, 6 fundamental system schemas are automatically created:

1. sys_flows

-- Schema where flow definitions are stored
sys_flows

Content: Workflow definitions, state structures, transition rules, version information.

2. sys_views

-- Schema where view definitions are stored
sys_views

Content: UI view definitions, templates, platform overrides.

3. sys_functions

-- Schema where function APIs are stored
sys_functions

Content: System functions (State, Data, View APIs), authorization rules.

4. sys_tasks

-- Schema where task definitions are stored
sys_tasks

Content: Definitions of HTTP, Script, Timer, Condition, and other task types.

5. sys_extensions

-- Schema where extensions and plugins are stored
sys_extensions

Content: System extensions, custom plugins, extension points.

6. sys_schemas

-- Schema where schema metadata is stored
sys_schemas

Content: Registry of all schemas, migration history, version tracking.

Flow-Specific Schemas (Dynamic Schemas)

Per-flow database schemas hold instance data and history. As of , schema creation and migration for a flow are driven by a DB-Migrator job at deploy time, not by running migration checks on every start or transition request.

Deploy-time schema lifecycle

Example:

Automatic Migration System

Schema changes are applied in a controlled way via the migrator and sys_schemas history—not by coupling migration to each API request.

First deployment

System upgrade

Database Architecture Diagram

Conclusion

vNext Runtime's multi-schema database architecture enables independent data management for each domain and each flow. The automatic schema creation and migration system allows developers to focus on workflows without dealing with database management.