metrics
●Active documents
~50 (study groups)
▼Autosave interval
30s (overwrite)↑
▼Rollback capability
None↑
●Average document size
25KB
architecture
Single Row Document Storage
+-----------+ Editor ->| Web/App | | Server | +-----+-----+ | | UPDATE documents v +-------------+ | PostgreSQL | | documents | | (text blob)| +-------------+ Autosave overwrites the only copy.
Entire document stored as one text blob in PostgreSQL
story
$cdstage_q1[1/7]
# Version History Without Regret
Your roommate begged for collaborative report writing. Three of you edit the same doc. Someone deletes the entire budget table at 2am. There is no undo button, only regret.
The app stores each document as a single text blob in PostgreSQL. Autosave runs every 30 seconds, doing UPDATE documents SET body = ... and obliterating whatever used to be there. When someone deletes the wrong paragraph, it is gone forever. You need version history so people can see what changed and roll back mistakes without storing every keystroke for eternity.
[?]
Do you need to replay every keystroke, or is a snapshot every 30 seconds good enough to say "oops, go back"?
$selectstrategy↑↓ j/k enter
→Keep overwriting the blob
Append full snapshots per save
Store edits as an operation log
Collaborative Document Editor|stage 1/7
▓░░░░░░14%
^→ nav|↑↓ select