kitodo / kitodo-presentation

Kitodo.Presentation is a feature-rich framework for building a METS- or IIIF-based digital library. It is part of the Kitodo Digital Library Suite.
https://kitodo.github.io/kitodo-presentation/
GNU General Public License v3.0
39 stars 45 forks source link

Migrate frontend plugins to a client-side application #780

Open sebastian-meyer opened 2 years ago

sebastian-meyer commented 2 years ago

Description

Currently Kitodo.Presentation works page-based. So all the METS and metadata parsing happens just to display a single or double page. Each time a user navigates to another page or structure (i. e. TOC entry) of the document, a full reload of the webpage occurs and everything get's parsed again. This is not only bad for server load on high-traffic sites, but also very counter-intuitive for non-page-based material like video or audio. For example, currently it is not possible to synchronize navigation/table of contents of an audio or video file without interrupting playback. It's also not possible to continuously read the fulltext of a document without having to turn the page.

The feature request introduces a completely client-side implementation of most of the interactive frontend plugins with asynchronous/lazy loading of data. So all the XML parsing would still happen on the server, but the information would then be provided to the frontend via RESTful API instead of parameters for server-side plugins.

Related Issues

None.

Expected Benefits of this Development

There are several benefits of this:

  1. Continuous playback of audio and/or video files while flipping pages of a page-based document would be possible. This is applicable in a lot of use-cases, i. e. showing digitized music scores while playing a corresponding recording, displaying written commentary or transcripts while playing a video, ...
  2. We could provide a continuous reading experience for fulltext where a user would scroll through the whole text and the corresponding digitized pages would dynamically change according to the reading position.
  3. While scrolling through a document or playing an audio/video, we could dynamically update the table of contents to highlight the currently shown part of the work.
  4. In general, dynamically synchronizing the output of different plugins and reacting to user interaction would be a lot more efficient and easy to implement.
  5. Server load and network traffic will be significantly reduced for high-traffic sites like i. e. the DFG Viewer.

Estimated Costs and Complexity

The cost would be high, i. e. in excess of 10 working days. Complexity is high as well, since this would include re-implementing most of the frontend plugins in Javascript. (The old plugins could be kept for backwards compatibility and to still support older browsers, which may not be able to handle the client-side applications.)

sebastian-meyer commented 2 years ago

WIP: https://github.com/dvoracek-slub/kitodo-presentation/tree/sprint

sebastian-meyer commented 1 year ago

I'd like to reintroduce this feature request for the development fund 2023. Since SLUB Dresden worked on it in the meantime (see #878) cost has been reduced to moderate although complexity stays high.

sebastian-meyer commented 1 year ago

Votes: 4