Summer of Code/2009/Groupthink

From Sugar Labs

Jump to: navigation, search

Contents

About you

Benjamin Schwartz

You know my e-mail address; I'm on the mailing list all the time.

bemasc

bemasc

English

Cambridge, MA

I have worked in open-source before. For example, I am the author of http://dev.laptop.org/git/projects/dobject/

About your project

Decentralized Asynchronous Collision-free Editing with Groupthink

To be blunt: Write is awesome, but not as awesome as it could be. There are three major problems with Write, but really, they're all the same problem. The first problem is that if the initiating user leaves the shared session (or their battery dies or ...), sharing will simply cease. Users may continue to edit, but their edits will not be shared over the network, even though Sugar continues to indicate that it is a shared activity session. The second problem is that Write is not tolerant to network disruptions. If the mesh network divides the group in two pieces for a few minutes, this will destroy the shared session, at least for those who've lost contact with the initiating node. Thirdly, Write provides no mechanism for working independently and then later merging changes. If two students begin editing a report together, then go to their separate homes and keep working, there is no automated way for them to merge their work the next day in school. Instead, they must use "copy and paste" to manually combine the versions.

To solve this problem, I will implement a completely decentralized, asynchronous text editing system. I will do this in [Groupthink http://dev.laptop.org/git/projects/dobject/], using the [StringTree http://dev.laptop.org/git/projects/dobject/tree/groupthink/stringtree.py] data structure that I have already written for the purpose. I still need to write a network serialization format, a disk serialization format, and a widget that is backed by the NetworkedStringTree.

Week 1: Write a widget, subclassing gtk.TextArea, that is backed by a StringTree Week 2: Extend this widget with callbacks that respond correctly when the StringTree is edited by someone else. (This is actually surprisingly difficult to do, and attempts to attack this problem often wind up in fields like [Operational Transformation http://en.wikipedia.org/wiki/Operational_transformation].) Week 3: Write a network protocol (using Groupthink's existing high-level network system, which runs over Telepathy's D-Bus tubes). Week 4: Write a simple activity containing the SharedTextArea widget over a SharedStringTree, and stress the system to debug live sharing. Week 5: Write a disk (i.e. Journal) serialization protocol. Ideally, this would just be the d-bus network protocol, marshaled into a bytestream, but the dbus-python interface doesn't expose marshaling. I wrote [a patch http://bugs.freedesktop.org/show_bug.cgi?id=19723] but demarshaling doesn't work, and smcv's been too busy to help me out with it. Pester smcv. Week 6: Figure out and implement the journal semantics necessary to allow users to edit things by themselves, then later join a shared session and have their local copy merged into the shared copy. (This may actually already be the case. Test, debug, and submit patches as necessary.) Week 7: Write documentation. Write a simple test suite. Write a SharedTextAreaWithSyntaxHighlighting and replace the widget in Pippy.

I've already done much of the work, and specifically the hard algorithmic part. I'm knowledgeable about the field, and about algorithms in general, having a degree in Mathematics with Computer Science.

You and the community

This project will be the first big step for Groupthink. It will establish Groupthink as a way for naive Activity authors to add reliable, robust sharing functionality to their activities just by importing the groupthink library and using the provided widgets and data structures.

I live in Cambridge, MA. A nearby deployment would certainly be appropriate, though I'm not sure where. One interesting place is the KIPP school in Lynn, MA. This is a high-intensity charter middle-school for low-income students. I showed them some XOs last year, and they were ecstatic.

I will continue work as before? I will ask the Gobby people (I found where they hide, and what algorithm they use (it's adOPTed)!).

I'll send even more traffic than usual to the mailing list, as I produce code that needs review or testing.

Miscellaneous

Oh yeah.

M. American M.

When I was about 12 I read Chaos by James Gleick. In the footnotes he had the equation for generating a Mandelbrot fractal. I opened up QuickBasic, started typing, and before long had my first mandelbrot generator. It was super-awesome.

Actually. At first it had a bug, and it took me a long time to figure out. The bug was that I had modified a value and then accessed it again, thinking I was getting the original value. That bug taught me about the need for temporary variables.

I'm down with O(L)PC (Yeah you know me!).

Personal tools
Namespaces
Variants
Actions
Sugar
Teams
Projects
Local Labs
Using the Wiki
Google Translations