A big prospect asks whether two of their people can edit the same document, board or form at the same time. Your engineer says it is "just websockets". It is not. Sending changes in real time is the easy half. Deciding what the document looks like when two people change the same thing at once is the hard half, and it is where these projects run long.
The short answer: if live co-editing is a feature customers ask for but not the reason they buy, start with presence and locking, or use a sync library or service. Build a custom sync engine only when collaboration is the product and you have an engineer who has done it before.
What customers usually mean
"Real-time collaboration" covers very different features. Pin down which one is on the table before anyone estimates it.
| Level | What users see | Difficulty |
|---|---|---|
| Presence | Avatars of who else is viewing, maybe live cursors | Low |
| Locking | "Priya is editing this section", others wait | Low to medium |
| Live updates | Changes appear without refresh, last save wins | Medium |
| True co-editing | Two people type in the same paragraph and both edits survive | High |
In our experience, a lot of requests that start as "Google Docs-style editing" are satisfied by presence plus locking. People mostly want to avoid overwriting each other and to see that a colleague is there. Ask the prospect what went wrong the last time two people worked on the same record. The answer tells you which level they need.
Why true co-editing is hard
When two people change the same thing at the same moment, each of their screens briefly holds a different version. The system has to merge those versions so that everyone ends up with the same result, and the result makes sense to a human.
There are two families of solutions.
Operational transformation
Each edit is sent as an operation, and the server transforms incoming operations against ones that arrived first. This is the approach Google Docs is known for. It works, but every new kind of edit has to be reconciled against every other kind. Figma wrote that adding operations under this approach increases complexity quadratically, which is one reason they chose a different path, explained in their post on realtime editing of ordered sequences.
CRDTs
Conflict-free replicated data types are data structures designed so that edits can be applied in any order and still converge. Open-source libraries such as Yjs and Automerge package this up. Figma has described its own system as inspired by CRDTs rather than a pure one, with the server deciding the order of events, in how Figma's multiplayer technology works.
Either way, the merge logic is only part of the work. You also need offline edits that sync later, undo that does not undo someone else's change, permissions checked on every change, saving history, and a way to recover a document that got into a bad state. That last one is where weekends go.
The options, cheapest first
Presence and locking on your existing stack
Show who is viewing. Lock a record or section while someone edits it. Release the lock on save or after a timeout. A competent engineer can usually ship this in days to a couple of weeks, as a rule of thumb, using a simple real-time channel. We covered when that channel is worth adding in do you need websockets yet.
A sync library you host
Use an open-source CRDT library with a small server you run. You get correct merging without inventing it. You still own hosting, persistence, scaling the connection servers and permissions. This suits teams with real backend depth and a document-shaped product, such as a text editor, whiteboard or design tool.
A hosted collaboration service
Several vendors sell presence, storage and conflict-free sync as a service with client SDKs. You pay monthly, often by active users or connections, and ship faster. The trade-off is that your document state lives partly in their system, so check how you export it and what happens to your data if you leave.
A custom sync engine
Linear, Figma and Notion built their own because collaboration and speed are their product. That is the bar. If your company would not exist without multiplayer editing, and you can hire someone who has built one, this can be right. Otherwise it is an expensive way to learn what the libraries already know.
How to decide
- Name the level. Presence, locking, live updates, or true co-editing. Get the prospect to agree in writing.
- Check whether it is the product. If customers buy you for something else, buy or borrow the sync.
- Check the data shape. Free text and canvases suit CRDT libraries. Structured records with business rules, such as an order or an invoice, often suit locking better, because a merged result can be valid data and still break a rule.
- Price the exit. Whatever you pick, keep the source of truth in your own database or export it there regularly.
A worked example
This is an illustrative composite of a pattern we see.
A Series A workflow startup lost a deal because two users at the prospect overwrote each other's edits on the same form. The engineering lead proposed a six-week project to add Google Docs-style co-editing.
We asked what actually happened. Two people had opened the same record, and the second save silently replaced the first. The fix was presence avatars, a section lock, and a warning when the record had changed since you opened it. It shipped in under two weeks. The next three enterprise demos did not raise collaboration at all. The six-week project went back to the roadmap with a trigger: build true co-editing when a paying customer needs simultaneous typing in the same field, not before.
That is the general rule. Solve the lost-edit problem first. Build the hard version when the market proves it wants it.
If you are weighing a collaboration build and the estimates do not agree, a technical teardown is a good place to settle it. You can also book a call and bring the prospect's actual request.
FAQ
Is real-time collaboration just websockets?
No. Websockets move changes quickly. The hard part is merging simultaneous edits so everyone sees the same correct result, plus undo, offline edits and permissions.
What is a CRDT in plain terms?
A data structure designed so that edits from different people can be applied in any order and still end up the same. Libraries like Yjs and Automerge provide them so you do not build the merge logic yourself.
Should structured business records use co-editing?
Often not. For records like orders or invoices, locking or a "this record changed" warning is safer, because an automatically merged record can break a business rule.
When is building our own sync engine justified?
When collaboration is the core of the product, latency is a selling point, and you have an engineer who has built one before. Most startups are better served by a library or service.