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. 

 

libretile

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.

 

librearch

Diagram: Michael Meeks

 

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

 
librecalclogo

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.

 

Banner


iOS 17.4 Released With Support For App Stores In The EU
06/03/2024

I have written about Apple's approach to complying with regulation, characterizing it as malicious compliance. It also seems that Apple is a master of creating the unintended consequence and letting i [ ... ]



Ibis 8 Adds Streaming
05/03/2024

Ibis 8.0 has been released with stream processing backends. The new release includes Apache Flink as a streaming backend, and RisingWave, a streaming database backend. There's also a new batch backend [ ... ]


More News

 

raspberry pi books

 

Comments




or email your comment to: comments@i-programmer.info

 

Last Updated ( Wednesday, 08 April 2015 )