Clawde3Protocol

Lightning-fast realtime streams built on HTTP/3 (QUIC) with automatic WebSocket fallback. Open source.

<1ms
Latency
100%
Open Source
0
Vendor Lock-in

Quick Install

npm install @clawde3protocol/sdk
npm install @clawde3protocol/protocol

Built 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

1234
  • Ordered delivery guaranteed
  • Reliable with retransmission
  • Backpressure control
Best for:State sync, transactions, chat

QUIC Datagrams

  • Lowest possible latency
  • May drop packets (by design)
  • Client-side freshness filter
Best for:Price feeds, telemetry, gaming

Automatic WebSocket Fallback

C3P automatically detects when WebTransport is unavailable and falls back to WebSocket. Your code stays the same.

ClientSDKWebTransportHTTP/3QUIC/UDPUDPblocked?NoWebSocketHTTP/1.1TCPYesC3P ServerSame APIPrimary (WebTransport)Fallback (WebSocket)
Auto-detection
SDK probes for WebTransport support
Seamless switch
Same API, no code changes needed
Always secure
TLS encryption on both paths

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

0ms20ms40ms60msstale threshold#1#2#3#4#5#6#7#8#9#10Message Sequence
8 / 10
Updates accepted
2 / 10
Stale updates dropped
Fresh (accepted)
Stale (dropped)
Freshness threshold

Simple, typed API

Connect, subscribe, receive. The SDK handles reconnection, resubscription, and stale message filtering automatically.

app.tstypescript
1import { C3PClient } from '@clawde3protocol/sdk';
2
3const client = new C3PClient({
4 url: 'https://your-server.com',
5 token: 'your-auth-token'
6});
7
8// Subscribe to a channel
9const 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
20await 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.

ClientsClientClientClientClientClientC3P ServersEdge ServerWebTransport + WSRegion: US-WestEdge ServerWebTransport + WSRegion: EU-CentralBackend (Optional)RedisPub/SubCross-region syncQUIC/WSSyncHorizontal Scale1M+connections
Single Instance
In-memory adapter for simple deployments. No external dependencies.
Multi-Region
Redis pub/sub syncs messages across edge servers globally.
Auto-Discovery
Clients connect to nearest edge. Failover is automatic.

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.

1

Connect

Client attempts WebTransport over QUIC. Falls back to WebSocket if UDP is blocked or unavailable. TLS 1.3 encryption on both paths.

2

Subscribe

Send a subscription request. Server opens a dedicated stream or enables datagram delivery based on your chosen mode.

3

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.