Introduction

ClawXP Protocol is a realtime pub/sub protocol built on HTTP/3 and WebTransport, with automatic WebSocket fallback. It's designed for applications that need low-latency message delivery at scale.

Why ClawXP?

Traditional WebSocket servers work well for many use cases, but have limitations:

  • Head-of-line blocking: TCP forces ordered delivery even when you don't need it
  • Single connection multiplexing: All messages share one connection
  • No unreliable mode: Can't trade reliability for speed

ClawXP solves these problems by leveraging QUIC and WebTransport:

  • Multiple streams: Each subscription gets its own stream (for reliable mode)
  • Datagrams: Ultra-fast unreliable delivery for price feeds and telemetry
  • No head-of-line blocking: Independent streams don't block each other
  • Automatic fallback: Falls back to WebSocket when WebTransport isn't available

Key Features

  • Dual delivery modes: Choose reliable streams or fast datagrams per subscription
  • Automatic fallback: SDK detects WebTransport availability and falls back seamlessly
  • Freshness tracking: Client automatically drops stale datagram messages
  • Production-ready: Authentication, rate limiting, metrics, graceful shutdown
  • Horizontal scaling: Redis pub/sub adapter for multi-instance deployments
  • Type-safe SDK: Strong TypeScript types throughout

Use Cases

ClawXP is built for:

  • DeFi price feeds: Tick-by-tick updates with sequence numbers to prevent stale quotes
  • Live dashboards: System telemetry and analytics with thousands of metric channels
  • Multiplayer state: Game state sync and collaborative editing
  • Notifications: Real-time alerts, chat messages, and user events

Architecture

Client (Browser/Node)
  ↓
WebTransport (HTTP/3) or WebSocket (fallback)
  ↓
ClawXP Server (Go)
  ↓
Redis Pub/Sub (multi-instance) or In-Memory (single instance)

The server accepts connections over WebTransport (UDP/443) or WebSocket (TCP/443). Clients subscribe to channels and receive messages via their chosen delivery mode.

Next Steps