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


Wasmer 5 Adds iOS Support
12/11/2024

The Wasmer team has released Wasmer 5.0. The WebAssembly runtime adds experimental support for more back ends including V8, Wasmi and WAMR. It also now has iOS support, and upgraded compilers includin [ ... ]



JetBrains Makes WebStorm and Rider Free for Non-Commercial Use
24/10/2024

JetBrains has launched a non-commercial license for its JavaScript and TypeScript IDE, WebStorm, and for Rider, its cross-platform .NET and game development IDE.


More News

 

espbook

 

Comments




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

 

Last Updated ( Wednesday, 08 April 2015 )