Online - under the hood - Michael Meeks [FOSDEM 2019]

Online brings Documents, Spreadsheets and Slides to the browser, with storage and rendering on your own server. In fact, it needs integration with authentication and storage to be useful at all.

Online is based on LibreOffice, so if something gets fixed in LibreOffice, it’s also fixed in Online. It also gets the full feature set of LibreOffice, including footnotes, comments, versions, etc. Rendering is fully done server side, it sends tiles to the client for display. The client is aware of document structure though. It uses that to render a cursor and to find out which tiles have to be updated when you type something.

The frontend client sends an authentication request to a server in whatever. There is a separate WOPI-like host API for storage.

The server has a frontend called WSD and then a backend LibreOffice Core worker for each document. To optimise resources, they are all prepared and forked from a spawner called ForKit. The workers run in a sandbox (chroot jail, seccomp, …). In fact, it is more efficient to use Online for format conversion of documents than spawning a soffice.bin. Because of the chroot, the ForKit needs to be root though.