BHL
Archive
This is a read-only archive of the BHL Staff Wiki as it appeared on Sept 21, 2018. This archive is searchable using the search box on the left, but the search may be limited in the results it can provide.

Static Files

Introduction

In order to increase performance pre-generated derivatives will be cached and served via an http server such as varnish.

URLs

http://<environment URL>/static/<guid>/<file>

Files For the bookreader:

http://<environment URL>/static/<guid>/jp2/<guid>_<page number>.jpg

Examples:

http://bhl-test.nhm.ac.uk/static/a0hhmgs6/a0hhmgs6_mods.xml <-- test environment

http://www.bhl-europe.eu/static/a0hhmgs6/a0hhmgs6_mods.xml <-- production environment

http://www.bhl-europe.eu/static/a0hhmgs6/a0hhmgs6_olef.xml
http://www.bhl-europe.eu/static/a0hhmgs6/a0hhmgs6_bibtex.bib
http://www.bhl-europe.eu/static/a0hhmgs6/a0hhmgs6_endnote.end

http://www.bhl-europe.eu/static/a0hhmgs6/a0hhmgs6_thumbnail.jpg <-- more details below


http://www.bhl-europe.eu/static/a0hhmgs6/a0hhmgs6_full_pdf.pdf
http://www.bhl-europe.eu/static/a0hhmgs6/a0hhmgs6_full_jpg.zip
http://www.bhl-europe.eu/static/a0hhmgs6/a0hhmgs6_full_ocr.txt


Thumbnails:

Thumbnails are not be generated when the item is ingested, which means we should request the generation of thumbnails at the first time. From the Portal side, this should be broken into two steps:
1. Hit http://www.bhl-europe.eu/static/<guid>/<guid>_thumbnail.jpg to see whether the thumbnail is available.
2. If not (return 404 NOT FOUND), then try http://www.bhl-europe.eu/access/download/<guid>/thumbnail


File Storage

The files will be stored on the fileshare. There is no limit to the number of folders in a folder in GPFS however in order to avoid too many sub-folders we store the files in some sort of tree like a pairtree.

File Schema

something like a pairtree

Examples

/mnt/nfs/production/access/items/a0/hh/mg/s6/a0hhmgs6/ <--> http://www.bhl-europe.eu/access/items/a0hhmgs6

Files For the bookreader:

/mnt/nfs/production/access/items/a0/hh/mg/s6/a0hhmgs6/jpg/a0hhmgs6_00001.jpg