Hello,
It's been a long time...
To be honest, I haven't worked much on this.
I've been following the Sugarizer project and I'm not exactly sure how
sugar web collaboration will continue.
Anyway, when I last tested some things 2 weeks ago regarding telepathy and
tried to setup a parallel websocket protocol for collaboration, I stumbled
upon some difficulties. Today I managed to fix some things in my code and
I'm hoping to get a second opinion.
As mentioned above, I've tried to set up a websocket protocol for activity
collaboration (including non-web activities and the mesh box/neighborhood
view). Sadly, I'm having difficulties with sugar's code, as there isn't a
good abstraction layer and telepathy is somewhat everywhere.in the code.
What I've currently managed is to just display the users in the
neighborhood view. I have yet to add support for invites in this new
protocol.
The problems I have are:
1. from sugar's core I can only know which activities are currently
running, while I need a list of only the shared activities (and their share
scope). Telepathy does this by having it's code both in sugar's core and in
sugar's toolkit.
2. In order for the two protocols to run parallel and to not have
duplicates on the meshbox, I'd need some sort of telepathy contact ID and a
buddy key (I have no idea where to get these from). Also, telepathy room
handles and buddy handles seem to be passed around between instances of
different types (this is what I meant by 'telepathy is everywhere in the
code').
I've tried to leave many comments in my code and there I've documented more
problems. Yet the above 2 are somewhat major and I'm not sure how to handle
them.
Here is my code:
Changes to gwebsockets, so it can have client functionality:
https://github.com/edudev/gwebsockets/
A web client that mirror's TogetherJS's server (it just replies the
messages): https://github.com/edudev/web-reply
Sugar (only neighborhood.py is important):
https://github.com/edudev/sugar/tree/webcollaborationframework
Cheers,
Emil Dudev
On Wed, Jan 22, 2014 at 1:07 AM, Daniel Narvaez wrote:
> On 20 January 2014 22:22, Emil Dudev wrote:
>
>> On Mon, Jan 20, 2014 at 10:33 PM, Daniel Narvaez wrote:
>>
>>> On 20 January 2014 13:53, Emil Dudev wrote:
>>>
On Mon, Jan 20, 2014 at 12:48 PM, Daniel Narvaez
wrote:
> * Why did you go with a separate web activity instead on integrating
> directly in the shell?
>
Integrating it directly with the current neighborhood?
>>>
>>> Not necessarily, I was also wondering why you didn't write the same
>>> thing in python inside the shell. But now I probably see, an activity was
>>> the only sensible place to put it if you wasn't merging with the telepathy
>>> view.
>>>
>>
>> I've got some plans rotating in my head to rebuild sugar entirely as a
>> desktop web app. It's subjective. I'll try to not think 'big'. When I have
>> some free time I'll work on integrating it with the current neighborhood.
>>
>
> sugar-web started from an experiment with a full rewrite of Sugar based on
> the Firefox OS backend. I find thinking 'big' to be a very useful way to
> generate ideas, then come back to the boring realities of backward
> compatibility and such :)
>
>
>>
>>
>>> One problem would be of duplicates if a user is both on the telepathy
neighborhood and this 'new' one.
As mentioned in the earlier messages, I was thinking of writing a
python class that would act as the client between the sugar's mesh and the
web socket server.
I wasn't sure how exactly to handle regular activities and web
activities in such a 'merged' neighborhood.
>>>
>>> I'm not sure to understand where we would get duplicates. It seems like
>>> the mesh view is a list of activities. The new framework will provide you
>>> another list. Isn't it just matter of merging the two? Even in the current
>>> view if the user is in two activities, I believe we show it two times.
>>> (Might very well be missing something!).
>>>
>>
>> As mentioned in the earlier messages, I was never able to get
>> collaboration between normal activities to work, so probably I'm missing
>> something.
>> From what I was able to get working with telepathy is that on the
>> network view (without the user doing/sharing anything), I can see all the
>> users in 'the neighborhood' (on the same jabber server). I see their
>> XOicons. These icons could be duplicated, as there would be an icon from the
>> jabber server and an icon from the web socket server for the same user.
>>
>
> Yes, I had forgot about XO icons which are not inside an activity. We
> could probably deduplicate those by keeping the telepathy id in the XO
> metadata for the new framework.
>
>
>> Besides the XO icons on the network view, I've heard rumors (and/or seen
>> pictures) of having shared activities next to a user's icon, having adhoc
>> /wifi networks on the view, having other things on the view.
>>
>
> I think it's more likely activi