3

I am developing an application which requires real time collaboration. I am planning to use a cshtml text area to allow the users to type. Is real time collaboration achievable using a text area?

Also, I have read a little about operational transformation. Can it be achieved using .net framework?

I am just a beginner and do not have much knowledge about algorithms that will help me achieve real time collaboration. Any help will be appreciated.

Thanking you in advance.

Anil Tulsi
  • 392
  • 1
  • 10

3 Answers3

5

ShareJS is free, uses node.js to achieve what you are looking for, and implement a OT2 algorithm

For .Net there is no Operational Transformation out-of-the-box, however you can take a look to BeWeeBee SDK, (though is commercial software)

Jesus Salas
  • 541
  • 3
  • 8
  • ShareJS looks pretty cool - 4 lines of code to achieve what this question is asking for. Pity it's not a .net solution. – leggetter Jan 12 '12 at 13:50
  • Then, just now, BeWeeBee seems to be the right thing, at least is the unique .Net available implementation – Jesus Salas Jan 14 '12 at 00:48
4

I am developing an application which requires real time collaboration. I am planning to use a cshtml text area to allow the users to type. Is real time collaboration achievable using a text area?

This really depends on the user experience you want to deliver. If you want to lock the textarea for one user whilst the other is editing then that might not be the nicest user experience but it's most definitely relatively easy to do.

If you want two or more users to be able to simultaneously edit the same text area then sending data_changed events between the users is reasonably easy using a realtime web technology but you'll need to handle the synchronisation of the textarea content between the users and handle collision detections. The user experience for this is also much more complex.

Also, I have read a little about operational transformation. Can it be achieved using .net framework?

I had to look up operational transformation and it partially answers the question about the user experience - it's non-blocking. Having skim-read the wiki doc I'd ask the question: why would it not be possible? You can communicate instantly between all users/application to notify them of changes (as stated: using a realtime-web technology) so you just need to implement and manage all the clever algorithmic stuff :) (I don't know if there's a component that will manage that for you)

For self hosted .NET realtime web technologies you might want to look at SignalR, XSockets, SuperWebSocket or WebSync.

If you want to get up and running a bit faster you might look at a hosted realtime web technology

leggetter
  • 15,248
  • 1
  • 55
  • 61
0

This is an old question but there is some additional information that might be helpful. As previous answers mention, there are several options out there for text based data synchronization. Many of them based on Operational Transformation or CRDTs. These approaches are implemented in SDKs in many languages. (Full disclosure, I happen to be one of the authors of the Convergence).

However, you also need to take into account some of the other features required to implement collaborative editing. For example:

  • Presence: Who is there editing with you?
  • Collaboration Awareness: Things like shared cursors and selections?
  • Local vs. Group Undo: What happens when a user hits control-z? Are they undoing the last action they did, or the last action the other remote users did?
  • History: Knowing who did what is more complicated when multiple people are editing at the same time. When one user hits save (if there is a save) they may be saving actions performed by another user.

These are just a few examples of things to consider in collaborative editing beyond just data synchronization. When these questions come up, most answers focus solely on the data synchronization framework. At Convergence Labs, we help people work design collaborative editing applications and have implemented dozens of such apps. We have seen many times over that if all you put in is data synchronization, the user experience turns out to be pretty poor and users will not like the application.

So, in selecting a framework, look for something that helps you implement some of the other facets of real time editing, or at the least be prepared to implement them yourself on top of whatever tools you select.