[Sugar-devel] GSoC Groupthink Update: SharedTextDemo-4

Benjamin M. Schwartz bmschwar at fas.harvard.edu
Thu Jul 16 22:06:38 EDT 2009


Requires Sugar 0.82 or better.

This version adds support for automerge after offline editing.  User may start a
shared session, then edit separately, and when they come back together their
text will be combined automatically.  This is a strong form of "asynchronous

Talk to me if you would like your activity to gain this capability.

I've been instigating a lot of discussion lately about how asynchronous
collaboration, and in particular "re-joining" of shared activities, does work,
and should work.  I have noted several times that the current Sugar versions do
not seem to allow activities resumed from the Journal to join back together into
a shared instance, bringing their saved state with them.

As it turns out, this is not strictly true.  The Chat activity, for example,
will re-join perfectly when resumed from the Journal.  The problem is that the
sugar.activity.activity.Activity class, when resumed from the Journal, will
emit the 'shared' or 'joined' signal during __init__ ... but it is not possible
to register any gobject signal handlers until _after_ __init__, by which time it
is too late.  I was able to resolve this problem by overriding the share()
method to set a flag, which the activity can later check to determine whether
it initiated sharing or joined an existing shared session.

With this change
1. Any session saved in the Journal that was previously shared, will be shared
again with the same scope upon resume.
2. If there is an existing shared session visible with the same activity_id, the
activity will join that session.

This behavior is good enough for me.  However, it does preclude users from
working privately on the results of a shared session, unless they totally
deactivate their network connection.  I could add this ability to work
privately to groupthink's GroupActivity superclass, or it could be added to
sugar's Activity class.  A number of other interesting behaviors, such as
forking an existing document, are also unavailable in the present system.

Nonetheless, I feel that this is a solid start on the very old problem of
"asynchronous collaboration".  Given this promising development, my next step
may be to work on performance for shared text editing, in the hope that an
activity like Pippy might reasonably make use of this system.

More information about the Sugar-devel mailing list