LibreOffice Moving To The Cloud - But How?
Written by Ian Elliot   
Wednesday, 08 April 2015

How would you move an office suite like LibreOffice to the cloud? My guess is that you might start to think about how you could convert it into a native JavaScript or asm.js program that ran mostly in the browser. No, that's not it.

LibreOffice is a popular open source office suite - it is written in C/C++ and it is a big program. Perhaps you might contemplate implementing one of its applications - Writer say - in JavaScript, but to port the whole lot is a terrifying prospect. Even the thought of trying to put the code through emscripten to generate JavaScript is fairly frightening.

The approach that the LibreOffice team have taken is to turn LibreOffice into a server that makes use of a browser as its output medium. That's right, all the work is done on the server and all the browser does is display a bitmap of what the output looks like.

This isn't quite as simple as it first seems. The team experimented with GTK+Broadway, which provides a virtual desktop environment in the browser, but speed seems to have been the biggest problem with an image fragment having to be sent to the client with each update. The simple test also involved using a complete LibreOffice running on the server for each client - not particularly scalable unless memory is no object. 

After noting that most of the time a user was just reading a document and changes occupied a comparatively short time, the idea of caching the rendered document seemed like the best approach. What really makes it work, however, it to use a tile server to allow the render to be built up in small squares - this is, of course, how Google Maps and similar large image viewers work. Off-screen tiles are cached ready to be used as soon as the user scrolls onto them. 



Diagram: Michael Meeks


The JavaScript client software has to provide some of the "live action" such as the cursor, selection boxes and so on. It also passes keystrokes and other input back to the server using websockets. It also has to notice when a tile has been invalidated and request an update. 

All of this user interaction is passed back to LibreOfficeKit, which is a recent module designed to allow direct and easy access to LibreOffice via a C/C++ interface. It has been modified to generate tiles and generally seems to be the module where all of the work to implement new versions - browser and Android - of LibreOffice is actually done.



Diagram: Michael Meeks


Overall the general plan is clear, even if the details are still a bit vague. 


More Information

LibreOffice On-Line & IceWarp

Related Articles

LibreOffice Calc To Get GPU support       

Open Source Has As Good Code Quality As Proprietary Code   

LibreOffice 4.0 Released       


To be informed about new articles on I Programmer, install the I Programmer Toolbar, subscribe to the RSS feed, follow us on, Twitter, FacebookGoogle+ or Linkedin,  or sign up for our weekly newsletter.



Access LLMs From IntelliJ With Devoxx Genie

Devoxx Genie is a fully Java-based LLM Code Assistant plugin for IntelliJ IDEA, designed to integrate with local and cloud LLM providers.

Look Once to Hear - A Spy's Dream Come True

Deep learning has triumphed again. You can don a pair of headphones, look at a person talking and from then on the system will track the person so you can hear them as they move away or become swamped [ ... ]

More News


kotlin book



or email your comment to:


Last Updated ( Wednesday, 08 April 2015 )