I wonder if anyone here is interested in live collaborative editing? I'm building a collaborative environment for students. Currently we have a great simple chat implementation with history (Postgres) and presence (an agent), and even an admin panel where the teacher can follow the different groups (all rooms also broadcast to an admin channel). For collaborative editing, we embed an Etherpad in an iframe (later we'll also embed a wiki for them to work on their final project).
However, Etherpad is quite heavy (slow to load, heavy on the server), and it's also messy to have a bunch of prompts and then trying to extract certain responses etc. I would much rather have a bunch of text boxes, one per prompt, that they can edit collaboratively. I have read a bit about operational transforms, and it seems that it would be an ideal fit for Elixir and Phoenix Channels.
I was looking at what currently exists - share.js looks like it's the most reliable and well-used option. There's also another library called gulf. All these are written in node, with javascript front-ends. There are some implementations of OT in Erlang, but they seem quite "toy", for educational purposes -- and anyway, implementing a good javascript client is key. So I am thinking about trying to port one of the backends (share.js, gulf or another one) to Elixir.
It seems to me that removing the logic for handling channels, subscriptions etc, the actual meat of the matter is only around 400 lines of js, probably less in Elixir. Porting a backend would mean we could use an existing, tested front-end (and my Elixir is much stronger than my JS skills!).
Initially I'm mostly interested in only pure-text, small text pieces (not long documents), and few users - the simplest use case. However, if we could get that to work, I'd love to expand of course.
Reasons for not using existing node backends:
- would be fun if Elixir was faster/more scaleable
- integrates better with existing apps (ie. I want to be able to push/read text using Phoenix, react to events etc)
- no need to run additional servers
I'd love to hear if anyone has ideas, know about other projects/code that can be used, are interested in collaborating on something like this, etc. If we made something solid (even simple) it could be another killer feature for Elixir/Phoenix. (Imagine a simple OTP app that you can just add to your Phoenix dependencies, and you've got collaborative editing of any component you want).