Skip to content
Back to shipped records
Client: Internal / Collaboration Tools/Industry: Collaborative Software/Engineering Lead:Hammad MajidHammad Majid

Dutxt

We built a collaborative text editor using Cloudflare Durable Objects to sync document edits in 45ms.

Key OutcomeRegional

editors sync changes in 45ms.

Key OutcomeA

single editor session supports 50 concurrent writers.

The Failure / Problem

System Bottlenecks

Synchronizing live document edits across users often requires maintaining a stateful server cluster or running heavy database poll loops, which increases hosting costs and editing lag.

The Resolution / Solution

Architectural Move

We built Dutxt on SvelteKit and Cloudflare Workers. We coordinate active editor connections using Durable Objects, keeping the document state in edge memory and syncing changes over WebSockets.

Execution Path

1

WebSocket Coordination: We wrote Durable Object code to manage socket connections and broadcast events.

2

Svelte Binding: We wired the frontend text area to sync caret positions and text ranges over the WebSocket socket.

3

Conflict Handler: We wrote a lightweight character-locking algorithm to merge concurrent keypresses.

"We wanted a clean notepad for shared meeting notes that loaded instantly. This updates in real time without lag."

— Aseef Ahmed, Product Designer

Core Stack

  • Svelte & SvelteKit
  • Cloudflare Workers
  • Durable Objects (Edge memory state)

Under-the-hood Challenge

Preventing data loss when users disconnect from the WebSocket. We solved this by writing the current Durable Object text buffer to a D1 database every 30 seconds, while serving the live edits from memory.

Dutxt shows that real-time document sync can run without a dedicated server cluster. Using Cloudflare’s serverless edge primitives lets us coordinate multi-user edits in memory at a fraction of the cost of legacy WebSockets hosting.

Have a system that needs scaling?Initiate Brief