<div dir="ltr"><div><div><div><div><div>Hi Emil,<br><br></div>first of all, I think having collaboration in sugar-web would be more than awesome, and I like the idea of using TogetherJS. The main question to me seems that of the interaction with the existing telepathy stuff.<br>
<br></div>I must say I'm not very familiar with it, but it's known to not be reliable. And putting another out-of-process communication layer on top of dbus feels bad.<br><br></div>So I'm wondering if it would be better to develop this as a separate collaboration framework, initially targeted at web activities only. I don't know the mesh view code very well but it seems like that would be the only place where the two systems would need to interact and merging the two data sources is, although annoying, probably not rocket science. That would also allow us to reuse the TogetherJS server.<br>
<br></div>The only real downside I see is that it doesn't cover the off-the-school-server case. Though does the current protocol really cover it, given how unstable it is? I wonder if a low-tech solution would cover the case more reliably even if not as transparently. Say, the teacher or one of the students runs the server and the rest connects to it.<br>
</div><div><div><br></div></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On 10 January 2014 21:10, Emil Dudev <span dir="ltr"><<a href="mailto:emildudev@gmail.com" target="_blank">emildudev@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div><div><div>After a lot of debugging of javascript, I'm finally able to show a small preview of what TogetherJS will look like.<br>
</div>The branches will be at the bottom.<br><br></div><div>
For testing purposes I've chosen the Get Things Done web activity.<br></div><div>The first thing I added to GTD was colors, so entries by different users can be distinguished. This is probably not the best way, but it's simple.<br>
</div><div>When you open the activity, you'll notice a new icon at the top. When you click on the icon, TogetherJS will start. You will notice it's panel at the right side of the screen. There you should have access to the chat and some user options (I've disabled the audio chat).<br>
</div><div>After TogetherJS has started, you can go to the network view and invite a user. Because this feature is not fully implemented, only the creator will be able to invite other users. Also, there will be little to no indication of an accepted invite.<br>
</div><div>When the other user accepts the invite, GTD will start and TogetherJS will start automatically, too. Since it's still in development, Mozilla's public hub server is used, and it may take a while for the connection to start. With me it takes about 10-15 seconds before the session starts.<br>
</div><div>After that, the users can begin collaborating. They can see their pointers (I've disabled click indication). The list should be synced. TogetherJS's chat is available the entire time.<br></div><div>Since GTD is simple, it was easy to setup list syncing. The code can be an example.<br>
</div><div>I've noticed some bugs in my syncing code, but it's nothing big and you can still see TogetherJS's capabilities.<br><br></div><div>About the code:<br></div><div>I've implemented only the bare minimum to get my tests working. Full support of sugar's invites is needed (indication of accepted invite, list of users on the shared activity...).<br>
</div><div>The code is full of different kind of notes (mostly TODO ones). This is just on this stage.<br></div><div>About the javascript code: I've added a file collaboration.js, which should be the interface between an activity and TogetherJS. The file I've created is... not good enough. Probably it would be best to integrate it with a Storage element, like it is done in dictstore. I have no idea how such an API would look like.<br>
</div><div>As noted above, currently Mozilla's hub server is used. I have plans to redirect this through telepathy, but I'll probably work on that next week.<br><br></div><div>A long email with lots of information. I've probably forgot to mention something. If there is something, I'll add it later.<br>
</div><div><br></div><div>Changes:<br></div>sugar-toolkit-gtk3: <a href="https://github.com/edudev/sugar-toolkit-gtk3/tree/collaboration" target="_blank">https://github.com/edudev/sugar-toolkit-gtk3/tree/collaboration</a><br>
</div>sugar: <a href="https://github.com/edudev/sugar/tree/collaboration" target="_blank">https://github.com/edudev/sugar/tree/collaboration</a><br>
</div>gtd-activity: <a href="https://github.com/edudev/gtd-activity/tree/collaboration" target="_blank">https://github.com/edudev/gtd-activity/tree/collaboration</a><br></div>togetherjs (This is not needed, it's just to show the changes I've made): <a href="https://github.com/edudev/togetherjs/tree/sugar" target="_blank">https://github.com/edudev/togetherjs/tree/sugar</a><br>
<div><div><div><br></div><div>Regards,<br></div><div>Emil Dudev<br></div><div><br></div></div></div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Jan 7, 2014 at 9:52 AM, Emil Dudev <span dir="ltr"><<a href="mailto:emildudev@gmail.com" target="_blank">emildudev@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello,<br>
<br>
<br>
<br>
Thanks to Manuel Quiñones, I was able to check out in detail a Mozilla<br>
project - <a href="https://togetherjs.org" target="_blank">https://togetherjs.org</a><br>
<br>
TogetherJS is a javascript library for... well, collaboration.<br>
<br>
<br>
<br>
It consists of a client side and a server side.<br>
<br>
The server side acts only as a bridge between clients and it repeats<br>
the messages it recieves. It's nothing complicated, nothing<br>
interesting, I'll ignore that for now.<br>
<br>
<br>
<br>
Once in a TogetherJS session, users can communicate with each other<br>
(there is a chat offered by TogetherJS). User's pointers are also<br>
shared (if desired). There also other features like audio chat and<br>
video syncing, which are somewhat experimental (by what I understood<br>
from the docs).<br>
<br>
More importantly, except these features, the library comes with an<br>
API, which will allow web activity authors to sync different objects<br>
from the page. Everything is controlled by javascript.<br>
<br>
<br>
<br>
I've already started on integrating TogetherJS with sugar.<br>
<br>
In order for two users to be in the same session, they must share one<br>
togetherjs ID. I've based this ID sharing on telepathy - like the<br>
current activity invites are sent.<br>
<br>
After having the same ID, the session is then supported by the upper<br>
mentioned server. Mozilla has offered such a server for public use,<br>
but I do not think that sugar should be using it. I think that it<br>
would be best if this is handled via telepathy, just like the current<br>
activities communicate. As mentioned above, the server has no special<br>
role other than receiving messages and sending them to all<br>
participating clients.<br>
<br>
An alternative would be to host such a server for sugar's needs (the<br>
server is a single nodejs script). I do not like this way, as it would<br>
cause web activities to depend on an Internet connection.<br>
<br>
<br>
<br>
I hope that by the end of the week I can show a web activity having<br>
collaboration support based on TogetherJS.<br>
<br>
<br>
<br>
Regards,<br>
<br>
Emil Dudev<br>
</blockquote></div><br></div>
</div></div><br>_______________________________________________<br>
Sugar-devel mailing list<br>
<a href="mailto:Sugar-devel@lists.sugarlabs.org">Sugar-devel@lists.sugarlabs.org</a><br>
<a href="http://lists.sugarlabs.org/listinfo/sugar-devel" target="_blank">http://lists.sugarlabs.org/listinfo/sugar-devel</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br>Daniel Narvaez<br>
</div>