This document specifies the authoritative system architecture, concurrency hierarchy, and execution invariants for CVL CORE. Low-level wire structures, packet byte offsets, look-ahead opcode tables, and coordinate bitfield masks are protected intellectual property and reside exclusively in private SDK headers (ProtocolConstants.cs and private client libraries).
CVL CORE is architected as an authoritative, single-threaded spatial micro-kernel decoupled from operating system socket multiplexing and background storage daemons. The architecture enforces a strict performance hierarchy: Lowest CPU Cycle Rate takes priority over Egress Bandwidth Optimization, which takes priority over RAM Utilization.
127.0.0.1:55557 designed to isolate auxiliary workloads from the core 30Hz simulation loop. While the core engine remains a domain-agnostic spatial tracker, deploying it for commercial applications allows developers to hook in custom microservices or mount first-party auxiliary daemons (such as relational database persistence and chat routers) without introducing tick-jitter overhead.CVLEngineAPI): Non-authoritative client SDK layer providing client-side prediction, 133ms historical snapshot ring-buffer interpolation, and coordinate space reconstruction.The engine enforces strict thread isolation to eliminate lock contention, thread migration overhead, and race conditions. Operating system socket descriptors, inter-process communication, and simulation state mutation execute across strictly partitioned execution boundaries.
+-----------------------------------------------------------------------------------+| CLIENT PRESENTATION LAYER || [ Presentation SDK: CVLEngineAPI ] || - Client-side prediction & unmanaged snapshot ring buffer interpolation (133ms)|+-------------------------+-----------------------------------^---------------------+ | 30Hz Telemetry | 15Hz Asymmetric v Ingress | Egress Stream+-------------------------------------------------------------+---------------------+| OPERATING SYSTEM & NETWORK REACTOR BOUNDARY || [ Connection Intake Gate ] [ Ingress/Egress Network Reactor ] || - Non-blocking TCP intake & socket ops - Non-blocking I/O demuxing || - IP rate-limits & Passive Boot Gate - Zero-copy buffer slicing |+-------------------------+-----------------------------------+---------------------+ | Accepted Descriptors | SPSC Ingress Conduits v v+-----------------------------------------------------------------------------------+| AUTHORITATIVE SINGLE-THREADED CORE || [ Simulation Orchestrator (30Hz Continuous Loop) ] || - Phase 1: Ingress Conduits Drain & Kinematics Collision Sweeps || - Phase 2: Amortized Entity Teardown & Stride Slot Reclamation || - Phase 3: Session Admissions, Staggered Persistence & Parity Audit || - State Substrate: Contiguous 64-Byte Memory Matrix |+-------------------------+-----------------------------------+---------------------+ | Outbound Egress Commands ^ v | Bridged RPC+-------------------------------------------------------------+ Frames || CRASH-ISOLATED OUT-OF-PROCESS SIDECAR IPC || [ Sidecar Event Broker ] <====== Loopback IPC ======> [ External Microservices ] || - Dedicated selector (Port 55557) - Databases / Ledgers || - 0.00ms Simulation Overhead - Chat & Auxiliary Daemons |+-----------------------------------------------------------------------------------+SO_REUSEADDR, TCP_NODELAY, SO_RCVBUF=16KB, SO_SNDBUF=256KB). Enforces IP rate limits, filters unauthenticated connection floods, and enqueues accepted socket handles to the TCP admission conduit without parsing binary payload streams.127.0.0.1:55557. Drains the sidecar ingress conduit and routes bidirectional IPC frames between external auxiliary service processes and the network reactor, isolating socket wait-states and external service latency completely from the 30Hz simulation loop.To eliminate runtime memory allocations, pointer indirection, and object garbage collection churn, entity state is stored within a pre-allocated contiguous C-memory slab matrix:
O(1) time.Spatial indexing runs natively inside the simulation loop without third-party physics engine overhead:
>>, <<, |).O(1) execution regardless of total world entity density.Network streams are decoupled into dedicated functional transmission classes and lock-free memory queues to guarantee that high-frequency positional telemetry never starves critical lifecycle states or discrete commands.
The Asymmetric Network Reactor slices incoming byte streams at the operating system boundary and routes raw payloads into five dedicated, lock-free Single-Producer Single-Consumer (SPSC) lanes:
127.0.0.1:55557, bypassing the 30Hz simulation thread entirely.BROADCAST_DIVIDER = 2), halving egress bandwidth while maintaining state freshness by overwriting older frames in place.127.0.0.1:55557. Disconnected or stalling sidecar services trigger an immediate fast-fail offline bounce without consuming cycles on the 30Hz simulation loop.The network reactor processes outbound network queues through a synchronized three-step loop:
Background worker threads are strictly forbidden from holding, mutating, or passing live domain entity references across thread boundaries. Communication across queue boundaries must strictly pass immutable primitive tokens (such as integer network IDs, connection handles, or raw byte slices). Domain object resolution and state mutations are strictly reserved for the single-threaded orchestrator on the primary application thread.
The use of dynamic inspection via runtime reflection is strictly prohibited across the engine core. Entities, sessions, and state models must enforce explicit slotted memory layouts to eliminate dynamic dictionary heap allocations. Silent fallback constants, empty exception blocks, and dictionary default fallbacks are forbidden; unhandled states must fail fast to prevent structural corruption of the simulation state.
Routines executing on the 30Hz simulation loop enforce zero runtime heap allocations. Dynamic string interpolation is prohibited on the hot path; diagnostic logging utilizes deferred evaluation protected by O(1) circuit breakers that suppress duplicate error cascades without disk I/O thrashing. For production Linux process lifecycle and systemd graceful signal-trapping requirements (KillSignal=SIGINT), see 10-Pillar Thread Execution Hierarchy.