Clawde3Protocol
Lightning-fast realtime streams built on HTTP/3 (QUIC)
with automatic WebSocket fallback. Open source.
Quick Install
npm install @clawde3protocol/sdknpm install @clawde3protocol/protocolBuilt for demanding realtime workloads
The Clawde3 Protocol (C3P) delivers sub-millisecond message latency using HTTP/3 and QUIC, with automatic fallback to WebSocket when UDP is blocked.
Streams for truth
Reliable ordered delivery over QUIC streams. Critical messages arrive intact, in order, with backpressure control.
Datagrams for speed
Unreliable fast delivery for price feeds and telemetry. Client-side freshness tracking drops stale updates automatically.
WebSocket fallback
UDP blocked? No problem. SDK detects unavailable WebTransport and falls back to WebSocket with the same API.
Observability
Built-in Prometheus metrics, structured logs, and OpenTelemetry hooks. Know what's happening in production.
Streams vs Datagrams
Choose the right delivery mode for your use case. Use streams for reliable state sync, datagrams for high-frequency updates where freshness matters more than completeness.
QUIC Streams
- Ordered delivery guaranteed
- Reliable with retransmission
- Backpressure control
QUIC Datagrams
- Lowest possible latency
- May drop packets (by design)
- Client-side freshness filter
Automatic WebSocket Fallback
C3P automatically detects when WebTransport is unavailable and falls back to WebSocket. Your code stays the same.
Freshness Filtering
Every message carries a sequence number. The SDK automatically drops stale updates that arrive out of order, ensuring your UI always shows the latest state.
Freshness Filtering
Client-side sequence tracking drops stale updates
Simple, typed API
Connect, subscribe, receive. The SDK handles reconnection, resubscription, and stale message filtering automatically.
1 import { C3PClient } from '@clawde3protocol/sdk'; 2 3 const client = new C3PClient({ 4 url: 'https://your-server.com', 5 token: 'your-auth-token' 6 }); 7 8 // Subscribe to a channel 9 const subscription = await client.subscribe('prices:btc-usd', { 10 mode: 'datagram', // or 'stream' for reliable delivery 11 onMessage: (msg) => { 12 console.log('Price update:', msg.data); 13 }, 14 onStale: (count) => { 15 console.log(`Dropped ${count} stale updates`); 16 } 17 }); 18 19 // Publish to a channel 20 await client.publish('events:user-actions', { 21 action: 'click', 22 timestamp: Date.now() 23 });
Scale to millions
Start with a single server and in-memory adapter. Scale horizontally with Redis pub/sub for cross-region message delivery.
Built for demanding workloads
From financial trading to collaborative editing, C3P handles the most demanding realtime requirements.
DeFi price feeds
Tick-by-tick updates for trading interfaces. Datagrams deliver price changes in microseconds. Sequence numbers prevent showing stale quotes.
Live dashboards
System telemetry, analytics, and monitoring. Subscribe to thousands of metric channels. Redis backend scales horizontally.
Multiplayer state
Sync game state, collaborative editors, or real-time maps. Reliable streams guarantee state mutations arrive in order.
Notifications
Push alerts, chat messages, and user events. Rate limiting and backpressure keep your system stable under load.
Connect, Subscribe, Receive
Three steps to realtime data in your application. The SDK handles all the complexity.
Connect
Client attempts WebTransport over QUIC. Falls back to WebSocket if UDP is blocked or unavailable. TLS 1.3 encryption on both paths.
Subscribe
Send a subscription request. Server opens a dedicated stream or enables datagram delivery based on your chosen mode.
Receive
Messages arrive with sequence numbers. SDK handles reconnect, resubscribe, and stale message filtering automatically.
Ready to ship?
Install the SDK and connect to your first channel. Full documentation and examples included.