Why Did I Build This?
"Deploying distributed routing infrastructures across privacy-centric overlay networks (Tornet/Lokinet) requires a highly concurrent, secure signaling backbone. I engineered this orchestrator to serve as the centralized discovery and authentication registry. By eliminating heavy RDBMS dependencies in favor of in-memory state tracking, the system is designed for rapid deployment in resource-constrained or ephemeral environments where node churn is extremely high."
Architecture & Decisions
Built on the `tokio` async runtime utilizing the `actix-web` framework. Full-duplex WebSocket connections are managed concurrently using the Actor model via `actix_web_actors`. Global state (registered nodes, active proxies, and user credentials) is managed entirely in-memory leveraging `Arc<Mutex<HashMap>>` for thread-safe interior mutability. Access control is strictly enforced via custom JWT Bearer middleware and Bcrypt cryptographic hashing. Nodes must register using an environment-injected API key before authenticating over WS to announce their routing IP and port metrics.
Key Features
- 01.Full-duplex WebSocket Actor architecture for real-time proxy node telemetry, ping/pong health checks, and lifecycle management
- 02.Lock-contention mitigated in-memory concurrent state tracking using `Arc<Mutex<T>>`
- 03.Strict JWT-based bearer authentication middleware coupled with Bcrypt cryptographic hashing for node and user validation
- 04.Purpose-built API schema designed to synchronize IP/Port address mappings seamlessly with Tor and Lokinet routing configurations