Skip to content

Commit 50a1579

Browse files
hyperpolymathclaude
andcommitted
docs: add TOPOLOGY.md
Document purpose, module structure, and data flow for this -iser tool. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 647b25b commit 50a1579

1 file changed

Lines changed: 46 additions & 0 deletions

File tree

TOPOLOGY.md

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
<!-- SPDX-License-Identifier: PMPL-1.0-or-later -->
2+
<!-- Copyright (c) 2026 Jonathan D.A. Jewell (hyperpolymath) <j.d.a.jewell@open.ac.uk> -->
3+
# TOPOLOGY.md — otpiser
4+
5+
## Purpose
6+
7+
otpiser generates fault-tolerant OTP supervision trees for Erlang/Elixir systems. It reads a service topology description from an `otpiser.toml` manifest and emits Erlang/Elixir modules with correctly structured supervisor trees, child specifications, restart strategies, and Zig FFI bridges for native integration. otpiser targets engineers who want the reliability guarantees of the OTP supervision model without hand-authoring the boilerplate of nested supervisors and child specs.
8+
9+
## Module Map
10+
11+
```
12+
otpiser/
13+
├── src/
14+
│ ├── main.rs # CLI entry point (clap): init, validate, generate, build, run, info
15+
│ ├── lib.rs # Library API
16+
│ ├── manifest/mod.rs # otpiser.toml parser
17+
│ ├── codegen/mod.rs # OTP/Erlang wrapper, Zig FFI bridge, C header generation
18+
│ └── ... # [WIP] supervision strategy modules
19+
├── examples/ # Worked examples
20+
├── verification/ # Proof harnesses
21+
├── container/ # Stapeln container ecosystem
22+
└── .machine_readable/ # A2ML metadata
23+
```
24+
25+
## Data Flow
26+
27+
```
28+
otpiser.toml manifest
29+
30+
┌────▼────┐
31+
│ Manifest │ parse + validate service topology and restart strategy definitions
32+
│ Parser │
33+
└────┬────┘
34+
│ validated OTP topology config
35+
┌────▼────┐
36+
│ Analyser │ resolve supervision hierarchy, validate restart intensities
37+
└────┬────┘
38+
│ intermediate representation
39+
┌────▼────┐
40+
│ Codegen │ emit generated/otpiser/ (Erlang/Elixir supervisors, Zig FFI, C headers)
41+
└────┬────┘
42+
│ OTP supervision tree artifacts
43+
┌────▼────┐
44+
│ OTP VM │ run fault-tolerant supervision hierarchy on BEAM
45+
└─────────┘
46+
```

0 commit comments

Comments
 (0)