Peer-to-peer collaboration with LibreOffice
A while ago, Simon Phipps, member of the Board of Directors at The Document Foundation, shared the idea to introduce a peer-to-peer collaboration built in to desktop LibreOffice without the requirement for a cloud provider. This idea has received a lot of attention inside the organization and the design team has started to outline the project now.
User Stories
A user story is an informal description of features aiming to facilitate the communication.
- Eve has to insert some numbers in a spreadsheet but lacks on all data sources. She invites Benjamin to add his information while editing her own content.
- John wants to run a business meeting. He invites co-workers to the editing of a milestone document with text, numbers, and charts. After finalizing the content together, he and all participating colleagues add their signature, so the document does not need to cycle through the company anymore.
- Kryztina has to complete a form with a lot of bureaucratic text, and she struggles to understand all details as a person with migratory background. She invites Christian into the editing to help her.
- Maurizio works on a document with sensitive content. He needs help to accomplish a task but is not allowed to share the document publicly. So he invites Olivier to assist.
UX requirements
Requirements formalize the user stories into a more technical view trying to answer the question how the software should be implemented to achieve the goals.
- Easy to use: inviting a person is done as known from chat programs
- Secure: privacy is always guaranteed
- Fast: interaction never feels misplaced; no need for additional conflict handling as you always see the current state of the document
- Reliable: everybody has a full copy of the document locally (and retrieves it when (re-)connecting); although, maybe it is necessary in some situations to protect the ownership and prevent storing the document on other participants’ computer
Mockup
A mockup is a static simulation of the product illustrating the functionality.
- (1) LibreOffice provides elaborated review functions called Track Changes. It works nicely today when sending the document to co-workers and could become the basis to show the synchronous editing
- (2) Authors are identified by color and names, which are listed in the sidebar. The Add button opens the dialog (3)…
- (3) …which could provide an address-book-like dialog to pick communication channels used to invite people.
Questions
We also pondered over some questions with no clear answer.
- How about special configurations like macros being disabled on one machine?
There are likely some cases that cannot be solved such as macros but also linked images on the local file system or content in a database. Shouldn’t be much of a blocker since even average users can understand the technical background to a certain degree. - Include audio/video communication?
Collaboration almost always requires communication. An inbuilt chat could be a simple solution while trusting external tools. But of course developers should also consider to add this service. - Standardize the protocol so the collaboration can be done with any office application?
Applications based on LibreOffice Technology such as Collabora Online should work out of the box. But the true freedom of choice with open source would be to have no limitations in the used software. - What data should be sent?
This question is related to the previous and we may either use the internal commands or send a diff of the documents every couple of milliseconds.
Bottom-line
What do you think? Do you have more use cases that could be solved with such a feature? Please comment.
Yes! It would be great to work with desktop Libre Office together with people who use Collabora e.g. on a Nextcloud.
Another great side effect of that would be, that you wouldn’t have to manually save anymore. Like MS-Office does.
This would be an excellent capability to introduce.
I just did an extensive peer-to-peer protocol evaluation. https://restoration.software/posts/adr-1/
Our use cases are quite different, but I think you should consider Veilid for the network connectivity and then use whatever CRDT protocol you prefer for tracking changes in your document format.
Would be nice to see this communication part being build around the Matrix standard as that includes E2E encryption of the data, has chat and audio/video as part their v2 release and a preview of their p2p tech. I remember https://libocon.org/assets/Conference/Brno/libocon2016odfchanges.pdf which sound like something such a solution could be of use too. The data to be send (either directly exchanged p2p or over like the Matrix protocol) is ODF standardised (but may be usefull for other document formats too when falling back to just “basic change tracking” as supperted by the document format in use).
For macro’s I guess the first user that opens the doc coordinates running the (local) macro, the rest follow the updates made to the document. When the first (primary) user closed the document another one gets selected to run the macro, unless macro’s are blocked, that would need to trigger a popup someone needs to enable that. An ability to run macro’s remotely would also be help here, also for a “Collabora Online” solution or on Mobile Phones where macro’s cannot run on the device locally. The macro may run in a (docker) sanbox which would be a good thing security wise too. That’s more how I view running ‘macro’s’ in the future as this also may need ajusting how to access data sources that macro’s can leverage. The tech in Base could be of help here as in the future I guess more datasources will be available online (accessible standard API’s) to which one may want to get access and use in documents in a macro-way. A scenario is using data sources in Nextcloud, for example to use my address book, Nextcloud Tables or the Analytics App as data source in a document.
When a user has linked images, on sharing to do co-editing this should trigger a message to import the images in the document or the co-editors het to see an empy picture frame.
This sounds like a great feature! To get around a few host-specific limitations, is it possible to have a document “owned” by a single host that can be accessed and edited by peers, with the option to save a local copy? This may also allow users to set up a very simple “Libre Office server” without relying on more complicated self-hosting services. This could also be easily secured by using a locally shared secret, so with a bit of time, I can see this being a viable alternative to proprietary collaborative office suites.
This sounds rather like CMIS, see https://help.libreoffice.org/latest/en-US/text/shared/guide/cmis-remote-files.html. The idea here is to temporarily share the local document while editing a document (and unless storing is blocked, the participants can save it on their desktop).
To allow/manage/revoke access to one’s document (content) on a device the ideas and/or tech provided by Solid may be of use too https://solidproject.org/
Peer to Peer Collaboration is a good idea as long as it is done safely. My only concern is that there needs to be a way to shut it off if people don’t want to use it at all. Maybe a way could be developed that it can be turned on but only in a particular document. When that document is closed, collaboration is shut off by the person who enabled it. Being able to turn off the collaboration feature totally is important for safety online and also in a document by document basis. Also LibreOffice shouldn’t force a collaboration mode like Microsoft wants to for everyone into the cloud. Collaboration is a good idea but checks and balances for safety are needed.
Beyond the fact that this would be a functionality of the office suite, there is no need to reinvent the wheel in terms of communication protocol standardization.
The Matrix standard is open and established, it can be built upon.
We must remember that LibreOffice is FLOSS, therefore we cannot – and should not – limit its scope of application in any way.
It’s certainly something academics have been waiting for – a platform for collaborating on publications with peers regardless where they are, and without the mess caused by emailing versions of text documents! Integration of Zotero would be essential, though.
This is amazing. Finally a step into the direction of
Bug 133984 – Enhancement: Support for real-time and offline collaborative editing in LibreOffice (desktop) https://bugs.documentfoundation.org/show_bug.cgi?id=133984
This is very much appreciated!
Thanks for the URI. Shared it more directly at https://www.facebook.com/libreoffice.org/posts/pfbid02rDi4EhDM8X49KEJTTyp9TvTKzyCzFyWmcGwFegZqym4D4a37oa5TqDDbSNCzXmoil?comment_id=792037806377851&__cft__%5B0%5D=AZVvdAyFCK-FazFU07haNA5moMxp9v8ZbJY5pjIkW5apMk_daJi1hnl3rIOWinGIjHuamZOkKABSDnbQ4jtceGGepDq4Jtmb4hqEZiJzE6RZwuRAz4mqu7v44xX0avWR0jdRnRHYU54bquShWLx0qhOsKyl2pc4x86GCv8pFCJj93bw3kX6EHMQcl8SFp1_2Nzc&__tn__=R%5D-R
For a true peer-to-peer (P2P) and distributed solution, please integrate with “Jami”.
https://jami.net/
“Jami Account Management Server (JAMS)” is also available for enterprise.
https://jami.biz/
Please comment on Jami’s issue tracker entitled “Collaborative editor, shared browser, and shared applications inside the Jami client (Etherpad, RemoteHQ)”
https://git.jami.net/savoirfairelinux/jami-project/-/issues/1010
Thank you
Please read “Jami distributed network” [1] and see “Fig. 1 – Centralized, Decentralized and Distributed Networks”. Any peer-to-peer LibreOffice solution should also use a distributed network for connectivity. Jami uses a *distributed* network for connectivity.
A LibreOffice issue has been created at “Bug 145252 – Serverless collaborative real-time editing using LibreOffice Community edition with [Jami](https://jami.net/)” [2]. Unfortunately, the status was changed to RESOLVED WONTFIX due to a preference to RetroShare. RetroShare has a design flaw as it is unfortunately *decentralized*, not *distributed*.
It would be beneficial if any LibreOffice collaborative editor solution would utilize a distributed network connectivity paradigm.
Additionally, the DHTNet library is designed to establish secure peer-to-peer connections using public-key authentication.
Thank you
[1] https://docs.jami.net/en_US/user/jami-distributed-network.html
[2] https://bugs.documentfoundation.org/show_bug.cgi?id=145252
[3] https://git.jami.net/savoirfairelinux/dhtnet
To my understanding, Jami is a tool for IP communication and the successor of Sipphone or something else. I used it years ago, meanwhile Matrix and co have completely taken over the use case. Not saying this protocol/technology is worse- definitely something to consider for the developers.
> Unfortunately, the status was changed to RESOLVED WONTFIX due to a preference to RetroShare. RetroShare has a design flaw as it is unfortunately *decentralized*, not *distributed*.
These are misrepresentations corrected in a comment in the bug report.
This is a very interesting enhancement.
For smaller firms who don’t want their data mined on a platform like Google or Microsoft, an opensource option would be welcomed. Even when using Box or Dropbox, you need to open the collaborative document in Google Docs or Microsoft 365. So in each case your data flows out to a large tech company with questionable motives for protecting your privacy.
For our use case, we often try to work together on one document while writing a report. Each of the users has responsibility for different sections of the document. At the moment we write in series so the document takes considerably longer to complete and scheduling becomes an issue. In addition, for each user who adds text or creates new lines in a spreadsheet, the formatting from copy/paste can screw up the complete document when rich text is pasted. Document styles aren’t applied and one individual has to go through the complete document to reformat.
One individual has to “own” or have ultimate control but all the other collaborators should be able to freely contribute. Styles need to be managed by this ultimate owner so that content pasted doesn’t screw up the document.
The track changes is essential to keep track of who wrote or updated which portions. In addition the commenting needs to work and identify each person who is accessing the document. To ensure that the individual is identified properly this ultimate responsible person needs to be able to invite and uninvite contributors.
I can see that much of the discussion so far is about the technical issues around how to do this. I’d like to add this comment of our particular use case. Thanks for listening.
I wonder if an alternative to MS Loop could be integrated into LO. What has happened to Apache Wave (formerly Google Wave)? Would it be possible to integrate it into LO?