Abstract
This paper presents DistEdit, a toolkit designed to transform standard, single-user text editors into collaborative group editors. By providing a layer that handles the complexities of distributed systems—concurrency control, consistency, and fault tolerance—DistEdit enables real-time collaboration with minimal effort. The system employs a replicated architecture and a novel "lock-relative" addressing scheme to ensure synchronization across heterogeneous editors. Evaluation through the adaptation of GNU Emacs and Xedit demonstrates that robust group editing capabilities can be integrated into existing tools in just a few hours.
Introduction
In the early 1990s, collaboration tools were primarily asynchronous, such as email or shared file systems. Real-time group editing emerged as a significant challenge due to the "non-trivial" distributed systems problems it introduced. Developers had to address concurrency (handling simultaneous edits), consistency (ensuring identical views across workstations), heterogeneity (allowing different editors to work together), fault tolerance (preventing session failure due to individual crashes), and per-user undo capabilities. DistEdit was developed to solve these issues by providing a standardized toolkit that abstracts these complexities from the editor developer.
System Architecture
DistEdit utilizes a replicated architecture rather than a traditional client-server model. Each participant's editor maintains a local copy of the text buffer, ensuring near-instantaneous local response times.
Key Components
- ISIS Toolkit Integration: DistEdit is built upon the ISIS system, which provides "globally ordered broadcast." This ensures all editors receive updates in the same sequence, maintaining global consistency.
- Editing Primitives: The toolkit defines a minimal set of primitives, such as
de_insertandde_delete. Developers adapt an editor by mapping its internal functions to these primitives. - Lock-Relative Addressing: To solve the "address shifting" problem—where character positions change as users type—DistEdit uses addressing relative to the start of a specific lock rather than absolute character offsets.
- Concurrency Control: The system supports both automatic temporary locks (acquired when a user types) and explicit long-term locks on specific regions.
- Per-User Undo: Using a "transpose" algorithm, DistEdit allows a user to undo their specific last action without affecting concurrent changes made by others.
Implementation and Evaluation
The effectiveness of DistEdit was evaluated by adapting three existing editors: GNU Emacs (~75,000 lines), MicroEmacs (~20,000 lines), and Xedit (~16,000 lines).
The results demonstrated that the toolkit significantly lowers the barrier to creating group editors. For instance, converting Xedit required only four hours of work and 250 lines of new code. Even the complex GNU Emacs required only 450 additional lines. In LAN environments, performance was robust, with updates appearing almost instantly across all screens. The system also proved resilient to machine crashes and dynamic session membership.
Conclusion
DistEdit successfully demonstrates that a toolkit approach can effectively abstract the difficulties of distributed groupware. By allowing users to remain within their preferred editing environments (e.g., Emacs vs. Xedit), the system respects user habits while enabling powerful real-time collaboration. Future work includes expanding support to multiple buffers, non-ASCII text, and more varied undo mechanisms.
Summary updated