Project 02 // Distributed Systems

NIMBUS
COLLABORATIVE WORKSPACE

A horizontally scalable real-time engine designed for sub-millisecond state synchronization across distributed nodes using Conflict-Free Replicated Data Types (CRDTs).

5,000+ Broadcasts/min
3 Dist. Nodes
< 1ms Sync Latency
90% Conflict Res.

System Architecture

hub

WebSocket Orchestration

Utilizing Socket.io with a Redis Pub/Sub adapter to maintain consistent state across multiple distributed server instances.

Module: Node-Sync-V2
merge_type

CRDT Resolution

Integrating Yjs to resolve concurrent multi-user edits through incremental binary updates, ensuring eventual consistency.

Engine: Yjs-Binary
draw

Workspace Surface

A unified Next.js environment integrating Milkdown and Excalidraw, providing both rich-text and visual collaboration surfaces.

Frontend: Turbo-React

THE STACK

Built for high-concurrency collaboration

javascript

Node.js & Socket.io

Primary runtime for the WebSocket microservice, handling complex sub-millisecond event loops for thousands of concurrent users.

database

Redis Pub/Sub

Acts as the message broker between distributed server nodes, ensuring every client receives updates regardless of which node they are connected to.

layers

Turborepo & Next.js

Monorepo architecture managing multiple workspace packages, ensuring type safety and shared logic across the collaboration stack.

CHALLENGES

State Desynchronization

Handling concurrent edits from users on slow connections without reverting their local changes.

WebSocket Scaling

Scaling beyond a single server instance while maintaining a unified room state across the cluster.

SOLUTIONS

  • check_circle
    CRDT Immutable Updates

    Using Yjs to broadcast ONLY the delta chunks, allowing the engine to merge changes mathematically rather than chronologically.

  • check_circle
    Redis Adapter Pattern

    Implemented a global event bus using Redis, allowing nodes to broadcast state changes to all other nodes in the cluster instantly.

terminal code display

READY FOR DEPLOYMENT.

Nimbus is engineered for high-density collaboration. Explore the distributed infrastructure or launch the workspace.