Platform Architecture & Reference
DataForge combines browser-isolated Rust WebAssembly threads with an acyclic directed graph (DAG) solver to generate relational data with zero network egress.
1. WebAssembly Execution Engine
DataForge compiles its core pseudo-random generators and relational solvers from Rust into optimized 64-bit WebAssembly bytecode. By spawning dedicated Web Workers, the browser thread executes without DOM-blocking latency.
import { initForgeEngine } from '@dataforge/wasm-runtime';
const engine = await initForgeEngine({
seed: 'seed_8941_prod',
zeroTelemetry: true,
memoryAllocMb: 128
});
2. Relational DAG Solver
Synthetic schemas with inter-table foreign keys are modeled as Directed Acyclic Graphs (DAGs). Topological sorting determines the exact insertion order to prevent orphan records or referential constraint breaches.
- 1:1 Relationships: Coordinated primary key derivation.
- 1:N Parent-Child: Bounded Poisson sampling of child rows per parent ID.
- N:M Polymorphic Join: Synthetic junction mapping with unique composite indexing.
3. Empirical Statistical Distributions
To prepare database query optimizers and machine learning models for genuine production anomalies, generated numerical values adhere to configurable probability densities:
4. CLI & CI/CD Pipeline
Seed local Docker databases before running integration tests with Cypress or Playwright. Install the lightweight CLI runner:
npm install -g @dataforge/cli
# Run deterministic database seeding
dataforge generate \
--schema ./schemas/b2b-billing.json \
--count 10000 \
--format sql \
--output ./seed.sql
