works/

distri-place2025

Distri-place recreates Reddit's r/place as a truly distributed system. The main goal wasn't just building a shared pixel canvas, but making it run across 3 separate physical machines while keeping everything in sync.

The system uses the Raft consensus algorithm to handle the hard parts of distributed computing: leader election, log replication, and fault tolerance. One node acts as the leader and handles all writes, while followers replicate the state. If the leader goes down, the remaining nodes automatically elect a new one and the system keeps running.

Clients connect through a load balancer and can draw pixels in real-time via WebSocket. Every pixel placement goes through Raft's commit process, meaning it's only confirmed once a majority of nodes agree. This gives strong consistency — all users see the same canvas state.

Built with Python (FastAPI), gRPC for node-to-node communication, and a simple HTML/JS frontend. The demo ran on university VMs with proper network separation between nodes.

Stack

Python, JavaScript

Source Code
distri-place