Skip to content

DIBS is an implementation of a basic controlled digital lending (CDL) system using IIIF to make scanned books available for time-limited viewing.

License

Notifications You must be signed in to change notification settings

caltechlibrary/dibs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Caltech DIBS

Caltech DIBS ("Digital Borrowing System") is the Caltech Library's implementation of a basic, standalone, controlled digital lending system.

License Python Latest release

Table of contents

Introduction

DIBS ("Digital Borrowing System") is a web-based system that enables users to borrow, in a time-limited fashion, scanned materials that are not otherwise available in electronic format. The concept of controlled digital lending (CDL) is to provide the digital equivalent of traditional library lending. Libraries digitize a physical item from their collection, then lend out a secured digital version to one user at a time while the original, printed copy is simultaneously marked as unavailable. The number of digital copies of an item allowed to be loaned at any given time is strictly controlled to match the number of physical print copies taken off the shelves, to ensure an exact "owned-to-loaned" ratio.

DIBS was developed in the year 2021 to help Caltech students and faculty continue their studies and work during the global COVID-19 pandemic. The open-source system provides three main components for CDL: a loan tracking system, an integrated digital content viewing interface, and basic administrative interface. DIBS embeds the Universal Viewer to display materials that comply with the International Image Interoperability Framework (IIIF). To help library staff convert scans of materials into IIIF format, DIBS also provides a way to connect to an external workflow, and Caltech's workflow automation for this purpose is available as an example in a separate repository.

DIBS can currently interface to either FOLIO or TIND to get metadata about books, but its interface layer should be straightforward to extend for other LSP (library services platform) implementations.


Requirements

The core DIBS server is written in Python 3 and makes use of some additional Python software libraries that are installed automatically during the installation step steps.

Requirements to run a demo

Although DIBS relies on the existence of a IIIF image server (and content to serve), for initial exploration and demonstration purposes, you don't need to set up a IIIF server; you can reference content located in any of a number of publicly-accessible IIIF servers around the world, and DIBS includes a sample IIIF manifest to illustrate that. You shouldn't need anything else to run the DIBS demo on your local computer.

Requirements to use DIBS for real use at another institution

In order to run a multiuser DIBS server at another institution, certain additional things are needed.

  1. A IIIF server. At Caltech, we use a serverless component running on an Amazon cloud instance, but many other IIIF server options exist. If you're looking at DIBS, presumably it means you want to serve content that is not freely available in a public IIIF server, which means you will need to set up a server of your own.
  2. A web server to host DIBS. The current version of DIBS has only been tested with Apache2 on Linux (specifically, Ubuntu 20) and macOS (specifically 10.14, Mojave). DIBS comes with a WSGI adapter file and sample config file for Apache, but it should be possible to run DIBS in other WSGI-compliant servers.
  3. An authentication layer. DIBS assumes that the web server takes care of user authentication in such a way that DIBS is behind the authentication layer and all users who can reach DIBS pages are allowed to view content. DIBS itself only implements checks to distinguish between regular users versus staff who are allowed to access restricted pages. For the authentication layer, at Caltech we use the Shibboleth single sign-on system, but it is possible to use other schemes, including Apache Basic Authentication. The installation and configuration of a single sign-on system depends on the specifics of a given institution, and are not described here.
  4. The use of FOLIO LSP or TIND ILS for retrieving metadata based on barcodes or unique identifiers, or a willingness to extend the existing metadata retrieval layer in DIBS. The interface for adding items to DIBS requires looking up metadata based on an item's barcode, and lacking a universal scheme to do that, we had to write our own interface layer. The use of another LSP will require extending this interface layer. (Thankfully, the code is short and the amount of metadata required is small.)
  5. Modification to the HTML templates to change the branding. The template files in dibs/templates are specific to Caltech, and will need to be edited to suit another installation. (We are open to making the branding customization easier and would welcome a pull request for suitable changes!)

Installation and operation

Please refer to the detailed installation instructions in the DIBS manual.

General information

Documentation for DIBS is available online at https://caltechlibrary.github.io/dibs/.

Known issues and limitations

DIBS is in active development. The current version was produced rapidly, and has a limited scope and streamlined design. We continue to improve DIBS in various ways.

It is worth mentioning that DIBS does not (currently) implement a queue or wait list for loan requests. This is a conscious design decision. Queuing systems tend to lead to complexity quickly, and we want to delay implementing a queue until it becomes clear that it's really essential. (After all, in a physical library, there are no queues for borrowing books: you go to see if it's available, and if it's not, you can't borrow it.) Perhaps we can implement interfaces and behaviors in DIBS that avoid the need for a queue at all!

The DIBS server acts as an intermediary between the IIIF server and patrons viewing content in IIIF viewers – all content goes through DIBS. This is how DIBS can implement loan policies and secure content management: it's a choke point. However, it means the DIBS server is a potential performance bottleneck. At our institution, we have not found the speed impact to be objectionable for CDL in an academic setting, even using single server hardware. But other sites may have different experiences. If you experience performance issues, first try to increase the number of parallel threads that your Apache server will use for DIBS, and also increase IIIF_CACHE_SIZE in settings.ini. If that is not enough, let the developers know, and we can start thinking about architectural changes.

Getting help and support

If you find an issue, please submit it in the GitHub issue tracker for this repository.

Contributing

We would be happy to receive your help and participation with enhancing DIBS! Please visit the guidelines for contributing for some tips on getting started.

License

Software produced by the Caltech Library is Copyright (C) 2021–2022, Caltech. This software is freely distributed under a BSD-type license. Please see the LICENSE file for more information.

This software repository includes a copy of the Universal Viewer version 3.1.1, obtained from the GitHub repository as it existed on 2021-04-27. The Universal Viewer is released under the MIT license. Please see the Universal Viewer website and documentation for more information about any applicable copyrights or licensing terms.

Authors and history

DIBS was designed and implemented by Michael Hucka, Robert Doiel, Tommy Keswick and Stephen Davison of the Caltech Library's Digital Library Development team.

Acknowledgments

This work was funded by the California Institute of Technology Library.

The vector artwork of a book with a clock on it, used as the icon for this project, was created by Royyan Wijaya from the Noun Project. It is licensed under the Creative Commons CC-BY 3.0 license. DIBS also uses other icons created by Scott Desmond and SlideGenius.

We gratefully acknowledge bug reports and fixes submitted by the following users, who helped improve DIBS:


@dlasusa

@stanonik

@hadro

@phette23

DIBS makes use of numerous open-source packages, without which it would have been effectively impossible to develop DIBS with the resources we had. We want to acknowledge this debt. In alphabetical order, the packages are:

  • Arrow – a library for creating & manipulating dates
  • Bootstrap – CSS framework for developing responsive websites
  • Bootstrap Table – extended table framework for Bootstrap
  • Boltons – package of miscellaneous Python utilities
  • Bottle – a lightweight WSGI micro web framework for Python
  • Bottle-fdsend – Bottle plugin to enable sending content from in-memory files
  • Clipboard.js – JavaScript library for copying text to the clipboard
  • Coif – a Python package for finding book cover images
  • CommonPy – a collection of commonly-useful Python functions
  • expiringdict – an ordered dictionary class with auto-expiring values
  • Font Awesome – scalable vector icons for web design
  • humanize – make numbers more easily readable by humans
  • ipdb – the IPython debugger
  • jQuery – JavaScript library of common functions
  • LRU Dict – an implementation of Least Recently Used caching
  • mod_wsgi – an Apache module for hosting Python WSGI web applications
  • Peewee – a simple ORM for Python
  • Pillow – a fork of the Python Imaging Library
  • Plac – a command line argument parser
  • Pokapi – a simple Python OKAPI interface
  • Popper.js – web page tooltip engine
  • Python Decouple – a high-level configuration file interface
  • Rich – library for writing styled text to the terminal
  • Sidetrack – simple debug logging/tracing package
  • str2bool – convert a string to a Boolean value
  • Trinomial – a simple name anonymization package
  • Topi – a simple package for getting data from a TIND.io ILS instance
  • Universal Viewer – a browser-based viewer for content in IIIF format
  • Yurl – URL manipulation library
  • Werkzeug – WSGI application library