[Sugar-devel] Collaboration support for sugar web activities
emildudev at gmail.com
Tue Jan 7 02:52:45 EST 2014
Thanks to Manuel Quiñones, I was able to check out in detail a Mozilla
project - https://togetherjs.org
It consists of a client side and a server side.
The server side acts only as a bridge between clients and it repeats
the messages it recieves. It's nothing complicated, nothing
interesting, I'll ignore that for now.
Once in a TogetherJS session, users can communicate with each other
(there is a chat offered by TogetherJS). User's pointers are also
shared (if desired). There also other features like audio chat and
video syncing, which are somewhat experimental (by what I understood
from the docs).
More importantly, except these features, the library comes with an
API, which will allow web activity authors to sync different objects
I've already started on integrating TogetherJS with sugar.
In order for two users to be in the same session, they must share one
togetherjs ID. I've based this ID sharing on telepathy - like the
current activity invites are sent.
After having the same ID, the session is then supported by the upper
mentioned server. Mozilla has offered such a server for public use,
but I do not think that sugar should be using it. I think that it
would be best if this is handled via telepathy, just like the current
activities communicate. As mentioned above, the server has no special
role other than receiving messages and sending them to all
An alternative would be to host such a server for sugar's needs (the
server is a single nodejs script). I do not like this way, as it would
cause web activities to depend on an Internet connection.
I hope that by the end of the week I can show a web activity having
collaboration support based on TogetherJS.
More information about the Sugar-devel