Expand description
§WebIO Orchestration Engine
This module serves as the central controller for the WebIO framework. It manages the lifecycle of TCP connections, routing logic, and high-level features like Smart Asset Caching and Global WebSocket Broadcasting.
§Key Orchestration Features:
- Pre-emptive Multi-threading: Spawns a dedicated OS thread per connection, mimicking Go’s concurrency model but with Rust’s deterministic memory safety.
- Smart RAM Cache: Utilizes an
RwLock<HashMap>to provide ~50µs delivery for “hot” assets (<500KB) while keeping large datasets on disk to prevent RAM exhaustion. - Global Client Registry: Maintains a thread-safe
Arc<Mutex<Vec<TcpStream>>>allowing any thread to broadcast real-time data to all connected WebSocket clients. - Dynamic Nagle Control: Allows developers to toggle
TCP_NODELAYvia.set_nagle(), optimizing for either sub-millisecond API latency or high-throughput data syncs.
Re-exports§
pub use Method::*;
Structs§
- WebIo
- The central Application controller. Manages routing, middleware, and the internal TCP lifecycle.
Enums§
- Method
- Supported HTTP Methods.