Shoal Transfer Protocol (Blatant copy of TTP)
  • Rust 56.5%
  • TypeScript 43.5%
Find a file
2026-05-09 00:41:12 +02:00
api Traits 2026-04-30 13:49:25 +02:00
core Insecurities 2026-04-30 19:30:54 +02:00
file-transfer Some more 2026-04-30 16:08:54 +02:00
native [DEL] Removed useless print 2026-05-09 00:41:12 +02:00
web Creation 2026-04-28 18:49:17 +02:00
.gitignore Intial Commit 2026-04-28 16:50:49 +02:00
bun.lock Creation 2026-04-28 18:49:17 +02:00
Cargo.lock [Add] Http/s Server & client 2026-04-28 19:36:48 +02:00
Cargo.toml [Add] Http/s Server & client 2026-04-28 19:36:48 +02:00
eslint.config.ts Intial Commit 2026-04-28 16:50:49 +02:00
LICENSE Intial Commit 2026-04-28 16:50:49 +02:00
package.json Intial Commit 2026-04-28 16:50:49 +02:00
README.md Connector 2026-05-04 22:16:47 +02:00
stp-codec.json API 2026-05-05 22:28:02 +02:00
tsconfig.build.json Intial Commit 2026-04-28 16:50:49 +02:00
tsconfig.json Intial Commit 2026-04-28 16:50:49 +02:00

STP - Shoal Transport Protocol

STP is a lightweight transport-layer library for inter-process communication within the Shoal system.

What it Does

STP defines transport primitives and reference behavior for:

  • Message delivery between Shoal components
  • Connection management
  • Optional congestion control
  • Training coordination (heartbeats, progress, checkpoint metadata)
  • Gradient synchronization signals

Training Communication Types

STP extends for training pipeline with:

  • CommunicationType::training_progress - Pod reports TrainingMetrics (step, loss, throughput, GPU memory)
  • CommunicationType::checkpoint_uploaded - Pod notifies Hatchery of checkpoint save
  • CommunicationType::resource_report - Pod reports available VRAM, storage, mode state
  • CommunicationType::training_control - Hatchery sends Start/Pause/Resume/Abort/CheckpointNow

How to Use

Core - Communication Values

The core defines a CommunicationValue with:

  • Communication Type - Identifies the type of message
  • Sender ID - Optional identifier of sender
  • Receiver ID - Optional identifier of receiver
  • Message ID - Optional unique message identifier
  • Data Value - The payload (Container, Array, Boolean, Number, String, or Null)

DataValues are constructed from DataTypes (1-byte arbitrary mappings). See core/src/data_types.rs for standard mappings.

Native - WTransport Communication

The native crate provides inter-process communication via WTransport:

Host - Accepts client connections:

let host = Host::new(addr);
while let Ok((sender, receiver)) = host.next().await {
    // Handle connected client
}

Client - Connects to host:

let client = Client::new();
let (sender, receiver) = client.connect(addr).await;

Connection - Split into Sender/Receiver pairs for bidirectional messaging.

API

The api/ crate provides Axum server integration for STP communication.

Web

The web/ crate provides JavaScript/Node.js implementations.

Architecture

stp/
├── core/      # Protocol logic (pure Rust, platform-agnostic)
├── native/    # WTransport integration
├── api/       # Axum HTTP server
└── web/       # JavaScript/Node client