Collaboration in SocialCalc
 Collaboration in SocialCalc
2. Audrey Tang is working on developing the multi-user editing, via visualizing peer's e-cells with colored borders. Please find her detailed notes and documentation on architecture and development as follows.
 Notes by Audrey Tang
Update 2009-10-29: Gave a talk on the 4hr-long implementation session at YAPC::Tiny tonight; slides are up at http://www.audreyt.org/hopscotch-yapctiny.pdf - You may recognize two people's pictures in it. :-)
Note also that at this stage this is a personal off-$work-time hack project; writings here are solely my personal opinion, not representative of commitments or decisions from the Socialtext team.
To enable collaborative editing in a general web setting, we're working with two different constraints compared to OLPC:
- The transport has to be reasonably cross-browser. In decreasing order of preference:
- Simple JS client over specialized server: nginx_http_push_module  looks good here.
- Complex JS client realizable in multiple client implementations, over multiple server implementatinos: Bayeux  is the prime candidate here.
- BOSH  is similar, but needs additional effort to tease apart the XMPP-specific bits.
- Adobe Flash messaging , which works very well, but browser support (e.g. iPhone) is not yet universal.
- There must be no accidental overwrites caused by multiple people entering into the same cell.
- We can visualize other peer's current cell via locked backgrounds, avatar icons, etc.
- Then, to solve it in a cheap-but-cheerful way, we can simply lock a peer-cell's focus.
- To be less strict, we can also allow focus into peer cells, but disable all "set text" calls on them.