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 . Here's a GIF of it in action...
Running the code
- Install npm by downloading and installing node.js from here: https://nodejs.org/en/
npm installin the repo's root directory
$(npm bin)/jake buildto build the client and server
node static/compiled/js/server.js(yeah, it's wonky that server.js is in 'static')
localhost:3000in a browser
- Start typing!
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.
- Gérald Oster, Pascal Urso, Pascal Molli, Abdessamad Imine. Real time group editors without Operational transformation. [Research Report] RR-5580, INRIA. 2005, pp.24.