8

I am trying to build a rails app that's basically just a text-editor (with some additional features I can't find anywhere else - which is why I'm building it)

One of the core features is live concurrent editing, or real-time collaborative editing (whatever you want to call it).

So far I have set up the site with a plugin called Juggernaut. This gives me the ability to send, either from a client or the server, any Javascript I want to every other client. So when someone types something I can send what that person has typed to every other client, without the other clients having to poll the server.

The problem I have boils down to me not knowing what algorithm to use for solving conflicts and doing this the best way possible. I have read up a bit on Operational Transformation, but just simple don't know how to sensibly implement it with the Javascript/Rails-solution I have now.

I want something like OT, but don't know how to implement it and don't know where to start. Any help on how to implement this would me very happy!

Georg Fritzsche
  • 97,545
  • 26
  • 194
  • 236
Fredrik
  • 4,161
  • 9
  • 28
  • 31

5 Answers5

4

Take a look at MobWrite

Devon_C_Miller
  • 16,248
  • 3
  • 45
  • 71
  • I had not seen this, as I understand it Bespin is using MobWrite, so I'm definitely gonna take a look at this! – Fredrik Sep 22 '09 at 20:48
4

I think that Google has (or will soon release), the OT logic of Wave as open source.

Maybe check the Wave Protocol Open Source project.

mjv
  • 73,152
  • 14
  • 113
  • 156
0

Have you seen Bespin by Mozilla? For inspiration I mean -- I understand that you're using Rails.

Ates Goral
  • 137,716
  • 26
  • 137
  • 190
0

While this is not a complete answer you could have a very interesting insight on how Google Wave does it here:

http://www.youtube.com/watch?v=3ykZYKCK7AM

OscarRyz
  • 196,001
  • 113
  • 385
  • 569
0

I was looking for something like this and I stumbled upon sharejs. Hope this helps.

linud
  • 1
  • 2