Node-based service, part of the museum data infrastructure, to maintain a healthy upstream for the REST-API of Design Museum Gent. This service is running inhouse on a recycled (otherwise obsolete) mac Mini which is rebooted to run DEBIAN.
- each month (first day of the month) it does a full check for the museums' postgres database is vetted for inconsistencies and errors - to ensure a healthy upstream.
- each week (on sunday) it rechecks those objects that have recieved a status of UNHEALTHY
- each day it checks only those items that have recieved a STATUS: UNKNOWN - these are usiually new objects that need to recieve a URI and resolving route
- inconsistencies include (entity duplicates, HTTP Client and/or Server errors, misalignment between PID and metadata (due to changes in registration (fe. changing objectnumber) f.e.))
- based on the switch cases (mentioned above), each endpoint is given a status (healthy / unhealthy)
- based on the status, the route to which the Persistent Uniform Resource Locator needs to (re)direct is defined and stored in the DB to be used when resolving.
- a status report is generated so if necessary, our staff is aware of what changes need to be made.
- node-service-eventstream-api (service publishing eventstreams from our data)
- Postgres Database (Supabase instance)
- IIIF persentation API
- IIIF image server
This way the museum wants to ensure Persistent Uniform Resource Locators (PURL) - to both maintain a healthy upstream and ensure accesibility to our data.
----------
0/5864
checking: https://data.designmuseumgent.be/id/object/0559
IIIF Manifest Response: 200
objectnumber in LDES: 0559
content in LDES matches with PID
STATUS: HEALTHY
RESOLVE_TO: https://data.designmuseumgent.be/id/object/0559
----------
1/5864
checking: https://data.designmuseumgent.be/id/object/2017-0448
IIIF Manifest Response: 200
objectnumber in LDES: 2017-0448
content in LDES matches with PID
STATUS: HEALTHY
RESOLVE_TO: https://data.designmuseumgent.be/id/object/2017-0448
----------
this service has dependencies that rely on private credentials. - setting up this service, is only possible in correspondence with the museum.
make sure node is installed on the device
npm install
add .env file at root level of the repository
touch .env
fill in the credentials in .env file:
_baseURI="https://data.designmuseumgent.be/
SUPABASE_URL= *****
SUPABASE_KEY= *****
we run this service on a raspberrypi.
move in the directory
cd dmg-resolver
start check
npm start