Typhon Feature Catalog
Documentation for every feature in
src/Typhon.Engine, tagged Public (usable by application developers embedding Typhon) or Internal (engine machinery, for contributors). Each entry covers what it's for, what problem it solves, and how it works. Scoped to the engine itself β Workbench, TyphonShell, and Patate (apps built on Typhon) are out of scope.
π New to Typhon? This catalog is the reference β every feature, one page each, organized for lookup. If you want to learn Typhon end-to-end, start with the User Guide instead: a 6-chapter, read-as-you-go tutorial with a runnable example project. Come back here once you know what you're looking for.
π¬ Want to understand why, not just how? This catalog tells you what each feature does and how to use it β not the mechanism underneath. The In-Depth Overview goes deeper: structures, invariants, and design trade-offs. That's useful whether you're embedding Typhon and want to reason about what it actually guarantees (durability, MVCC, the runtime model), or reading the engine's code for the first time β it's not contributor-only. A 14-chapter reference mirroring
src/Typhon.Engine/'s folder layout; each category README below links to its corresponding chapter.
Who it's for: application developers embedding Typhon get a task-oriented "what exists and how do I use it" reference β the Public index is a complete, self-contained reading list; stop there. Engine contributors who need the machinery behind those features continue into Internal.
Learning level: every Public feature page is tagged π’ Start Here (needed for the simplest working app), π΅ Core (what most production apps reach for), or π£ Advanced (specific use cases only) β see its badge line. Category tables below are ordered accordingly, easiest first.
How to navigate: skim the category table below β its Scope column flags whether a category is mostly Public, Internal-only, or a real mix of both β then drill into a category's README for its full feature list, or a feature page for usage details and code samples. Or jump straight to Public or Internal below and Ctrl-F for a feature name.
Categories
| Category | What it covers | Scope | README |
|---|---|---|---|
| Foundation | Lock-free primitives, epoch memory safety, deadlines/timeouts, pinned allocators, and hash maps every other layer is built on. | Mixed | β |
| Storage | The memory-mapped page cache, allocation hierarchy (occupancy β segments β chunks), and pluggable backends underlying every persisted structure. | Mixed | β |
| Durability | WAL v2, the append-before-publish commit pipeline, checkpointing, and crash recovery β Typhon's crash-safety guarantees. | Mixed | β |
| Schema | Attribute-driven component/field declaration, FieldId stability, validation, and automatic/user-defined schema evolution. | Mixed | β |
| Revision | The per-component MVCC revision-chain subsystem β storage, snapshot visibility, conflict baselines, and GC/crash scrub. | Mixed | β |
| Ecs | The archetype-based entity/component data model β CRUD, storage modes, queries, views, relationships, collections, clusters. | Public | β |
| Indexing | Concurrent B+Tree secondary indexes β key-width variants, lookup/range scan, versioned (MVCC) index history, diagnostics. | Mixed | β |
| Spatial | R-Tree spatial indexing, spatial query predicates, trigger volumes, and cluster-based tiered simulation dispatch. | Mixed | β |
| Querying | The fluent query builder, execution planning, statistics, and incrementally-refreshed persistent Views. | Public | β |
| Transactions | The three-tier execution model (Engine β UoW β Transaction) β durability modes/discipline, commit/rollback, conflict resolution. | Public | β |
| Subscriptions | Server-driven, View-based client state replication over TCP β published Views, delta encoding, wire transport. | Public | β |
| Runtime | The DAG-scheduled tick loop that dispatches systems β scheduling, system types, spatial-tier dispatch, overload management. | Public | β |
| Resources | The runtime resource graph tracking every engine resource's metrics, budgets, snapshots, and exhaustion handling. | Mixed | β |
| Observability | Zero-overhead telemetry gating, distributed tracing, OpenTelemetry metrics export, and health/alerting. | Public | β |
| Errors | The unified exception hierarchy, error codes, timeouts, resource-exhaustion handling, and the zero-allocation Result type. | Public | β |
| Profiler | The embedded, zero-allocation typed-event profiler and its trace export/inspection tooling. | Mixed | β |
| Hosting | DI extension methods to bootstrap a DatabaseEngine and its services into an IServiceCollection. | Public | β |
Public β What You Can Use
Every Public feature, one line each β the application-facing surface, complete on its own. Sub-features are indented under their parent with β³.
Foundation
| Feature | Summary | Status | Level | Link |
|---|---|---|---|---|
| Deadline & Timeout Propagation | Monotonic absolute-deadline timeouts bundled with cooperative cancellation, threaded through every Unit-of-Work via the 24-byte UnitOfWorkContext to eliminate timeout accumulation across nested calls. | β Implemented | π΅ Core | β |
Storage
| Feature | Summary | Status | Level | Link |
|---|---|---|---|---|
| Transient Store (heap-backed) | Pinned heap blocks standing in for the page cache, so Transient components get raw-memory speed through the same segment code β tune via TransientOptions. | β Implemented | π΅ Core | β |
| Database File Locking & Lifecycle | Two-layer protection against concurrent multi-process opens β OS FileShare.Read plus an advisory .lock sidecar with stale/live/cross-machine PID detection β plus create/open/delete lifecycle handling. | β Implemented | π΅ Core | β |
| Memory-Mapped Page Cache & Clock-Sweep Eviction | 8 KiB pages, 4-state lifecycle, clock-sweep eviction with sequential-allocation optimization, async I/O, and backpressure handling. | β Implemented | π£ Advanced | β |
| Page Integrity β CRC32C, Seqlock Snapshots & A/B Page Pairing | Hardware CRC32C page checksums, seqlock-protected checkpoint snapshots, and A/B slot pairing for structural pages that can't be rebuilt. | β Implemented | π£ Advanced | β |
| Variable-Sized Buffer Storage (VSBS) | Linked-chunk-chain storage for variable-length, reference-counted buffers β backs multi-value B+Tree index entries and per-element-type ComponentCollection<T> pools. | β Implemented | π£ Advanced | β |
| Storage Introspection & Integrity Diagnostics | Read-only APIs exposing segment/page topology and auditing occupancy-vs-segment consistency, powering the Workbench Database File Map. | β Implemented | π£ Advanced | β |
| Page Compression (Future) | Planned LZ4-style compression adapter for cold/historical data, string-heavy tables, and backups β deliberately not implemented in v1 so hot real-time paths stay within microsecond latency targets. | π Planned | π£ Advanced | β |
Durability
| Feature | Summary | Status | Level | Link |
|---|---|---|---|---|
| Durability Modes | Per-Unit-of-Work control over when WAL records become crash-safe β pick latency vs. data-at-risk per workload. | β Implemented | π’ Start Here | β |
| Β Β β³ Committed Durability Discipline | Zero-loss, atomic writes on Typhon's cheapest component layout (SingleVersion) without paying for an MVCC revision chain. | β Implemented | π£ Advanced | β |
| Write-Ahead Log (WAL v2 logical records) | The single source of durability truth: logical (EntityId, slot) records, one codec, a sequential CRC-chained log. | β Implemented | π£ Advanced | β |
| Commit Pipeline (append-before-publish) | Transaction.Commit's VALIDATEβPREPAREβBUILDβAPPENDβPUBLISHβWAIT ordering guarantees nothing is visible before its WAL record is appended, and publish never rolls back. | β Implemented | π£ Advanced | β |
| Checkpoint v2 (SnapshotStore pipeline) | Background pipeline that consolidates dirty data pages into the data file, advances CheckpointLSN only over pages it actually wrote, and recycles WAL segments. | β Implemented | π£ Advanced | β |
| Crash Recovery (RecoveryDriver) | On open, scans the WAL's durably-committed prefix and replays it idempotently, in strict LSN order, through the engine's own write primitives. | β Implemented | π£ Advanced | β |
| Page Checksums & Seqlock Snapshots | CRC32C torn-page detection on every page, paired with a lock-free seqlock so checkpoints snapshot live pages without blocking writers. | β Implemented | π£ Advanced | β |
| BulkLoad Write Path | An opt-in, exclusive, throughput-first session API that skips per-row WAL and brackets the whole bulk with a BulkBegin/BulkEnd manifest pair plus a synchronous checkpoint barrier. | π§ Partial | π£ Advanced | β |
| Durability Health & Introspection | DurabilityHealth (Ok/Degraded/Fatal) and checkpoint/WAL-writer cycle counters via the Resource Graph let an operator observe the subsystem without reaching into internals. | β Implemented | π£ Advanced | β |
| Point-in-Time Incremental Backup | Forward-incremental .pack backups scoped to changed pages; restore reassembles a base and heals it through crash recovery's RecoveryDriver. | π Planned | π£ Advanced | β |
Schema
| Feature | Summary | Status | Level | Link |
|---|---|---|---|---|
| Component & Field Declaration | Attribute-driven declaration of blittable component structs ([Component], [Field], [Index]) reflected into DBComponentDefinition at registration time. | β Implemented | π’ Start Here | β |
| FieldId Stability | Persistent, name-based FieldId assignment (auto-assign once, match by name on reopen) so adding/removing/reordering fields never breaks index identity; PreviousName handles renames. | β Implemented | π΅ Core | β |
| Schema Validation (SchemaDiff) | On every reopen, diffs persisted vs. runtime schema, classifies every change by compatibility level, and fails loudly before any user transaction runs on unresolvable mismatches. | β Implemented | π΅ Core | β |
| Compatible Schema Evolution (Auto-Migration) | Automatically migrates entities at startup for field add/remove/reorder and lossless type widenings by allocating a new stride segment while preserving ChunkIds so indexes need no rebuild. | β Implemented | π΅ Core | β |
| Β Β β³ Migration Execution Strategy | Migration runs eagerly and synchronously at database open β before any user transaction β with progress events and an offline dry-run check. | β Implemented | π£ Advanced | β |
| User-Defined Migration Functions | Register pure transform functions for breaking schema changes, with automatic multi-step chain resolution across revisions. | β Implemented | π£ Advanced | β |
| Offline Schema Inspection & Dry-Run Validation | Read a database's persisted schema, or simulate a code upgrade against it, without opening it for real. | β Implemented | π£ Advanced | β |
| Migration Progress Tracking | OnMigrationProgress event stream (Analyzing β AllocatingSegments β MigratingEntities β β¦ β Complete) for observing long-running eager migrations in production. | β Implemented | π£ Advanced | β |
| Schema History Audit Log | Append-only audit trail recording every applied schema change for production auditing, queried via dbe.GetSchemaHistory(). | β Implemented | π£ Advanced | β |
Revision
| Feature | Summary | Status | Level | Link |
|---|---|---|---|---|
| Revision Append & Chain Growth | Every write to a Versioned component creates a new immutable revision instead of overwriting the old one β Spawn allocates, Write<T>() appends, Destroy tombstones. | β Implemented | π΅ Core | β |
| MVCC Snapshot Visibility | Reads resolve to the latest revision committed at-or-before the reader's transaction TSN, with read-your-own-writes and explicit RevisionReadStatus outcomes. | β Implemented | π΅ Core | β |
| Write-Conflict Baseline Tracking | Every chain append records the new and prior revision as the comparison baseline used by commit-time conflict detection and ConcurrencyConflictHandlers. | β Implemented | π£ Advanced | β |
| Revision Garbage Collection & Compaction | Bounded-memory chain cleanup keyed off MinTSN, preserving a sentinel for in-flight readers and collapsing fully-dead chains to trigger entity removal. | β Implemented | π£ Advanced | β |
Ecs
| Feature | Summary | Status | Level | Link |
|---|---|---|---|---|
| Entity & Archetype Model | Structured 64-bit entity identity, C# class-hierarchy archetypes, and typed zero-copy component handles β the schema backbone of every other ECS feature. | β Implemented | π’ Start Here | β |
| Entity Lifecycle & CRUD API | Zero-copy EntityRef accessor for Spawn, Open, Read, Write, Destroy, Enable/Disable β the sole entity manipulation API. | β Implemented | π’ Start Here | β |
| Β Β β³ Generated Multi-Component Accessors | Source-generated zero-copy Refs/MutRefs structs reading or writing every archetype component in one call. | β Implemented | π΅ Core | β |
| Β Β β³ Batch & SoA Spawn | Bulk entity creation β shared-value batches or per-entity SoA spans β amortizing per-call overhead across thousands of entities. | β Implemented | π΅ Core | β |
| Β Β β³ Enable/Disable Components | O(1) per-component bit-flip toggle β data preserved, not freed, with its own MVCC snapshot isolation independent of the component's StorageMode. | β Implemented | π΅ Core | β |
| Storage Modes | Pick durability and write cost per component type β from microsecond ACID to nanosecond scratch memory, in one engine. | β Implemented | π’ Start Here | β |
| Β Β β³ Versioned | Full MVCC snapshot isolation and zero-loss durability for data that can never be lost or read torn. | β Implemented | π’ Start Here | β |
| Β Β β³ SingleVersion (Tick-Fence Durable) | In-place writes at near-zero cost, durable to the last completed game tick. | β Implemented | π΅ Core | β |
| Β Β β³ Transient (Heap-Only) | Heap-only component storage for scratch data that should never touch disk. | β Implemented | π΅ Core | β |
| Β Β β³ Committed Durability Discipline | Zero-loss, atomic commits on the SingleVersion layout β without paying for a Versioned revision chain. | β Implemented | π£ Advanced | β |
| Query System (EcsQuery) | Three-tier constraint evaluation with planner-chosen broad or targeted scan, indexed predicates, FK joins, and spatial filters. | β Implemented | π’ Start Here | β |
| Reactive Views (EcsView) | Persistent, incrementally-maintained query results that refresh in microseconds instead of re-scanning every tick. | π§ Partial | π΅ Core | β |
| Entity Relationships | Typed EntityLink<T> references plus declarative cascade delete and reactive FK joins. | β Implemented | π΅ Core | β |
| Component Collections | Per-entity variable-length lists β owned data or entity-reference lists β without breaking fixed-size component layout. | β Implemented | π΅ Core | β |
| Schema Versioning & Migration | Detects struct/archetype layout drift at database open and migrates data automatically or via your own functions. | π§ Partial | π΅ Core | β |
| Entity Clusters (Batched SoA Storage) | GPU-inspired batched SoA storage that turns per-entity hashmap/page lookups into sequential array scans. | β Implemented | π£ Advanced | β |
Indexing
| Feature | Summary | Status | Level | Link |
|---|---|---|---|---|
| Secondary Index Storage Modes | An indexed field is either unique or AllowMultiple; the choice drives the on-disk value representation and which mutation API path is used. | β Implemented | π΅ Core | β |
| Β Β β³ Unique (Single-Value) Secondary Index | One key maps to exactly one entity β the B+Tree value is a chunk-id directly, no buffer indirection. | β Implemented | π΅ Core | β |
| Β Β β³ Multi-Value Secondary Index (AllowMultiple) | Many entities share one key β the B+Tree value is a growable HEAD buffer of chunk-ids, at a fixed +4-byte-per-entity cost. | β Implemented | π΅ Core | β |
| Lookup and Range-Scan Operations | Lock-free point lookups and ordered range scans over any secondary index, MVCC-correct at your transaction's snapshot. | β Implemented | π΅ Core | β |
| Index Handle Resolution (IndexRef) | Opaque, zero-allocation handle to a PK or secondary index, resolved once on the cold path via GetPKIndexRef/GetIndexRef and reused on the hot path with O(1) schema-evolution staleness checks. | β Implemented | π£ Advanced | β |
| Versioned (HEAD/TAIL) Secondary Indexes for MVCC | AllowMultiple indexes maintain a HEAD buffer (current set) plus an append-only TAIL of version transitions so index membership stays correct across updates and deletes. | β Implemented | π£ Advanced | β |
| Transaction-Local Index Overlay (Read-Your-Own-Writes) | Planned per-transaction overlay so index lookups see that transaction's own uncommitted writes. | π Planned | π£ Advanced | β |
Spatial
| Feature | Summary | Status | Level | Link |
|---|---|---|---|---|
| Spatial Architecture Overview | Explains how the per-component R-Tree and the engine-wide spatial grid are two independent mechanisms, and which feature to read next. | β Implemented | π’ Start Here | β |
| Field Attribute & Schema Integration | Declare a component field as spatially indexed via [SpatialIndex], validated against schema rules at registration time. | β Implemented | π΅ Core | β |
| Β Β β³ Storage-Mode Compatibility (SingleVersion / Versioned) | The same [SpatialIndex] field works on both storage modes -- only when the tree catches up differs. | β Implemented | π΅ Core | β |
| Spatial Query API (AABB / Radius / Ray / Frustum / kNN / Count) | Query entry points over the per-component R-Tree: engine-internal SpatialQuery<T> plus the public fluent EcsQuery WhereNearby/WhereInAABB/WhereRay. | β Implemented | π΅ Core | β |
| Spatial Grid Configuration & Tier Control | Engine-wide grid sizing plus the per-cell SimTier control surface for multi-resolution simulation. | β Implemented | π΅ Core | β |
| Static / Dynamic Tree Separation | A spatial field lands in one of two independent trees -- tick-fence-exempt static, or fat-AABB-maintained dynamic -- chosen once at schema time. | β Implemented | π£ Advanced | β |
| Fat-AABB Incremental Update | Margin-enlarged bounds absorb small moves for ~25ns, with no tree mutation. | β Implemented | π£ Advanced | β |
| Category Filtering | Bitmask pruning skips whole subtrees and clusters before geometry tests -- AND-conjunctive at the R-Tree, any-bit-overlap at the cluster broadphase. | β Implemented | π£ Advanced | β |
| Spatially-Coherent Entity Clustering | Every entity in a cluster shares one grid cell, so spatial bookkeeping is per-cluster, not per-entity. | β Implemented | π£ Advanced | β |
| Tiered Simulation Dispatch | One simulation tier per spatial cell, four dispatch frequencies, zero per-entity distance checks. | β Implemented | π£ Advanced | β |
| Checkerboard Dispatch | Opt-in two-phase Red/Black cluster partitioning for systems that write across cell boundaries, dispatched as one DAG node with two internal phases. | β Implemented | π£ Advanced | β |
Note: Static/Dynamic Tree Separation is a sub-feature of the (Internal) Spatial R-Tree Index β see the Internal section below for the tree itself.
Querying
| Feature | Summary | Status | Level | Link |
|---|---|---|---|---|
| Fluent Query API & Predicate Parsing | Archetype-rooted fluent builder that parses C# lambdas into index-driven plans, with structural/enabled-bit constraints, OR disjunction, and FK navigation joins. | β Implemented | π’ Start Here | β |
| Β Β β³ Indexed Field Predicates (WhereField) | Expression-parsed predicate that drives a targeted B+Tree scan and powers incrementally-maintained reactive views. | β Implemented | π΅ Core | β |
| Β Β β³ Opaque Post-Filter Predicates (Where) | Arbitrary per-entity C# delegate evaluated after a broad archetype scan, for logic the index system can't express. | β Implemented | π’ Start Here | β |
| Β Β β³ OR Disjunction (DNF Predicates) | \|\| in a WhereField predicate, normalized to Disjunctive Normal Form and evaluated as independent branches. |
β Implemented | π£ Advanced | β |
| Β Β β³ Foreign-Key Navigation Joins (L4) | Join across an entity-reference field β filter source entities by predicates on the target entity they point to. | β Implemented | π£ Advanced | β |
| Result Ordering & Pagination | Sorted, paged query results driven directly off a B+Tree index scan β no full-scan-then-sort. | β Implemented | π΅ Core | β |
| Persistent Views β Incremental Refresh & Delta Tracking | TSN-anchored persistent Views (ToView()) refreshed via lock-free MPSC ring-buffer change capture at commit time, exposing Added/Removed/Modified deltas. | π§ Partial | π΅ Core | β |
| Spatial Query Predicates | R-Tree-backed AABB, radius, and ray filters attached directly to a fluent ECS query. | β Implemented | π£ Advanced | β |
| Execution Planning & Pipeline Execution | Picks the most selective index as the scan driver and streams results into the caller's collection. | β Implemented | π£ Advanced | β |
| Statistics Infrastructure (HLL / MCV / Histogram) | Background-maintained per-field statistics feeding the selectivity estimator, refreshed by a tunable polling worker thread. | β Implemented | π£ Advanced | β |
| ViewFactory β Parameterized Queries & View Pooling | Reusable query templates with a Rent/Return view pool, to remove per-session view setup cost. | π Planned | π£ Advanced | β |
| Temporal Queries (Point-in-Time Read & Revision History) | Opt-in per-component history retention enabling reads of past state and full revision timelines. | π Planned | π£ Advanced | β |
Transactions
| Feature | Summary | Status | Level | Link |
|---|---|---|---|---|
| Unit of Work (durability boundary) | Middle tier of the three-tier API hierarchy β batches Transactions under a single flush/durability boundary, owning the shared ChangeSet, deadline, and UoW identity. | β Implemented | π’ Start Here | β |
| Durability Modes (Deferred / GroupCommit / Immediate) | Per-UoW control of WAL flush timing β trade commit latency for the data-at-risk window on crash. | β Implemented | π’ Start Here | β |
| Β Β β³ Per-Transaction Durability Override | Escalate one critical operation to zero-loss durability β via a dedicated Immediate UoW / side-transaction β without raising the surrounding batch's mode (the DurabilityOverride enum is declared but not yet a Commit parameter). |
β Implemented | π£ Advanced | β |
| Transaction Creation Patterns | Three ways to obtain a Transaction β explicit UoW + CreateTransaction, single-shot quick transaction, or UoW-less read-only snapshot transaction. | β Implemented | π’ Start Here | β |
| Β Β β³ Standard (UnitOfWork + CreateTransaction) | Open a UnitOfWork once and draw as many transactions from it as a batch needs, sharing one durability/flush boundary. | β Implemented | π’ Start Here | β |
| Β Β β³ CreateQuickTransaction (single-shot, auto-dispose) | One call fuses a UnitOfWork and its one Transaction into a single disposable for single-shot writes. | β Implemented | π’ Start Here | β |
| Β Β β³ CreateReadOnlyTransaction (snapshot reads) | A Transaction with no UnitOfWork, UoW ID, or ChangeSet at all, for pure-read MVCC-snapshot workloads. | β Implemented | π΅ Core | β |
| SingleVersion Durability Discipline (TickFence / Commit) | Per-transaction knob, orthogonal to DurabilityMode, that picks how a SingleVersion write becomes durable. | β Implemented | π΅ Core | β |
| Β Β β³ TickFence Discipline (Default) | The default, lowest-cost SingleVersion write β durable at the next tick fence, not at commit. | β Implemented | π΅ Core | β |
| Β Β β³ Commit Discipline (Variant-A Staging) | Atomic, zero-loss SingleVersion writes β durable and visible together at Commit(), with no revision chain. | β Implemented | π£ Advanced | β |
| Commit / Rollback Pipeline (ACID Commit Path) | Transaction.Commit/Rollback overloads implementing the append-before-publish commit pipeline with atomic conflict resolution and always-completing rollback. | β Implemented | π΅ Core | β |
| Optimistic Concurrency Conflict Resolution | Pluggable ConcurrencyConflictHandler invoked per conflicting entity during commit, exposing four data views via ConcurrencyConflictSolver; default with no handler is last-writer-wins. | β Implemented | π΅ Core | β |
| Deadline & Cooperative Cancellation | An absolute deadline rides every transaction commit, propagating through every lock and aborting cleanly only before work starts. | β Implemented | π΅ Core | β |
| UoW Identity & Crash-Safe Recovery Boundary | Each UoW gets a 15-bit ID from a persistent, back-pressured UowRegistry; on crash, still-Pending UoW IDs are voided so their revisions become instantly invisible with no replay. | β Implemented | π£ Advanced | β |
| Transaction Lifecycle, Thread Affinity & Pooling | Transaction is single-thread-affine with a fail-fast state machine; TransactionChain provides lock-free CAS-based creation, exclusive-lock removal, 16-instance pooling, and MinTSN tracking for MVCC garbage collection. | β Implemented | π£ Advanced | β |
| Bulk Load Session | Opt-in, exclusive write path that batches writes through a recycled Transaction and commits the whole load atomically via a checkpoint barrier. | β Implemented | π£ Advanced | β |
Subscriptions
| Feature | Summary | Status | Level | Link |
|---|---|---|---|---|
| Published Views | Register a query View as a subscribable target via TyphonRuntime.PublishView, as either one shared instance for all clients or a per-client factory. | β Implemented | π’ Start Here | β |
| Β Β β³ Shared Views | One View instance, refreshed and diffed once per tick, fanned out to every subscriber. | β Implemented | π΅ Core | β |
| Β Β β³ Per-Client Views | A Func<ClientContext, ViewBase> that builds a fresh, parameterized View for each subscriber. | β Implemented | π΅ Core | β |
| Subscription Management (SetSubscriptions) | Atomic, idempotent, diff-based API to set a client's full subscription list each tick. | β Implemented | π’ Start Here | β |
| Β Β β³ Server-Driven Subscriptions (v1) | Game code calls SetSubscriptions whenever game state changes; the runtime applies the diff-based transition on the next tick. | β Implemented | π΅ Core | β |
| Β Β β³ Client-Initiated Subscriptions (v2) | Clients request their own subscription changes via an OnClientSubscriptionRequest callback, validated server-side before being applied. | π Planned | π£ Advanced | β |
| Client Connections & Lifecycle | TCP listener thread accepts sockets and assigns each a ConnectionId; ClientContext is the only handle game code touches. | β Implemented | π΅ Core | β |
| Per-Tick Delta Computation & Encoding | After WriteTickFence, the Output phase diffs published Views into Added/Removed/Modified and encodes only the changed component bytes. | β Implemented | π΅ Core | β |
| Β Β β³ Component-Level Dirty Encoding (v1) | Modified entities send full bytes for each component whose chunk was dirty this tick; unchanged components are omitted. | β Implemented | π΅ Core | β |
| Β Β β³ Per-Field Dirty Encoding (v1.1) | Planned output-phase field diffing to shrink Modified payloads to only the bytes of fields that actually changed. | π Planned | π£ Advanced | β |
| Subscription Server Configuration | Tunable knobs for the TCP subscription listener: port, max clients, send buffer capacity, backpressure threshold, sync batch size, ring buffer capacity. | β Implemented | π΅ Core | β |
| Reference C# Client SDK | Typhon.Client connects over TCP, decodes TickDeltaMessages, and maintains a per-View local entity cache that application code reads directly. | β Implemented | π΅ Core | β |
| Published/System-Input View Separation Guard | Runtime throws if a published View doubles as a system input (or vice versa), since the View's MPSC delta ring buffer can only have one consumer. | β Implemented | π£ Advanced | β |
| TCP Transport & Wire Format | One length-prefixed, MemoryPack-serialized TickDeltaMessage per client per tick over TCP_NODELAY. | β Implemented | π£ Advanced | β |
| Incremental Sync | New subscriptions to large Views sync in tick-sized batches instead of one giant first delta. | β Implemented | π£ Advanced | β |
| Backpressure & Resync Recovery | A full client send buffer drops one tick's delta and triggers an automatic full-state resync β never an unbounded queue. | β Implemented | π£ Advanced | β |
| Subscription Priority & Overload Throttling | Critical/Normal/Low priority per published View; under overload Normal/Low Views are throttled while Critical Views always go out. | β Implemented | π£ Advanced | β |
| Subscription Telemetry & Tracing | Per-tick OutputPhaseMs/DeltasPushed/OverflowCount counters plus a live per-tick Output-phase trace span. | π§ Partial | π£ Advanced | β |
Runtime
| Feature | Summary | Status | Level | Link |
|---|---|---|---|---|
| Tick-Based Execution Engine | TyphonRuntime β the top-level host that owns the tick loop, creates one UoW per tick and one Transaction per system automatically, and drives startup/crash-recovery/shutdown. | β Implemented | π΅ Core | β |
| Β Β β³ Execution Modes | Today: a fixed-timestep tick loop plus a single-threaded debug variant; event-driven and hybrid request/response modes are designed but not yet built. | π§ Partial | π£ Advanced | β |
| Β Β β³ Worker Pool & Threading Model | Core allocation between a dedicated tick-metronome thread and a worker pool that executes the system DAG in parallel. | β Implemented | π£ Advanced | β |
| Β Β β³ Parallel Tick Fence | Spreads the post-tick WriteTickFence step (cluster migrations, AABB refresh, WAL publish) across the worker pool instead of running it on one thread. | β Implemented | π£ Advanced | β |
| System Types | Five system base classes a developer picks per piece of game logic β proactive callbacks, reactive entity queries, chunk-parallel non-entity work, multi-stage pipelines, and sub-system grouping. | β Implemented | π΅ Core | β |
| Β Β β³ CallbackSystem | Proactive system that runs every tick for non-entity work β timers, input draining, global state. | β Implemented | π΅ Core | β |
| Β Β β³ QuerySystem | Reactive per-entity system that auto-skips when nothing relevant changed, with optional automatic multi-core chunking. | β Implemented | π΅ Core | β |
| Β Β β³ ChunkedCallbackSystem | Fan a CallbackSystem's body out across N workers for SIMD sweeps, reductions, and other non-entity chunkable work. | β Implemented | π£ Advanced | β |
| Β Β β³ PipelineSystem | Reactive multi-stage gather/process/scatter system for bulk entity processing β full execution model pending Patate. | Implemented (chunk-dispatch only) | π£ Advanced | β |
| Β Β β³ CompoundSystem | Group related sub-systems' registration under one Configure call β one node from the outside, parallel inside. | β Implemented | π£ Advanced | β |
| Declarative System Scheduling (Track β DAG β Phase, Auto-DAG) | Systems declare per-component read/write access and a DAG-local phase; the scheduler auto-derives execution edges and rejects unsafe write/write or stale-read conflicts at Build(). | β Implemented | π΅ Core | β |
| Parallel Entity Processing (QuerySystem.Parallel) | Automatic multi-core chunking with a reusable PointInTimeAccessor (no per-chunk Transaction for non-Versioned writes) across four dispatch paths selected by Versioned-write Γ change-filter. | β Implemented | π£ Advanced | β |
| Reactive Dispatch: Change Filters & Run Conditions | changeFilter limits a system's entity set to dirty βͺ Added by piggybacking on the View's ring buffer; shouldRun gives a zero-cost proactive skip predicate evaluated before any input work. | β Implemented | π£ Advanced | β |
| Typed Event Queues | Single-producer ring-buffer queues for inter-system signalling within a tick, enabling reactive cascade chains that early-out cheaply when dormant. | β Implemented | π£ Advanced | β |
| Side-Transactions for Immediate Durability | Per-tick CreateSideTransaction(Immediate) lets a system commit economy-critical writes durably mid-tick, independent of and invisible to the main tick UoW's snapshot. | β Implemented | π£ Advanced | β |
| Overload Management | Single-writer overload state machine that escalates/de-escalates through system throttling and tick-rate modulation (TiDi, up to 6x) and fires a critical-overload callback for game-decided player shedding. | π§ Partial | π£ Advanced | β |
| Telemetry & Runtime Inspection | Always-on, zero-allocation ring buffer of per-tick/per-system telemetry inspectable from game code; a pluggable IRuntimeInspector hook for remote tooling is designed but not implemented. | π§ Partial | π£ Advanced | β |
| Spatial Tiers & Adaptive Dispatch | Per-cluster simulation tiers let systems process near entities every tick and far entities at reduced/amortized/dormant rates, scoping dispatch automatically to the matching clusters. | β Implemented | π£ Advanced | β |
| Β Β β³ Tier-Filtered & Amortized Dispatch | Scope a system to clusters in matching tier cells, and optionally process just 1/N of them per tick. | β Implemented | π£ Advanced | β |
| Β Β β³ Cluster Dormancy (Sleep/Wake) | Clusters untouched for N ticks sleep and are skipped by every dispatch path, waking within one tick of being written to. | β Implemented | π£ Advanced | β |
| Β Β β³ Checkerboard (Red/Black) Dispatch | Two-phase Red/Black parallel dispatch so neighbor-touching systems never race across a cell boundary. | β Implemented | π£ Advanced | β |
| Data-Driven Timers / Scheduled Entities | Documented pattern for modeling respawns/expiries as entities with a time-of-expiry component and a CallbackSystem poll; no built-in timer/scheduling infrastructure exists yet. | π Planned | π£ Advanced | β |
| Declarative Scheduling β Auto-DAG (RFC 07) | Directory-form restructuring of Declarative System Scheduling (above) into two sub-pages; exists on disk but was never linked from this table until now β see the flagging note below. | β Implemented | π£ Advanced | β |
| Β Β β³ Track β DAG β Phase Partitioning | Tracks order coarse execution stages, DAGs group independent dependency graphs, phases order systems within one DAG. | β Implemented | π£ Advanced | β |
| Β Β β³ Access Declarations & Build-Time Conflict Detection | Reads/Writes/ReadsFresh/ReadsSnapshot declare what a system touches; Build() derives safe ordering and rejects unsafe overlaps. | β Implemented | π£ Advanced | β |
| Tick Lifecycle & Transaction Management | Restructures content already covered above by Side-Transactions and the tick loop's Parallel Tick Fence into its own directory; exists on disk but was never linked from this table until now β see the flagging note below. | β Implemented | π£ Advanced | β |
| Β Β β³ Side-Transactions (Immediate Durability) | A transaction you open and commit from inside a tick system that becomes durable on its own, independent of whether the tick's main UoW ever flushes. | β Implemented | π£ Advanced | β |
| Β Β β³ Parallel Tick Fence (WriteTickFence) | Spreads the post-tick WriteTickFence step across the worker pool instead of running it serially on one thread. | β Implemented | π£ Advanced | β |
Flagging note: the last two entries (Declarative Scheduling β Auto-DAG, Tick Lifecycle & Transaction Management) are directory-form restructurings that duplicate content already covered earlier in this table (Declarative System Scheduling; Side-Transactions + Parallel Tick Fence). They exist as real, unlinked doc pages under
Runtime/; listed here for completeness per the source data, but they likely need consolidating with β or retiring in favor of β their originals rather than living on as permanent duplicates.
Resources
| Feature | Summary | Status | Level | Link |
|---|---|---|---|---|
| Resource Budget Configuration (ResourceOptions) | Startup-time configuration of fixed/growable resource limits (page cache size, max active transactions, WAL ring/segment sizing, shadow buffer, checkpoint thresholds) plus Validate() to check fixed allocations fit the total memory budget. | β Implemented | π΅ Core | β |
| Exhaustion Policy & ResourceExhaustedException | Typed exception for resource-limit hits; ExhaustionPolicy enum documents intent but isn't a runtime dispatch switch. | π§ Partial | π΅ Core | β |
| DI Registration & Wiring | Register Typhon services into IServiceCollection and have each one self-attach to the resource graph. | β Implemented | π΅ Core | β |
| Observability Bridge (Resources to OTel/Health/Alerts) | Consumer-side mapping of resource snapshots to OpenTelemetry metrics, health-check thresholds, and alert payloads. | π§ Partial | π£ Advanced | β |
Observability
| Feature | Summary | Status | Level | Link |
|---|---|---|---|---|
| Telemetry Configuration & Gating | Hierarchical, JSON/env-var-driven static-readonly bool surface (~200 flags) that the JIT dead-code-eliminates when off, gating both Activity tracing and the typed-event Profiler with zero overhead when disabled. | β Implemented | π’ Start Here | β |
| Distributed Tracing (Activity API) | Centralized ActivitySource and OTel-semantic attribute constants for correlating Typhon with a host's own OTLP trace. | π§ Partial | π΅ Core | β |
| OpenTelemetry Metrics Export | Observable-pattern OTel Meter exporters that snapshot internal state and expose it as gauges/counters for Prometheus/OTLP scraping. | π§ Partial | π΅ Core | β |
| Β Β β³ Resource Graph Metrics Bridge | Every Resource System node exposed as a standard OTel Meter for Prometheus/OTLP scraping. | π§ Partial | π£ Advanced | β |
| Β Β β³ ECS Metrics Exporter | Per-archetype EntityMap health and per-component-type transient memory as zero-cost OTel gauges. | π§ Partial | π£ Advanced | β |
| Resource-Aware Health Checks | Framework-agnostic ITyphonHealthCheck (Healthy/Degraded/Unhealthy worst-of-composite) backed by ResourceHealthChecker. | β Implemented | π΅ Core | β |
| Per-Domain Named Metrics Catalog | Documented target list of ~40 fixed-name OTel instruments (typhon.tx., typhon.wal., typhon.lock.*...) across 8 domains. | π Planned | π£ Advanced | β |
| Threshold-Based Resource Alerting | ResourceAlertGenerator raises Warning/Critical ResourceAlerts on health-state transitions, tracing root cause via a hardcoded wait-dependency graph. | β Implemented | π£ Advanced | β |
Errors
| Feature | Summary | Status | Level | Link |
|---|---|---|---|---|
| TyphonException Hierarchy & Catalog | Base TyphonException (ErrorCode + virtual IsTransient) rooted hierarchy giving callers three catch granularities, with a living catalog of every concrete exception type and a caller-owns-retry philosophy. | β Implemented | π΅ Core | β |
| IsTransient Retry Hint | A virtual IsTransient flag on every TyphonException hinting whether a retry might succeed, without the engine ever retrying on the caller's behalf. | β Implemented | π΅ Core | β |
| Timeout Exceptions & Deadline Propagation | Configurable, finite deadlines (TimeoutOptions, WaitContext) replace infinite-wait lock primitives, converting hangs into typed TyphonTimeoutException subclasses plus a bulk-load checkpoint timeout. | β Implemented | π΅ Core | β |
| Error Code Classification | A numeric TyphonErrorCode per failure, grouped into subsystem ranges (1xxx-8xxx) for logging/metrics dashboards β the exception type, not the code, is what callers catch on. | β Implemented | π£ Advanced | β |
| Resource Exhaustion Handling | ExhaustionPolicy metadata (FailFast/Wait/Evict/Degrade) documents how the engine reacts when a bounded resource is full β FailFast throws a structured ResourceExhaustedException (IsTransient=true), Wait resources throw a bounded TyphonTimeoutException subclass, never an unbounded hang or InvalidOperationException. | β Implemented | π£ Advanced | β |
| Storage & Corruption Exceptions | Typed failures for storage I/O, CRC32C page corruption (unhealable), and another-process database-file-lock detection. | β Implemented | π£ Advanced | β |
| Durability (WAL / BulkLoad / Commit) Exceptions | Typed, fail-fast failures from the WAL writer, the commit pipeline's durability wait, and BulkLoad session lifecycle. | β Implemented | π£ Advanced | β |
| Schema & Constraint Violation Exceptions | Engine-refuses-to-proceed failures for the data model: breaking schema mismatch, migration failure, revision downgrade, duplicate unique key. | β Implemented | π£ Advanced | β |
| Runtime/Scheduler Declared-Access Validation | DEBUG-only InvalidAccessException when a system writes a component it never declared via Writes<T>()/SideWrites<T>(), compiled out in RELEASE. | β Implemented | π£ Advanced | β |
Profiler
| Feature | Summary | Status | Level | Link |
|---|---|---|---|---|
| Profiler Session Lifecycle & Zero-Code Bootstrap | TyphonProfiler.Start/Stop (idempotent) manage the consumer/exporter threads and process-exit safety net; ProfilerBootstrap self-wires the whole session from typhon.telemetry.json + TyphonRuntime.Create with no host orchestration required. | β Implemented | π’ Start Here | β |
| Trace Export | IProfilerExporter fan-out: each attached exporter gets its own OS thread and bounded queue (drop-newest on backpressure, refcounted batches); file and live-TCP sinks cover offline post-mortem and real-time attach. | β Implemented | π΅ Core | β |
| Β Β β³ File-Based Trace Export (.typhon-trace) | Write the whole session to a versioned binary file for offline post-mortem analysis in the Workbench. | β Implemented | π΅ Core | β |
| Β Β β³ Live TCP Streaming Export | Stream a running session over TCP so the Workbench can watch a process tick-by-tick, right now. | β Implemented | π΅ Core | β |
| Configuration & Performance Tuning | typhon.telemetry.json / TYPHON__PROFILER__* env overrides drive independent static-readonly-bool gates per subsystem (JIT-eliminated when off); ProfilerOptions documents the consumer/drain tunables. | β Implemented | π΅ Core | β |
| Per-Tick Gauge/Metric Snapshots | One packed record per tick exposes memory, page-cache, WAL, and transaction counters to the trace viewer. | β Implemented | π΅ Core | β |
| Custom Application-Defined Spans | Reserved wire-format span kind (NamedSpan, ID 246) for app-defined span names β read/replay support exists, but no producer factory exists in TyphonEvent yet. | π Planned | π£ Advanced | β |
| GC Event Tracing | See every .NET garbage collection and EE-suspension pause on the same timeline as your transactions. | β Implemented | π£ Advanced | β |
| Unmanaged Memory Allocation Tracing | See every native (unmanaged) allocation and free on the profiler timeline, tagged by subsystem. | π§ Partial | π£ Advanced | β |
| Off-CPU Thread Scheduling Capture (Windows) | EtwSchedulingPump emits one ThreadContextSwitch record per closed on-CPU slice via the NT Kernel Logger, showing when and why Typhon threads left the CPU. | β Implemented | π£ Advanced | β |
| Integrated CPU Sampling (Statistical Call Tree) | In-process EventPipe SampleProfiler captures call stacks for the session, embedded as a trailer section and rendered as a dotTrace-style Call Tree. | β Implemented | π£ Advanced | β |
| Query Definition & Execution Export | Captures every View/EcsQuery's structural definition once per session plus per-execution args and call sites, correlated to the existing query span chain. | π§ Partial | π£ Advanced | β |
| Domain-Specific Tracing Instrumentation Expansion | Two-tier compile-time gated tracing rollout across nine engine domains (Concurrency, Storage, Memory, Data, Query, ECS, Spatial, Scheduler/Runtime, Durability, Subscriptions), zero cost when off. | π§ Partial | π£ Advanced | β |
Hosting
| Feature | Summary | Status | Level | Link |
|---|---|---|---|---|
| DI Engine Bootstrap Chain | Add*() extension methods on IServiceCollection that register and wire the engine's top-level singletons into a working DatabaseEngine. | β Implemented | π’ Start Here | β |
| Β Β β³ Singleton/Scoped/Transient Lifetime Variants | Every Add* with a lifetime choice ships as Add.../AddScoped.../AddTransient... twins sharing one factory delegate. | β Implemented | π΅ Core | β |
| Engine Options Configuration Surface | IOptions<T>-based configuration for engine services, set via configure delegates on each Add*() DI call. | β Implemented | π΅ Core | β |
| Β Β β³ Options Validation Hooks | AddOptions<T>().Validate(...) is wired on every options type but its predicate is a no-op stub today; ResourceOptions.Validate()/PagedMMFOptions.IsValid are the real, directly-callable fail-fast checks. | π§ Partial | π£ Advanced | β |
| Database Seeding | TyphonOptions.Seed(revision, tx => β¦) registers revision-stepped, crash-safe seed steps applied automatically at engine open β a fresh database runs them all, an existing one catches up on new ones. | β Implemented | π’ Start Here | β |
| Clean-Slate Database File Deletion | EnsureFileDeleted<TO>(IServiceProvider) resolves IOptions<TO> in a fresh scope and deletes the backing database file it points at. | β Implemented | π΅ Core | β |
| Profiler Launch Override Hook | AddTyphonProfiler(Func<ProfilerLaunchConfig,ProfilerLaunchConfig>) lets a host adjust the profiler launch config in code without giving up zero-code defaults. | β Implemented | π£ Advanced | β |
Internal β Engine Internals (for Contributors)
Every Internal feature, one line each β engine machinery with no direct application-facing API. Sub-features are indented under their parent with β³. Categories with no Internal-tagged features (Ecs, Querying, Transactions, Subscriptions, Runtime, Observability) are omitted below.
Foundation
| Feature | Summary | Status | Link |
|---|---|---|---|
| Reader-Writer & Resource Lifecycle Locks | CAS-only, allocation-free spin-locks every concurrent engine structure embeds for shared/exclusive or lifecycle access. | β Implemented | β |
| Β Β β³ AccessControl (full-featured RW lock) | 64-bit reader-writer lock with waiter fairness, in-place promotion, and contention tracking. | β Implemented | β |
| Β Β β³ AccessControlSmall (compact RW lock) | 32-bit reader-writer lock for thousands of embedded per-node/per-page latches with short critical sections. | β Implemented | β |
| Β Β β³ ResourceAccessControl (3-mode lifecycle lock) | 32-bit Accessing/Modify/Destroy lock where structural growth doesn't block concurrent readers. | β Implemented | β |
| Epoch-Based Resource Protection | Lock-free epoch/grace-period scheme that protects in-flight page-cache pages from eviction with 2 obligations per transaction instead of per-page ref-counting. | β Implemented | β |
| High-Resolution Timers | Self-calibrating sub-millisecond periodic timer services (three-phase SleepβYieldβSpin wait, drift-free metronome scheduling) used for the deadline watchdog, telemetry flush, and epoch advancement, exposing per-tick jitter metrics. | β Implemented | β |
| Β Β β³ Dedicated Timer (HighResolutionTimerService) | A single periodic callback on its own thread, isolated from every other timer in the engine. | β Implemented | β |
| Β Β β³ Shared Timer (HighResolutionSharedTimerService) | One thread multiplexing many periodic callbacks, each at its own rate, waking only when the soonest one is due. | β Implemented | β |
| In-Memory Hash Maps | Open-addressing, pinned-memory hash set/map types with backward-shift deletion and JIT-specialized hashing that replace .NET HashSet/Dictionary/ConcurrentDictionary on hot paths. | β Implemented | β |
| Β Β β³ Non-Concurrent HashMap<TKey[, TValue]> | Single-threaded open-addressing hash set/map replacing HashSet/Dictionary on a hot path, zero per-entry GC pressure. | β Implemented | β |
| Β Β β³ ConcurrentHashMap<TKey[, TValue]> | Striped, lock-free-read hash set/map replacing ConcurrentDictionary on a shared hot path, per-stripe CAS writes. | β Implemented | β |
| Page-Backed Linear Hash Map | O(1) exact-match key/value index, persisted in fixed-size chunks, with crash-safe rebuild instead of WAL logging. | β Implemented | β |
| Memory Allocators | Pinned/unmanaged memory primitives that give every page cache, segment, and hash-map structure stable, GC-immune addresses with parent-owned leak tracking. | β Implemented | β |
| Concurrent Bitmaps & Collections | Lock-free/CAS-guarded occupancy bitmaps (flat and 3-level) plus a pick/putback slot array for high-contention tracking. | β Implemented | β |
| Hardware-Accelerated CRC32C Checksums | SSE4.2/ARM-intrinsic CRC32C (Castagnoli polynomial) computation with software-table fallback (~1.3Β΅s per 8KB page) β the checksum primitive backing every page-integrity check in storage and durability. | β Implemented | β |
Storage
| Feature | Summary | Status | Link |
|---|---|---|---|
| Epoch-Based Page Protection & Dirty-Page Tracking | Epoch-tagged eviction safety plus the ChangeSet/DirtyCounter/ActiveChunkWriters/SlotRefCount protocol that pins modified or pointer-referenced pages until checkpoint write-back. | β Implemented | β |
| Page Allocation & Occupancy Tracking | A 3-level bitmap that allocates and tracks every 8 KiB page in the database file, growing the file automatically as needed. | β Implemented | β |
| Segment & Chunk-Based Allocation Engine | Multi-page directories and fixed-size slot allocation β the substrate every component, index, and revision chain is built from. | β Implemented | β |
| Pluggable Storage Backend (Persistent vs Transient) | One set of segment/index code, JIT-specialized per backend, so Transient components get heap speed for free. | β Implemented | β |
| Β Β β³ Persistent Store (MMF-backed) | The default backend β every durable component's segments run through the memory-mapped page cache at zero abstraction cost. | β Implemented | β |
| String Table Storage | UTF-8 string storage spread across linked fixed-size chunks, for strings too long to hold inline. | β Implemented | β |
Note: Transient Store (heap-backed), the other child of Pluggable Storage Backend, is Public β see the Public section above.
Durability
| Feature | Summary | Status | Link |
|---|---|---|---|
| A/B Protected-Page Slot-Pairing | Doublewrite-free torn-write protection for the meta page and segment-directory pages that crash recovery can't re-derive. | β Implemented | β |
| Rebuild of Derived Structures | Indexes, EntityMap, and occupancy are never repaired after a crash β they're discarded and rebuilt wholesale from the recovered primary data. | β Implemented | β |
| Formal Proofs & Invariant Rules | Durability correctness is gated on falsifiable artifacts β invariant rules, TLA+ specs, and a crash-simulation sweep β enforced in CI. | β Implemented | β |
Note: A/B Protected-Page Slot-Pairing and Rebuild of Derived Structures are sub-features of Checkpoint v2 and Crash Recovery respectively β both Public parents, listed in the Public section above.
Schema
| Feature | Summary | Status | Link |
|---|---|---|---|
| tsh Schema Shell Commands | Typhon Shell commands (schema-fields, schema-diff, schema-validate, schema-history, schema-export) exposing persisted-vs-runtime schema comparison and inspection as an interactive CLI on top of the engine schema APIs. | β Implemented | β |
| System Schema Persistence | Self-referential storage of component/field metadata as engine-internal ECS entities (ComponentR1/FieldR1) inside the database itself, loaded/saved via a minimal single-threaded CRUD layer (no MVCC/WAL) at engine open/create. | β Implemented | β |
| Workbench Per-Session Schema Loading & ALC Reload | Loads schema DLLs into a per-session collectible ALC so Workbench sessions can rebuild/swap binaries without restarting the host, classifying engine schema exceptions into Ready/MigrationRequired/Incompatible and rebinding component IDs by schema name across reloads. | β Implemented | β |
| Component Family Classification | Classifies a component into a semantic family (Spatial/Combat/AI/Inventory/Rendering/Networking/Input/Misc) via explicit attribute or name heuristic, for stable Workbench Data Flow grouping. | β Implemented | β |
Revision
| Feature | Summary | Status | Link |
|---|---|---|---|
| Chain Walk Correctness Under Compaction | The visibility walk scans the whole chain instead of breaking on the first too-new entry, because background GC compaction can reorder entries without changing their TSNs. | β Implemented | β |
| Revision Chain Storage | Per-entity, per-component circular-buffer chunk chain holding every live revision of a Versioned component, allocated on first write and grown on demand. | β Implemented | β |
| Crash-Recovery Chain Scrub & Orphan Sweep | Post-crash recovery step that collapses every Versioned chain to its single committed HEAD and frees unreachable revision-table chunks, guaranteeing pre-crash MVCC history never survives into the recovered base. | β Implemented | β |
Note: Chain Walk Correctness Under Compaction is a sub-feature of MVCC Snapshot Visibility, a Public parent listed in the Public section above.
Indexing
| Feature | Summary | Status | Link |
|---|---|---|---|
| Specialized B+Tree Key-Size Variants | Four key-width-specialized B+Tree implementations (16/32/64-bit and String64), automatically selected by an indexed field's CLR type. | β Implemented | β |
| Compound Move/MoveValue (field-update fast path) | Atomic remove+insert for indexed-field updates β one traversal, one lock on the common same-leaf case. | β Implemented | β |
| Temporal (Point-in-Time) Index Query | Reconstructs which entities held a key's value at a past TSN by replaying the index's append-only TAIL history. | π§ Partial | β |
| TAIL Retention / Garbage Collection | Bounds TAIL version-history growth via boundary-sentinel-preserving pruning β built and tested, not yet auto-triggered. | π§ Partial | β |
| Optimistic Lock Coupling (per-node concurrency) | Per-node OLC version latches give lock-free optimistic readers and leaf-only write latching for B+Tree/R-Tree index operations. | β Implemented | β |
| Index Diagnostics & Consistency Checking | Always-on per-instance contention counters plus an on-demand tsh structural walk to diagnose B+Tree contention and validate integrity. | β Implemented | β |
| B+Tree Node Layout and Capacity Tuning | Cache-line-aware 256-byte B+Tree node layout with per-key-type capacities, tuned through a multi-phase profiling effort. | β Implemented | β |
| Batched Index Maintenance for Bulk Commits | Commit-path rework that batches secondary-index updates per commit; accessor-reuse has shipped, sorted-key application has not. | π§ Partial | β |
Spatial
| Feature | Summary | Status | Link |
|---|---|---|---|
| Spatial R-Tree Index | Page-backed R-Tree attached to a component field, giving sub-microsecond AABB/radius/ray queries shared across every archetype that uses it. | β Implemented | β |
| Trigger Volumes (Enter / Leave / Stay) | Region entities diffed against the spatial tree(s) each cycle to emit Enter/Leave/Stay events at a configurable per-region frequency. | β Implemented | β |
| Interest Management (Delta Spatial Queries) | Per-observer "what changed near me" delta queries via an archived dirty-bitmap ring buffer, with full-sync fallback for stale observers. | π§ Partial | β |
| Cluster Spatial Queries | Per-cell broadphase + per-entity narrowphase AABB/Radius queries for cluster-eligible archetypes. | π§ Partial | β |
| Cluster Dormancy (Sleep / Wake) | Clusters with no component writes for N ticks sleep and skip dispatch entirely, waking within one tick of being touched. | β Implemented | β |
Note: Static / Dynamic Tree Separation, the only child of Spatial R-Tree Index, is Public β see the Public section above.
Resources
| Feature | Summary | Status | Link |
|---|---|---|---|
| Resource Tree & Registry | Hierarchical, fail-fast tree of every managed resource (8 fixed subsystem branches under Root) with cascade disposal and path-based navigation. | β Implemented | β |
| Resource Tree Mutation Notifications | NodeMutated event fires on every Added/Removed registration so consumers (e.g. Workbench live tree view) can react without polling. | β Implemented | β |
| Metric Reporting (IMetricSource / IMetricWriter) | Pull-based, zero-allocation interface for resources to expose 5 metric kinds β Memory, Capacity, DiskIO, Throughput, Duration β read by the graph on snapshot, not pushed on the hot path. | β Implemented | β |
| Owner-Aggregates Granularity Strategy | Architectural rule for what becomes a resource-tree node vs. what owning components aggregate and report on its behalf. | β Implemented | β |
| Debug Properties Drill-Down (IDebugPropertiesProvider) | Ad-hoc, allocation-tolerant dictionary of diagnostic key/value pairs for per-resource drill-down that's too verbose for the structured metric writer. | β Implemented | β |
| Snapshot & Query API | On-demand, consistent-enough tree-wide snapshot (IResourceGraph.GetSnapshot) with query helpers β GetSubtreeMemory, FindMostUtilized, FindByType, GetSubtree, GetNode β plus auto-computed throughput rates from the previous snapshot. | β Implemented | β |
| Β Β β³ Root-Cause Cascade Analysis (FindRootCause) | Trace a high-utilization symptom node back through a known dependency chain to find what's actually backed up. | β Implemented | β |
Errors
| Feature | Summary | Status | Link |
|---|---|---|---|
| Result<TValue,TStatus> Hot-Path Result Type | Zero-allocation dual-generic result struct for hot-path lookups that expect a miss β no exceptions, no boxing, no branch on access; used internally by B+Tree/MVCC hot paths, not surfaced through Transaction/Query call sites. | β Implemented | β |
Profiler
| Feature | Summary | Status | Link |
|---|---|---|---|
| Typed-Event Capture Pipeline | Any-thread ~25-50ns ref-struct span/instant emission into per-thread SPSC ring buffers, drained by a dedicated timestamp-sorting consumer thread; zero allocation, JIT-eliminated when disabled. | β Implemented | β |
| Built-in Engine Instrumentation Catalog | Automatic, no-app-code-required span/instant coverage of Scheduler, Transactions, ECS, B+Tree, Page Cache, WAL, Checkpoint, Statistics and Cluster Migration β 37+ wire-stable event kinds decoded by a shared TraceEventDecoder. | β Implemented | β |
| Span Source Attribution (Go-to-Source) | Every span optionally carries a compile-time-deterministic source location for one-click editor handoff and inline preview in the Workbench. | β Implemented | β |
| Lock-Contention Forensics (Deep Diagnostics) | Post-mortem visibility into which threads waited on which locks, for how long, and why. | π Planned | β |
Hosting
| Feature | Summary | Status | Link |
|---|---|---|---|
| Pluggable WAL I/O Backend (IWalFileIO seam) | AddDatabaseEngine resolves an optional internal IWalFileIO from the container so tests/benchmarks run the full WAL + checkpoint pipeline with zero disk I/O; the interface and implementations are internal, unreachable from application code. | β Implemented | β |
See also
This catalog favors practical orientation over deep internals: what a feature does, why it exists, and how to use it (Public), or just enough of how it fits together to orient a contributor (Internal). For other angles on the same engine:
doc/in-depth-overview/β implementation-level walkthroughs of engine internals (struct layouts, algorithms), organized to mirrorsrc/Typhon.Engine/'s folder structure.doc/guide/β a hands-on, task-oriented tutorial for building an application on Typhon end to end, without engine internals.