[Sugar-devel] Thoughts on Collab

Sam Parkinson sam.parkinson3 at gmail.com
Sun Jul 24 06:15:42 EDT 2016

Hi Lionel,

I like the experience that you have made with Sugarizer collab.  It is 
very smooth!

I think that Sugar would probably do a few things differently though.  
I want to support serverless collaboration.  I have a few reasons for 

*  Some friends go to the library after school to work on their 
assignment.  They both connect to the library wifi.  Because they are 
on the same wifi, they see each other highlighted in the neighbourhood 
view.  They collaborate over LAN, giving them a significantly more 
snappy experience.
*  The reduced latency also suppresses most of the edge cases in the 
application that would have resulted in the documents getting out of 
*  A group of teachers from a collection of schools (sometimes called a 
"network") meet up for PL/PD.  Collab just works, even though they are 
from different schools (which have different servers)

Do they seem reasonable?

Going a bit more in the weeds, I would probably make 1 change to the 
neighboured model, compared to you great implementation!  My plan is 
that every activity, public and private is boradcast on the server.  
All broadcast activities share their "activity_id", but only the public 
activities also share their title, type and description.  This would 
let us make the "resume shared activity" feature work; resuming an 
activity now becomes checking if the activity is broadcast then either 
joining the broadcast activity or just resuming it normally.  I think 
this is the type of experience users expect after things like google 


On Sun, Jul 24, 2016 at 6:09 PM, Lionel Laské <lionel.laske at gmail.com> 
> Hi Sam,
> I suggest you to have a look on Sugarizer Server.
> Features 1) and 2) are already implemented and could be used into 
> several Sugarizer activities (Chat, Paint, Memory, ...). Plus the 
> Sugarizer Server is already include in XSCE, thanks to Tim.
> You could test the implementation here [1] (use 2 browsers to test 
> it) and see more information on Server implementation here [2]. 
> Finally most of the code, based on Web Socket, is here [3][4].
> Best regards from France.
>           Lionel.
> [1] http://server.sugarizer.org
> [2] https://github.com/llaske/Sugarizer#server
> [3] https://github.com/llaske/sugarizer/blob/master/server/presence.js
> [4] 
> https://github.com/llaske/sugarizer/blob/master/lib/sugar-web/presence.js
> 2016-07-24 2:36 GMT+02:00 <sugar-devel-request at lists.sugarlabs.org>:
>> Date: Sun, 24 Jul 2016 10:36:00 +1000
>> From: sam at sam.today
>> To: Sugar-dev Devel <sugar-devel at lists.sugarlabs.org>, Abhijit Patel
>>         <abhisandhyasp.ap at gmail.com>
>> Subject: [Sugar-devel] Thoughts on Collab
>> Message-ID: <1469320560.1907.0 at smtp.gmail.com>
>> Content-Type: text/plain; charset="utf-8"; Format="flowed"
>> Hi All,
>> In the irc meeting 2 nights ago, we discussed adding collaberation to
>> the journal project feature.  Abhijit has spent around 3 weeks 
>> working
>> on it.  But we can't even get a text channel between the 
>> participants.
>> Telepathy is painful, buggy (we have a segfault in salut) and hard to
>> debug.  It is also unmaintained - the last commit to telepathy salut
>> and gabble was 2 years ago.
>> So this is the pre-text for an experiment; modernising the
>> collaboration stack without using telepathy.
>> Initially, I proposed Matrix.Org.  I don't support this idea any 
>> more,
>> as matrix.org has some very messaging specific features, and some 
>> spots
>> where sugar would not fit idiomatically within the api.
>> So I have been thinking a little more about splitting up the problem
>> into 3 sections:
>> 1)  A neighbourhood view implementation - a model to discover people
>> nearby or via the school server
>> 2)  A group messaging socket - the backbone for collaboration in
>> activities
>> 3)  A one-to-one file transfer mechanism - used for initial state 
>> sync
>> in activities, "send to" feature in journal, etc
>> I have think that we can do the neighbourhood view by using 2 
>> backends
>> and merging the result.  We can use the Avahi api to publish/find
>> activities/buddies on the local network.  We could additionally use a
>> school server (running a custom sugar server app) to support buddies
>> who are not on the same network.  Since both activities and buddies
>> have unique identifiers, we can easily have both back-ends running at
>> the same time, and de-duplicate the result.
>> Avahi is very fun to work with:
>>     avahi-publish-service "Sam P" "_org_sugarlabs_collab_user._tcp"
>> 8080 "name=Sam P" "color=#fff,#000" "other_metadata=other_value"
>>     avahi-discover
>> All of the backends could give us an ip and a port to reach the other
>> person.  For the avahi backend, this would be a direct connection to
>> the other buddy.  For the schoolserver, it would be proxied through 
>> the
>> schoolserver.
>> I'd love to hear your thoughts on the other problems, and on this
>> problem to.
>> Thanks,
>> Sam
>> -------------- next part --------------
>> An HTML attachment was scrubbed...
>> URL: 
>> <http://lists.sugarlabs.org/archive/sugar-devel/attachments/20160724/569b6610/attachment.html>
>> ------------------------------
>> Subject: Digest Footer
>> _______________________________________________
>> Sugar-devel mailing list
>> Sugar-devel at lists.sugarlabs.org
>> http://lists.sugarlabs.org/listinfo/sugar-devel
>> ------------------------------
>> End of Sugar-devel Digest, Vol 93, Issue 50
>> *******************************************
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sugarlabs.org/archive/sugar-devel/attachments/20160724/2b11fe25/attachment-0001.html>

More information about the Sugar-devel mailing list