u/Fun_Version7007

Hi Folks, If you are building something realtime and collaborative , I would love to deep dive into your ideas, POCs and application. Pls feel free to comment below.

reddit.com
u/Fun_Version7007 — 18 days ago

What are you building ?

Hi Folks, If you are building something realtime and collaborative , I would love to deep dive into your ideas, POCs and application. Pls feel free to comment below.

reddit.com
u/Fun_Version7007 — 18 days ago

Real-time collaborative systems are apps where multiple users can work on the same data at the same time and instantly see each other’s changes. Examples include Google Docs, Figma, and multiplayer whiteboards.

At a high level, the idea is simple: everyone shares the same state, and any change made by one user gets synced to all others in near real time.

How it works in a basic sense: a user makes a change on the client, that change is sent to a server, the server broadcasts it to other users, and everyone’s UI updates. This works fine until multiple users edit at the same time or someone goes offline.

The core problem shows up when two people edit the same thing at once. Without proper handling, you get overwritten data, flickering UI, or inconsistent states across users.

There are two main approaches to handle this. Operational Transformation transforms incoming changes based on other concurrent changes. It has been used in tools like Google Docs and works well but becomes complex as systems grow. CRDTs, or Conflict-free Replicated Data Types, take a different approach by designing data structures that can merge changes automatically without conflicts. This makes them easier to reason about in many modern systems.

A simple stack to get started could look like this. On the frontend, use React or any UI library, manage local state, and communicate using WebSockets. On the backend, use Node.js with Express and a WebSocket server like Socket.IO or ws. Start with in-memory storage and later introduce Redis for pub-sub when scaling. For the sync layer, begin with a naive approach like broadcasting full state or patches, then move to CRDT libraries such as Yjs or Automerge. For storage, use Postgres or MongoDB and persist document snapshots if needed.

Now the important part, where things break. Simultaneous edits will overwrite data if you do not handle conflicts properly. Network issues like disconnects, reconnects, and high latency require retry logic and state resynchronization. Messages can arrive out of order, so your system should aim for eventual consistency instead of strict ordering. Scaling becomes a challenge when one server is not enough, so you need pub-sub systems like Redis or Kafka. Sending full document state on every update will hurt performance, so move toward incremental updates. Presence features like cursors and user activity should be handled separately from the document state. Security is critical, never trust the client and always validate incoming updates.

Some key learnings from building these systems: start simple and build a naive version first to understand failure points. Most issues only appear when multiple users interact at the same time. Avoid building OT or CRDT systems from scratch unless you have a strong reason. Use existing libraries if your goal is to ship quickly. Keep document state, presence, and permissions as separate concerns. Small latency issues can make the entire experience feel broken.

A practical way to learn is to build a shared text editor step by step. First, sync plain text using WebSockets. Then add basic conflict handling. Finally, integrate a CRDT library like Yjs. By the end, you will have a solid understanding of how real-time collaborative systems behave in real scenarios. You can also explore Liveblocks which provides infra and APIs for realtime collaborative apps.

If you are exploring distributed systems or building collaborative tools, this is one of the most practical and high-impact areas to dive into.

reddit.com
u/Fun_Version7007 — 26 days ago

If you're trying to get into real-time systems, collaborative apps, or distributed systems like Figma or chat apps, here is a simple and beginner-friendly path that actually works.

Step 1: Build basic intuition without heavy theory

Start with content from ByteByteGo, Gaurav Sen, and Naseer Hussain. Also get a basic understanding of WebSockets.

Watch a few videos on WebSockets, chat system design, notification systems, and scaling basics.

The goal here is to understand how things roughly work.

Step 2: See a real-world system

Look into Figma’s multiplayer architecture.

Search for “How Figma multiplayer works”.

The goal is to understand how real-time collaboration actually happens, including cursors, syncing, and latency handling.

Step 3: Try a real tool or library (most important step)

Use tools like socket.io, Yjs, or Liveblocks.

Build something small such as a collaborative text editor, a shared canvas, or live cursor tracking.

The goal is to learn by building. You will learn more here than from theory alone.

Step 4: Understand what’s happening behind the scenes

Learn the basics of Apache Kafka and read about the Reactive Manifesto.

Focus on understanding event-driven systems, why systems use queues, and how services communicate with each other.

Step 5: Optional, if you want to go deeper into research

Learn about Conflict-free Replicated Data Types.

Read the paper “A comprehensive study of CRDTs”.

Focus on CmRDT (operation-based CRDTs) and CvRDT (state-based CRDTs).

This will help you understand how systems handle conflicts without central coordination.

Step 6: Only if you want serious depth

Read Designing Data-Intensive Applications.

This book ties everything together, including distributed systems, consistency, and stream processing.

TL;DR path

  1. Watch system design videos

  2. Study Figma multiplayer

  3. Build something using Yjs or Liveblocks

  4. Learn basic backend and event-driven systems

  5. Read about CRDTs (CmRDT vs CvRDT)

  6. Go deeper only if needed

Most people get stuck trying to learn everything first.

Build first, then go deeper.

u/Fun_Version7007 — 27 days ago