GSoC proposal: collaborative editor

Othmane Moustaouda othmane.moustaouda at gmail.com
Tue Mar 20 22:01:13 UTC 2012


Hi!

>From mailing list I have known that I have a "concurrent", good! A
little bit of competition will encourages both us to pull out the
best! :D

Returning to the project, after reading documents and after some
investigations now I have clearer ideas about how to implement it:
since is a plain text editor I have to focus only on the text content,
omitting details like font size, font type ecc., so I thought that
should be possible to manage the text's changes through a mechanism
based on diffs, i.e. each time an user makes a change to the shared
text, a diff will be generated and shared to all other participants.

In order to make this possible, in my vision, something like a
checksum is needed, to ensure that all participants are working on the
same text. Another key point is that one of participants must act as a
"central node", why? Because if, for example, due to a network issue,
one or more participants have a different version, what is the right
version on which to base the different others? Is the one hosted by
the participant that is acting as central node. Who can play this role
can be, for example, who has started the collaboration, or maybe
better, who has the fastest connection.

All these informations will be transmitted via a D-Bus Tube, I thought
that for this case a D-Bus Tube is more convenient for use than a
Stream Tube as it offers the possibility to handle events via signals
(for example an user login or logout, or a text modify).

About the diff part, since Qt doesn't offer something for generating a
diff between two strings, I have to use some kind of library that
offers a diff algorithm, searching I found  a very few of interesting
things, one of them is this (
http://code.google.com/p/google-diff-match-patch/ ) a very nice
library! I thought that maybe is better using a well known library
available already packaged?

I made an initial UI draft, it's very basic, something like a starting point
http://dl.dropbox.com/u/61029609/ui_draft1.png
a little graphical detail (adopted by almost collaborative editors)
could be that each participant will have its own color and every
addition made by him will have that color as background.

Surely I wrote something stupid, let me know please! :D


Othmane


More information about the KDE-Telepathy mailing list