A real time collaboration toy project based on WOOT. Implemented with node.js and ws.
JavaScript TypeScript Other
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
src
static
.gitignore
Jakefile.js
LICENSE
README.md
package.json

README.md

Real-time collaborative document editor

This is a server and client for a real-time collaborative document editor (aka a drastically simplified Google Docs). It's a prototype and not meant to be run in production. Also, it's written in node.js and Typescript, neither of which I had experience with when I built it.

My implementation is based on this paper [1]. Here's a GIF of it in action...

Gif of two documents

Running the code

  1. Install npm by downloading and installing node.js from here: https://nodejs.org/en/
  2. Run npm install in the repo's root directory
  3. Run $(npm bin)/jake build to build the client and server
  4. Run node static/compiled/js/server.js (yeah, it's wonky that server.js is in 'static')
  5. Visit localhost:3000 in a browser
  6. Start typing!

Project Status

I also don't plan to keep working on this. WOOT, as an approach, gets really slow unless you implement tombstone garbage collection (aka getting rid of text that users have deleted) which can only happen when everyone has disconnected from a document. I consider this an unacceptable user-experience for a collaborative document editor.

But there are lots of other ways to implement real-time collaborative editors! If you find this kind of stuff interesting and want to chat about it, let's meet up!

If you're looking for something to use in production, I recommend share.js.

Citations

  1. Gérald Oster, Pascal Urso, Pascal Molli, Abdessamad Imine. Real time group editors without Operational transformation. [Research Report] RR-5580, INRIA. 2005, pp.24.