---
title: "Discussion on \"I Built a Real-Time Collaborative Whiteboard to Understand Stateful Backends\" | Hashnode"
description: "Discussion on \"I Built a Real-Time Collaborative Whiteboard to Understand Stateful Backends\". I built a real-time collaborative whiteboard to understand WebSockets, stateful backends, room state, broadcasting, and persistence."
url: "https://hashnode.com/posts/i-built-a-real-time-collaborative-whiteboard-to-understand-stateful-backends/6a9aa49b942b543f25d5f353"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [I Built a Real-Time Collaborative Whiteboard to Understand Stateful Backends](https://newsletter.anshumancdx.xyz/i-built-a-real-time-collaborative-whiteboard-to-understand-stateful-backends?utm_source=hashnode&utm_medium=feed)

I built a real-time collaborative whiteboard to understand WebSockets, stateful backends, room state, broadcasting, and persistence.

Sep 4 · 11 min read · newsletter.anshumancdx.xyz  
Read the article

-   [#websockets](https://hashnode.com/tag/websockets)
-   [#nodejs](https://hashnode.com/tag/nodejs)
-   [#turborepo](https://hashnode.com/tag/turborepo)

## Written by

[Anshuman Praharaj](https://hashnode.com/@anshcds)

@anshcds · India

  
[View profile](https://hashnode.com/@anshcds)

coffee and goofy ah code

Mostly MERN and Python Currently learning CS concepts and building things.

## Responses 4

Markdown supported · ⌘↵ to post

[Julian Neagu](https://hashnode.com/@julianneagulab)

[Sep 5](https://hashnode.com/posts/i-built-a-real-time-collaborative-whiteboard-to-understand-stateful-backends/6a9aa49b942b543f25d5f353/comment/6a9c1423f77e23f6360047bd)

the part about state clicked for me too. building the room map makes the whole websocket flow much easier to reason about

[Raunak Singh](https://hashnode.com/@raunakbuilds)

[Sep 5](https://hashnode.com/posts/i-built-a-real-time-collaborative-whiteboard-to-understand-stateful-backends/6a9aa49b942b543f25d5f353/comment/6a9c3c699ccbacac1dad4e15)

Splitting HTTP auth and history from WebSocket broadcast makes the architecture easy to follow. The next scaling challenge would be moving room membership out of a single process. Are you planning Redis pub/sub or sticky sessions first?

[Anshuman Praharaj](https://hashnode.com/@anshcds)

[Sep 5](https://hashnode.com/posts/i-built-a-real-time-collaborative-whiteboard-to-understand-stateful-backends/6a9aa49b942b543f25d5f353/comment/6a9c3c699ccbacac1dad4e15#reply-6a9c75996473ececd44c2a7b)

yes will using pub/sub for scale is ofc the next thing

[Raunak Singh](https://hashnode.com/@raunakbuilds)

[Sep 16](https://hashnode.com/posts/i-built-a-real-time-collaborative-whiteboard-to-understand-stateful-backends/6a9aa49b942b543f25d5f353/comment/6a9c3c699ccbacac1dad4e15#reply-6aaa47e37e86753e945323bf)

Nice. Redis pub/sub is a natural next step. I would keep room state behind a small adapter so you can compare in-memory and Redis implementations without changing the WebSocket handlers. That should make the scaling path easier to test.
