LibreOffice developer shows prototype Android and HTML5 ports
Ryan Paul, ArsTechnica, 2/7/2012
The Document Foundation (TDF) announced plans last year to create mobile and cloud versions of LibreOffice. A preliminary iOS porting effort that was undertaken earlier in 2011 demonstrated the viability of the project and showed that the open source office suite could have a future beyond the desktop.
In a presentation this week at the FOSDEM conference, SUSE developer Michael Meeks shed some light on the current status of the porting project. The presentation slides, which he published on his blog, offer insight into some of the underlying technical details and the rationale for some of the high-level design decisions.
The LibreOffice developers aim to maximize the amount of code that is shared between the desktop, mobile, and cloud variants of the office suite. Instead of rewriting the software or maintaining separate implementations, the existing code base will be adapted to work in new environments.
Due to the inherent complexity and sophistication of an office suite, writing a separate version for each environment or rewriting from scratch in a form that is more conducive to portability would be impractical. Meeks cited several examples of failed office suite rewrites in his presentation slides—including Microsoft’s defunct Pyramid project and Corel’s abandoned Java-based rewrite of Corel Office—to highlight the risk of such an undertaking.
Meeks also pointed out some of the major advantages of sharing code between environments. It will ensure that a good selection of LibreOffice features is available across all target environments and that interoperability between them will be robust and predictable. Improvements to the underlying code will transparently benefit all users, regardless of where they are running the application.
In particular, the performance optimizations that are made in order to get the current LibreOffice code running on mobile devices will also be felt on the desktop. The office suite’s poor startup performance has been identified as one area where significant improvement is needed. According to a slide in the presentation, approximately 15 percent of LibreOffice’s CPU consumption on startup is dedicated to parsing configuration files—and a non-trivial portion of that is used merely to load user interface text.
The effort to port LibreOffice to resource-constrained devices will help raise the visibility of performance and memory issues so that they are more likely to be fixed. The result will be a LibreOffice that is faster and lighter for everyone. We’ve seen this phenomenon work before, most notably when Mozilla aggressively reduced Firefox’s memory footprint during the early days of the Fennec project.
The mobile ports of LibreOffice are still at a very early stage of development. Experimental prototypes validate the technical strategy and show that the ports are possible.
LibreOffice developer Tor Lillqvist has been working on getting the office suite to compile for Android and iOS. He released a screenshot last year that showed a LibreOffice debugging session in Xcode, with a headless instance of the office suite running in the iOS simulator. Meeks has also included a screenshot in his slide presentation that shows a LibreOffice Prototype running in an emulated Android tablet environment.
The experimental Android prototype merely demonstrates that the office suite can be made to run on Android devices. A touchscreen-friendly user interface that matches the platform’s native interface conventions will be implemented before the tablet application is released to end users. The initial goal is to make a “high-fidelity” document viewer and then add limited editing capabilities.
Much like the mobile ports, the cloud port will be powered by the existing LibreOffice code. The application will run on a server and its user interface will be painted in the user’s browser window on an HTML Canvas element. The LibreOffice cloud prototype is powered by Broadway, an impressive HTML-rendering backend for the Gtk+ widget toolkit.
Communication between the frontend and the backend will be facilitated by WebSockets, which allow real-time communication. The screen updates will be sent as compressed PNG slices. Only the parts of the screen that need to be updated will be sent, which means that the network overhead for simple operations like text input is relatively low.
One of the major advantages of this approach is that it will ensure that formatting and layout is entirely consistent between the cloud and desktop versions of the application. The browser-based interface won’t be limited by the constraints of HTML presentation.
It’s already possible to self-host your own single-user LibreOffice online environment by running a LibreOffice development build with the Broadway backend on Linux. According to the slides, this will be supported out of the box in the upcoming LibreOffice 3.5 release that is expected to arrive later this week. There are still rendering glitches, however, and areas that need further optimization.
Support for multitenancy, user authentication, and other features that are needed to accommodate large-scale LibreOffice Online deployments haven’t been implemented yet. Meeks believes that the office suite will scale acceptably well on servers. In his slides, he pointed out that LibreOffice already works well in large mulituser X11 environments. He estimates that a server with four quad-core CPUs could potentially handle between 200-300 concurrent LibreOffice users.
OpenOffice.org (OOo) never had a reputation for being svelte and efficient. Users are naturally skeptical about whether LibreOffice can overcome OOo’s legacy of performance problems, and scale down to work well in mobile environments.
The dysfunctional culture of the OOo project under Sun and Oracle created a high barrier of entry for participation and worked against the success of the office suite. The LibreOffice fork tore down those obstacles and created a healthier environment in which the software can flourish.
LibreOffice has already succeeded in building a more inclusive community with a better governance model. As we reported last week, LibreOffice has seen rapid growth—in the form of high developer engagement, a more diverse base of contributors, and a large number of monthly code commits.
A major code cleanup effort has already resulted in the removal of many unused functions. The LibreOffice community clearly has the operational agility that it needs to cull the bloat and make the office suite more efficient. Scaling down to support mobile environments and scaling up to support large cloud deployments is easily within the realm of possibility.
In: Android, iPhone, Mobile Technology · Tagged with: Cloud, HTML5