Readium-2 : a couple seeing from above - the woman holding a tablet

What is Readium-2?

As of 2016, Readium is a fully functional EPUB 3 engine, with two pure JavaScript implementations (Readium Chrome Extension and CloudReader) as well as good implementations of the SDK on iOS, Android and OSX, all based on C++ with native hooks. However, this C++ code is not as platform-neutral as it was aimed to be: it is interspersed with directives targeting specific implementations; and given the organic nature of an open-source development with constant turnover of developers, the codebase has become very large and complex with nobody having complete knowledge of it.

Meanwhile, the web has continued to mature with the browser and JavaScript engines becoming much more full featured, with extensive support parsing markup, crypto, SVG, WebGL support and more. At the same time, the major standards bodies, including the W3C and IDPF, have been producing additional specifications for digital publishing in many forms.

This led many of us to conclude that it might well be time to step back from the current Readium codebase and approach and do some serious re-thinking.

Goals of Readium-2

The goal of Readium was, initially, to develop a POC for the EPUB 3 spec, followed by developing a SDK that could be used to develop EPUB 3 reading systems. The overarching goal of R2 is to re-think, from the ground up, that goal.  Instead of developing an engine (or engines) for interpreting EPUB markup for integration into apps or devices, the goal is to develop a framework for interpreting and rendering digital publishing markup.

This framework will consist of leveraging all the capabilities of the existing browser engines and supplementing those capabilities with separate modules (polyfills, if you will) that provide additional functionality.  These additional modules are intended to be, insofar as possible, independent of one or another so that they can be used independently of the overall framework.  At the same time, these polyfills will be designed so that they CAN be easily and seamlessly combined to produce complete reading systems.

Another aspect of this framework is that instead of a “platform-neutral” C++ core, the native (i.e. non javascript) part of the framework will be implemented in native code, i.e. Swift 3 for the iOS target and Java for the android target. This will enable the use of the most powerful aspects of each native environment and should end up with less code, but more efficient.

On the other side, desktop applications (on Windows, OSX and Linux) will be approached using cross-plaftorm technologies, and EDRLab is working on an Electron prototype written in javascript, html and CSS, thanks to a grant from the CNL (Centre National du Livre). This should fill the gap that Readium left open so far, with no real interest from the community for the development of a native Windows and Linux SDK.

These different implementations will share the same architecture, model, interfaces; a developer should therefore be able to switch from one implementation to another without feeling lost.


The project is split in four phases:

  1. Report on the good and bad aspects of the current Readium implementation. This report is driven by the interview of those application developers who have intensively used Readium (readium-js and/or readium-sdk) and, for some of them, forked the code to obtain what was needed in their application. This study includes a compilation of problematic EPUB samples and technical details about the areas where the Readium code should be optimized.
  2. Study of the Readium-2 design principles
  3. Study of a refactored architecture for the codebase, following the approved design principles; developement of prototypes.
  4. Actual coding of the Readium-2 toolkit.

The first phase has been achieved in September 2016. Its results have been described to the Readium members and should be soon published online on the Readium documentation website.

The second phase has started in September 2016. The discussion is active on the Readium-2 github repository, as github issues and Slack chats. Please look at the wiki page if you want to participate to the work. Some POCs have already been developed and are referenced in the repository.

Other Readium projects

Readium SDK & JS

The reference EPUB 3 open-source reading engine for Web, desktop and mobile apps, on active maintenance by the Readium community.

Discover Readium SDK & JS

woman in library reading at a tablet with lock in her hand

Readium LCP

The vendor-neutral and interoperableDigital Rights Management technology, embeddable in any reading application based on the Readium SDK.

Discover Readium LCP

Copyright © 2016 EDRLab. Legal informations