docsapi referencedarkforest-core-cluster-tcpring
API Referencecrate: darkforest-coresince v0.1.0-alpha

TcpRing

Point-to-point ring communication channel connecting adjacent nodes over TCP sockets.

TcpRing

darkforest-core module: cluster since v0.1.0-alpha

Signature

rust
pub struct TcpRing { rank: usize, world_size: usize, left_peer: TcpStream, right_peer: TcpStream }

Overview

Point-to-point ring communication channel connecting adjacent nodes over TCP sockets.

Invariants & Design Principles

  • Invariant: TCP_NODELAY enabled to prevent Nagle buffering latency.
  • Invariant: Heartbeat polling detects dead workers within 500ms.

Usage Example

rust
let ring = TcpRing::connect("10.0.0.1:9000", rank, world_size)?;

Related Components