Binary-First
Zero-copy DataView framing. No JSON overhead on the wire.
Handle 1000 realtime players with <20ms latency.
Replace Socket.IO with 70% less overhead.
Install via npm
npm install @painda/coreBinary Speed • Custom Schemas • Zero Polling Fallback
See how PaindaProtocol stacks up against traditional JSON-based WebSocket libraries like Socket.IO under heavy load (1000+ simulated users).
HTTP Polling Fallback + JSON Payload + Engine.IO overhead
Pure WebSockets + Custom Binary Schema (Zero Polling)
Not magic—just an obsessively optimized architecture built from the ground up for low latency.
PaindaProtocol encodes state into heavily packed binary frames using a shared schema, resulting in 70-90% smaller payloads than JSON. Smaller payloads = faster transmission & less serialization overhead.
Unlike traditional libraries that start with 3 RTT HTTP polling before upgrading, PaindaProtocol establishes a pure WebSocket connection immediately.
We cut out the generic transport wrapper. Painda routing is binary-native with a 16-byte custom header for lightning-fast routing and decoding.
Instead of sending the entire game state, PaindaProtocol automatically calculates state diffs (deltas) server-side and applies tight patches on the client.
Zero-copy DataView framing. No JSON overhead on the wire.
server.to("room").emit() • socket.emit() • once() — feels familiar, runs faster.
server.register(plugin) — lifecycle hooks, inter-plugin APIs, dependency management.
server.room<T>(id, state) — auto delta-synced, configurable diff algorithm, per-room auth.
Track who's online with metadata. Built-in diff-mode for minimal bandwidth.
Express-style server.use() for auth, validation, rate limiting — per namespace.
Missed messages + room memberships replayed automatically after reconnect.
Deep config: logger, compression, heartbeat, rate limits, reconnect strategies.
server.gracefulShutdown(5000) — notifies clients, drains, then closes cleanly.
server.getStats() → clients, rooms, namespaces, plugins, presence, uptime.
Multiplex /chat, /admin, /game over a single WebSocket connection.
State sync via binary diffs, not full objects. 100× smaller payloads for gaming.
One protocol. Install only what you need — everything runs through the same binary pipeline, fully typed.
@painda/corealways includedBinary engine, Server, Client, Plugins, Rooms, Presence, Middleware.
@painda/chatRooms, direct messages, broadcasting, and presence.
@painda/gamingDelta Engine — state sync via binary diffs at 60 FPS.
@painda/videoWebRTC signaling for low-latency P2P calls.
@painda/authToken-based authentication middleware with timeouts and guest mode.
@painda/persistenceAuto-persist messages to your DB with batch writes and metrics.
@painda/testingdevcreateTestEnv(), waitForMessage(), collectMessages() — test your PP apps.
npm install @painda/core @painda/gaming @painda/chat
Every Socket.io feature, plus binary speed and gaming tools they don't have.
No marketing fluff. Just technical answers.
Hard facts before empty promises. Each phase ships measurable results.