Abi Word Abi Collab Real Time Document collaboration
Abi. Word & Abi. Collab Real Time Document collaboration Martin Sevior School of Physics University of Melbourne Director and co-founder, Abi. Source B. V. 3/2/2021 M. Sevior CHEP 2010 1
Abi. Word • Full Featured, Open Source, Cross Platform, Word Processor • Linux (unix), Windows, (99% completed OSX) 3/2/2021 M. Sevior CHEP 2010 2
What is Abi. Collab? Abi. Collab allows real time collaboration between arbitrary numbers of Abi. Word sessions. Very useful for collaborative document creation. Physicists working on a joint document. Abi. Collab can operate without a server and without locking. Abicollab. net webservice – central document repository Abi. Source B. V. a company formed to commercialize Abi. Word & Abi. Collab 3/2/2021 M. Sevior CHEP 2010 3
Abi. Word Model Doubly linked list of objects with definite position and length 3/2/2021 M. Sevior CHEP 2010 4
Basic Idea The Model communicates via opaque "Listeners" 3/2/2021 M. Sevior CHEP 2010 5
Change. Records (CRs) CRs are emitted by each PT object as it is created, destroyed or changed. Each CR identifies where it operates with a position. These are broadcast to every Listener attached to the PT. Abi. Collab serializes the CRs and transmits them to the remote session. The remote session interprets the de-serialized CR and applies the change to it's local model. 3/2/2021 M. Sevior CHEP 2010 6
Core Principles of Abi. Collab Documents must always be identical. Users should not be surprised. 3/2/2021 M. Sevior CHEP 2010 7
Network Connections. From the start Abi. Collab was designed to be able to be used without a server. This allows direct connections and no locking. We designed a flexible transport API which allows different transports. So Far: XMPP (Jabber) via the loadmouth library Direct TCP connections using the ASIO library Telepathy connections XMPP via jabber server Webservice http: //abicollab. net 3/2/2021 M. Sevior CHEP 2010 8
Problems 1. 2. 3. 4. Internet lag Undo/redo Complex Operation Collisions 3/2/2021 M. Sevior CHEP 2010 9
Issue #1 - Internet Lag Can loose synchronization because of finite propagation time. Suppose Bob enters "i" and Alice enters "e". Alice generates a CR "Insert. Text, at 12, 'e' " Bob generates a CR "Insert. Text, at 6, 'i' " 3/2/2021 M. Sevior CHEP 2010 10
Internet Lag - Solution Record the CR number Position and the PT size change – "Adjustment" Send this info to remote session - along with the last CR number received from the remote Session Upon receiving a CR look at the last remote CR received. Adjust the position of application for the changes to the local document not seen by the remote. 3/2/2021 M. Sevior CHEP 2010 11
Alice and Bob have both generated 6 CR's Alice generates a CR "Num 7 Insert. Text, at 12, 'e', Rec 6" Bob generates a CR "Num 7 Insert. Text, at 6, 'i', Rec 6 " Bob receives Alice's CR "Rec 6" - she hasn't seen his CR 7 His CR 7 inserts at pos 6, which is before her insert point at 12 So he shifts the insert point +1 to pos 13 3/2/2021 M. Sevior CHEP 2010 12
Abi. Collab Network Topology 3/2/2021 M. Sevior CHEP 2010 13
Pairwise connection - fixes internet lag 3/2/2021 M. Sevior CHEP 2010 14
Abi. Collab and Abi. Word on OLPC From our IRC chat. . . <rp> I'm excited that ya'll are getting olpc test systems - I've played with emulated images and it seems like they've really got something * uwog will use it to land more chicks <rp> lol - they'll be all over the married guy with the green little-kids laptop <uwog> that is the plan, yes * uwog confident that it will work 3/2/2021 M. Sevior CHEP 2010 15
OLPC and Abi. Collab Our embedable Python component is used to make “Write” for the OLPC project Abi. Collab allows documents to be shared via mesh network 3/2/2021 M. Sevior CHEP 2010 16
Webservice • Connect via http over port 80 • Tunnel through firewalls • Central server redirects packets • Orders of magnitude less compute • Document repository 3/2/2021 M. Sevior CHEP 2010 17
http: //abicollab. net 3/2/2021 M. Sevior CHEP 2010 18
Connect directly to a working session, always get the latest version svn backend provides complete history 3/2/2021 Export to odt, docx, rtf, pdf, html, latex. . M. Sevior CHEP 2010 19
More Features! 3/2/2021 M. Sevior CHEP 2010 20
Conclusions Abi. Collab allows real-time document creation. It operates in a decentralized peer to peer network with no locking. All Abi. Word instances operate at full speed. Conflicts are resolved through the exchange of extra information regarding CR order and size. C++, python, C# bindings allow the powerful core to be reused with radically different UI's like OLPC Write The code works and is widely deployed Genuine Open Source project, Get involved if interested! (OSX port, Latex export) 3/2/2021 M. Sevior CHEP 2010 21
Thank you 3/2/2021 M. Sevior CHEP 2010 22
Issue #2 - Undo/Redo Pressing undo should only undo your own changes. Abi. Word records all the CRs applied to the model. Whoops! We undid a remote change 22 pages later. . . Tag remote CR's, record their Adjustments Don't undo remote CR's but take account of their effects. Sevior CHEP 2010 23 If 3/2/2021 remote user changes M. your text you can't undo it.
Issue #3 - Complex Operations Some operations in Abi. Word require the conglomeration of many smaller ops. If this is interrupted, Abi. Word is left in an unstable state. eg Inserting a table (<table><cell><block></cell></table>) Abi. Word handles these by placing GLOB markers before and after. <GLOB><table><cell><block></cell></table></GLOB> Solution: Glue all operations between GLOBs together upon reception 3/2/2021 M. Sevior CHEP 2010 24
Issue # 4 - Collisions Alice and Bob place their carets at the same location Bod "presses "x", Alice presses "y" What happens? The result is undefined. We have a collision. Collisions occurs if any unseen CR's emitted from local session overlap the incoming packet. If this occurs, the Master document tells the remote to undo's 3/2/2021 Sevior CHEP 2010 25 until we're back in synch. M. The remote acknowleges
- Slides: 25