Closed donaldgray closed 1 year ago
https://github.com/dlcs/protagonist/pull/438 contains DeleteHandler app. This is for Deliverator so will need exanded, namely to handle deleting info.json and T
/ F
assets
The DeleteHandler project for Deliverator runs as an dockerized service for ease. We should consider running this as a lambda in AWS - either via container or as a script as it will be seldom used.
The storage-keys document outlines what keys can possibly be used for asset storage. These should drive the bulk of the delete logic, dependant on the type of asset. In addition to that we'll need to:
IAssetNotificationSender
to raise them. This is called but just logs the delete action.Deleting named queries need to raise a delete notification as it could result in the deletion if a number of generated NQ projections #540
MVP
create
, update
, delete
, cache-invalidate
as an attribute (for sns message filtering) and includes both customer id
and customer name
(path element)delete
message:
Invalidation of stored NQ projections is not MVP.
Invalidation of Varnish cache is covered by https://github.com/dlcs/dlcs-varnish/issues/3
(Later those last three cache invalidation operations can be refactored into https://github.com/dlcs/protagonist/issues/252 and CleanupHandler will call a new cacheInvalidation queue)
Note Removed Varnish cache from checklist as it's covered by linked ticket
The list of possible paths that can be invalidated will depend on the asset. In below examples I'm using assetId of 1/2/foo
.
Rules based on delivery-channel (an asset may have more than 1 of these):
"file"
/file/1/2/foo
- stream file"iiif-img"
/iiif-img/1/2/foo/*
- image-services for canonical IIIF Image Api version/iiif-img/v2/1/2/foo/*
- image-services for IIIF Image Api v2/iiif-img/v3/1/2/foo/*
- image-services for IIIF Image Api v3/thumbs/1/2/foo/*
- thumbs for canonical IIIF Image Api version/thumbs/v2/1/2/foo/*
- image-services for thumbnails, IIIF Image Api v2/thumbs/v3/1/2/foo/*
- image-services for thumbnails, IIIF Image Api v3"iiif-av"
/iiif-av/1/2/foo/*
- stream AV assetsRules based on assetFamily (these will change to d-c in future)
/iiif-manifest/1/2/foo
/iiif-manifest/v2/1/2/foo
/iiif-manifest/v3/1/2/foo
A single invalidation includes 7 wildcards so we can only have 2 in-flight with CloudFront at any given time.
Update API to cleanly handle items deleted from DLCS.
A deletion action can clean up some resources that the API knows about (ie DB rows) and then raise a notification that can be listened to.
The listener for this service can either be a single deletion service, or respective service can each listen for notifications. We'll need to remove: