# CRDT-Based Real-Time Collaboration in LibreOffice Writer
> [! note]-
> The content of this page is generated by audio/video transcription and text transformation from the content and links of this source.
Source: [https://fosdem.org/2025/schedule/event/fosdem-2025-6504-distributed-real-time-collaboration-for-writer-a-first-prototype/](https://fosdem.org/2025/schedule/event/fosdem-2025-6504-distributed-real-time-collaboration-for-writer-a-first-prototype/)
<video src="https://video.fosdem.org/2025/h2213/fosdem-2025-6504-distributed-real-time-collaboration-for-writer-a-first-prototype.av1.webm" controls></video>
## Summary & Highlights:
The session introduces a prototype for real-time, distributed collaboration in LibreOffice Writer, leveraging conflict-free replicated data types (CRDTs) to enable multiple users to edit and comment on documents simultaneously. This innovation aims to enhance productivity and collaboration in document editing.
**Introduction to Real-Time Collaboration**
The session begins by defining key concepts such as document collaboration, distributed documents, and real-time editing. These concepts form the foundation of the prototype, which allows multiple users to work on a document simultaneously, regardless of their location.
**Historical Context and Technological Evolution**
The speaker provides a historical overview of collaborative technologies, from early ad-hoc solutions to modern CRDTs. This evolution highlights the growing need for efficient and conflict-free collaboration tools, which the prototype aims to address.
**Prototype Development and Implementation**
The prototype leverages CRDTs to enable real-time collaboration on document comments in LibreOffice Writer. The session details the development process, including the integration of the YRS library in Rust, and the challenges faced in creating a seamless user experience.
**Future Directions and Challenges**
The session concludes with a discussion on future improvements, such as enhancing discovery and transport mechanisms for peer-to-peer collaboration. The speaker also addresses the need for better user interfaces to support multi-user editing and conflict resolution.
## Importance for an eco-social transformation
This session is crucial for eco-social transformation as it presents a tool that fosters collaboration and community-driven development. The use of open-source technologies like CRDTs in LibreOffice Writer promotes accessibility and sustainability by reducing reliance on proprietary software. Eco-social designers can leverage this tool to facilitate collaborative projects, enhance communication, and streamline workflows. Challenges include ensuring data privacy and security in distributed environments and overcoming technical barriers to widespread adoption.
## Slides:
| | |
| --- | --- |
| ![[FOSDEM 2025/assets/Distributed-realtime-collaboration-for-Writer-a-fi/preview_001.jpg\|300]] | The first slide introduces the session on distributed real-time collaboration for Writer, highlighting it as a first prototype developed by Michael Stahl, Tibor Nagy, and Thorsten Behrens from allotropia software. It sets the stage for the presentation by emphasizing the novelty and experimental nature of the project.
| ![[FOSDEM 2025/assets/Distributed-realtime-collaboration-for-Writer-a-fi/preview_002.jpg\|300]] | The second slide provides key definitions necessary for understanding the project: document collaboration, distributed documents, and real-time collaboration. It aims to clarify what is meant by 'distributed' and 'real-time' in the context of collaborative document editing, setting the groundwork for the technical discussion.
| ![[FOSDEM 2025/assets/Distributed-realtime-collaboration-for-Writer-a-fi/preview_003.jpg\|300]] | The third slide outlines the history of collaborative document editing technologies. It mentions early ad-hoc solutions like Doug Engelbart's 'Mother of all Demos' and MoonEdit, the development of operational transformations (OTs) in tools like Google Wave, and the emergence of conflict-free replicated data types (CRDTs) in modern applications like Nextcloud and Visual Studio Code.
| ![[FOSDEM 2025/assets/Distributed-realtime-collaboration-for-Writer-a-fi/preview_004.jpg\|300]] | The fourth slide discusses the prototype's use of CRDTs for real-time collaboration on comments in a read-only document in LibreOffice Writer. It mentions the NLnet project page, indicating that the project is supported by NLnet funding, and highlights the focus on enabling collaborative commenting.
| ![[FOSDEM 2025/assets/Distributed-realtime-collaboration-for-Writer-a-fi/preview_005.jpg\|300]] | The fifth slide focuses on Tibor Nagy's contribution to the project, which involves creating a special mode in LibreOffice Writer that allows users to edit and add comments while the main document remains read-only. This innovation is part of the prototype's goal to facilitate collaborative document review.
| ![[FOSDEM 2025/assets/Distributed-realtime-collaboration-for-Writer-a-fi/preview_006.jpg\|300]] | The sixth slide highlights Michael Stahl's work on integrating the YRS library into LibreOffice's EditEngine. This integration is crucial for enabling the CRDT-based real-time collaboration features, allowing the prototype to synchronize document comments across distributed instances.
| ![[FOSDEM 2025/assets/Distributed-realtime-collaboration-for-Writer-a-fi/preview_007.jpg\|300]] | The seventh slide addresses the challenges of discovery and transport in real-time collaboration. It mentions the current use of ad-hoc local sockets and suggests potential solutions like using existing chat protocols (matrix, xmpp) or peer-to-peer frameworks like p2anda for establishing connections between collaborators.
| ![[FOSDEM 2025/assets/Distributed-realtime-collaboration-for-Writer-a-fi/preview_008.jpg\|300]] | The eighth slide continues the discussion on discovery and transport, emphasizing the need for a more robust system. It suggests improving the graphical user interface for comments to better support collaborative editing, indicating areas for future development.
| ![[FOSDEM 2025/assets/Distributed-realtime-collaboration-for-Writer-a-fi/preview_009.jpg\|300]] | The ninth slide discusses the implementation of multi-user cursors and overlaying usernames at cursor positions. This feature is intended to enhance the collaborative experience by allowing users to see each other's activities in real time, similar to the experience in Collabora Online.
| ![[FOSDEM 2025/assets/Distributed-realtime-collaboration-for-Writer-a-fi/preview_010.jpg\|300]] | The tenth slide provides instructions for setting up the demo environment, including environment variables that need to be set for enabling the CRDT-based collaboration features. It highlights the technical requirements for running the prototype demonstration.
| ![[FOSDEM 2025/assets/Distributed-realtime-collaboration-for-Writer-a-fi/preview_011.jpg\|300]] | The eleventh slide opens the floor for questions and answers, inviting feedback and discussion from the audience. It marks the end of the presentation and encourages participants to engage with the presenters and explore the prototype further.
## Links
[Slides](https://fosdem.org/2025/events/attachments/fosdem-2025-6504-distributed-real-time-collaboration-for-writer-a-first-prototype/slides/237939/fosdem_cr_zFtxHDK.pdf)
[Project homepage](https://fosdem.org/2025/schedule/event/fosdem-2025-6504-distributed-real-time-collaboration-for-writer-a-first-prototype/)
[Prototype patch](https://gerrit.libreoffice.org/c/core/+/173340)
[Video recording (AV1/WebM)](https://video.fosdem.org/2025/h2213/fosdem-2025-6504-distributed-real-time-collaboration-for-writer-a-first-prototype.av1.webm)
[Video recording (MP4)](https://video.fosdem.org/2025/h2213/fosdem-2025-6504-distributed-real-time-collaboration-for-writer-a-first-prototype.av1.mp4)
[Video recording subtitle file (VTT)](https://video.fosdem.org/2025/h2213/fosdem-2025-6504-distributed-real-time-collaboration-for-writer-a-first-prototype.vtt)
[Chat room (web)](https://fosdem.org/2025/chat/h2213/)
[Chat room (app)](fosdem://fosdem.org/2025/chat/h2213/)
[Submit Feedback](https://fosdem.org/2025/feedback/)