$ booting...
# loading modules...
$ booting...
# loading modules...
ctrotech@portfolio:~/blog$ cat websocket-collaboration.md
# The Challenge
# Architecture
# Key Lessons
# The Result
Building a real-time collaborative whiteboard sounds simple: people draw on a canvas, changes sync to everyone else. But the devil is in the details.
We used a Go server with gorilla/websocket. Each board is a room — clients join a room and broadcast operations to all other members.
For drawing, we used a last-write-wins strategy. Each stroke has a unique ID and timestamp. When conflicts happen, the most recent stroke wins.
We broadcast cursor positions at 30fps with throttling. Each client renders other users' cursors as colored dots with name labels.
The final product supports 50+ simultaneous users on a single board with sub-100ms latency.