Publish Subscribe for collaborative text editing

October 11, 2010

It’s a big title, but the technology behind a simple collaborative editing textarea can be simple and interesting.

By using a derivative work from pubsub_ws along with diff match patch, it was possible to broadcast patches (yes, the same kind of patches you can create with diff -a) between peers using websockets and javascript.

The most interesting part is that I’m not a js expert, but I built the entire stack only using this language, from frontend to backend. There is also a patch to enable diff match patch to be used from node.js.

Here is the code

Advertisements

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: