This repository has been archived by the owner on Mar 14, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 7
TACO Internal Processing Steps
Christina Harlow edited this page Apr 2, 2018
·
20 revisions
Nota bene: The higher level expected processing that guides this analysis is that we are Object-focused (i.e. a client would provide low-level calls to TACO API via processing the Object first, then the File or Collection).
THIS IS ACTIVELY BEING REDESIGNED AND SHOULD NOT BE CONSIDERED VALID
Taken from the original work in the Prototype Processing Framework.
- Clarify what processing steps happen when + where within TACO Code
- What other code (using the TACO codebase packages framing) is recommended for each step.
- What other data specs are required for each step.
- What data serialization is required for each step: Recommendation is to use
map[string]interface{}
. - Can we separate out Swagger (+ generated code), MAPs, Example updates to make PRs / shifts smaller.
—————————————————
-
Input:
operations.DepositResourceParams
(struct) >Params
-
Request handling: save
Params
data to variables:- Save
Params.Payload
(map[string]interface{}
) toResource
variable - Save
params.HTTPRequest.Header.["On-Behalf-Of"]
(string) toAgent
variable - Save
resource["@type"]
value (URI string) toResourcetype
(string, controlled value) variable - If any of the above are empty or an unrecognized value (for
Resourcetype
), return data error to Client.
- Save
-
Permissions check:
- Pass
Agent
,Resourcetype
,Deposit
to Permissions Service via HTTP call- If response from Permissions Service is
True
, proceed - If response from Permissions Service is
False
, return a permissions error response to User (“You are not allowed etc.”)
- If response from Permissions Service is
- Pass
-
Validation Checks: Based on
Resourcetype
value, map theResource
to the appropriate deposit validation call- Input:
Resource
(map[string]interface{}
) &Resourcetype
(string) - Encode / Marshal
Resource
(map[string]interface{}
) to a JSON String - Run JSON Schema Validation on the Resource JSON string against its
maps/DepositType.json
(knows which to validate against due toResourcetype
)- If invalid, return data error to API caller (e.g. “Missing %v”, field)
- If valid, proceed (below)
- Run any other type-dependent validation checks
- If
Resourcetype
isCollection
orObject
:- Check
Resource
(map[string]interface{}
) forIdentification.SourceId
(string: map
>string: string
, will require casting)- If
Resource.Identification.SourceId
exists, retrieve & save tosourceId
(string):- Call to Dynamo’s SourceId Secondary Index to check that
sourceId
value does not already exist- If it already exists, return error to API caller (i.e. “Item is not unique; source ID already exists.”)
- If it does not, proceed
- Call to Dynamo’s SourceId Secondary Index to check that
- If
Identification.SourceId
is not in Resource, proceed
- If
- Check
- If
Resourcetype
==Collection
:- Check if
Resource
for aCollection
hasStructural.HasMember
(array of string, druid + version)- If so, check that all members are either type
Collection
or typeObject
- If not, proceed
- If so, check that all members are either type
- Check if
- If
Resourcetype
==Object
:- Check if
Resource
for aObject
hasStructural.HasMember
(array of string, druid + version)- If so, check that all members have
@type
==Object URI
- If not, proceed
- If so, check that all members have
- Check if
Resource
for aObject
hasStructural.Contains
(array of string, UUID + version)- If so, check that all contained resources have
@type
==Fileset URI
- If not, proceed
- If so, check that all contained resources have
- Check if
- If
Resourcetype
==Fileset
:- Check if
Resource
for aFileset
hasStructural.ContainedBy
(array of string, druid + version)- If so, check that all parents (
ContainedBys
) ave@type
==Object URI
- If not, return structural data error (e.g. "You are creating a Fileset without a representative Object")
- If so, check that all parents (
- Check if
- If
Resourcetype
==File
:- Check if
Resource
for a File hasStructural.ContainedBy
(array of string, UUID + version)- If so, check that all parents (
ContainedBys
) have@type
==Fileset URI
- If not, return structural data error (e.g. "You are creating a File without a container Fileset")
- If so, check that all parents (
- Check if
- If
- Input:
-
Identifiers Minting: Request a new ID(s) for
Resource
based onResourcetype
- If
ResourceType
==Collection
orObject
, request a DRUID (SDR Identifier)- If DRUID minted, assert the DRUID to
Resource
atIdentification.Identifier
(map, string) (requires casting) - If DRUID cannot be minted, error out / return a process cannot be completed at this time error to client.
- If DRUID minted, assert the DRUID to
- If
ResourceType
==Fileset
orFile
, generate a UUID (SDR Identifier)- If UUID generated, assert the UUID to
Resource
atIdentification.Identifier
(map, string) (requires casting) - If UUID cannot be generated, error out / return a process cannot be completed at this time error to client.
- If UUID generated, assert the UUID to
- For all
resourceType
values, generate a secondary UUID (TACO Internal Identifier)- If UUID can be minted, asserted the UUID to
Resource
atId
(string) - If UUID cannot be generated, error out / return a process cannot be completed at this time error to client.
- If UUID can be minted, asserted the UUID to
- If
-
System Data Munging:
- Add Version information
- On
Resource
, assertversion
(top level field) ==1
(integer). - On
Resource
, assertcurrentVersion
(top level) ==True
(boolean).
- On
- Add System Metadata
- On
Resource
, assertdepositor
(top level field,Agent
object) usingAgent
value (open policy question here).
- On
- Add Version information
-
Persist Resource Metadata:
- Write
Resource
(map[string]interface{}
) to DynamoDB.
- Write
-
Notify Processing Stream:
- Send Message to Kinesis Router Stream with TACO Internal Identifier (
Resource.Id
[string, UUID]),Resourcetype
, & Action ==Deposit
(this may and probably will continue to evolve).
- Send Message to Kinesis Router Stream with TACO Internal Identifier (
- Return to client the SDR Identifier (
Resource.identification.identifier
[string, DRUID]).
—————————————————
-
Input:
operations.DepositFileParams
(struct) >Params
-
Request handling: save
Params
data to variables:- Save
Params.Upload
(runtime.File
) toBinary
variable - Save
Params.Filename
(runtime.Filename
) toFilename
variable - Save
Params.FilesetID
(string) toFilesetID
variable - Save
Params.MIMEType
value (string, MIME Type) toFileMIMEType
variable - Save (always)
File
value (string) toResourceType
variable - Save
params.HTTPRequest.Header.["On-Behalf-Of"]
(string) toAgent
variable - If any of the above are empty or an unrecognized value, return data error to Client.
- Save
-
Permissions check:
- Pass
Agent
,Resourcetype
,Deposit
,Context
(FilesetID
) to Permissions Service via HTTP call- If response from Permissions Service is
True
, proceed - If response from Permissions Service is
False
, return a permissions error response to User (“You are not allowed etc.”)
- If response from Permissions Service is
- Pass
-
Build Minimal File (metadata) Resource:
- Create a
Resource
(map[string]interface{}
) instance - On
Resource
:- Assert
Filename
onResource
aslabel
- Assert
MIMEType
onResource
ashasMimeType
- Assert
Resourcetype
onResource
as@type
(need to generate File type URI) - Assert
FilesetID
onResource
asstructural.isContainedBy
(map, string) - Assert File processing defaults:
-
Access.Access
set toDark
-
Access.Download
set toDark
-
Admin.Preserve
set toFalse
-
- Assert
- Create a
-
Identifiers Minting: Request a new ID(s) for
Resource
based onResourcetype
- Generate a UUID (SDR Identifier) & Assert UUID on
Resource
atIdentification.Identifier
(map, string)- If UUID cannot be generated, error out / return a process cannot be completed at this time error to client.
- Generate a secondary UUID (TACO Internal Identifier) & Assert the UUID to
Resource
atId
(string)- If UUID cannot be generated, error out / return a process cannot be completed at this time error to client.
- Generate a UUID (SDR Identifier) & Assert UUID on
-
Persist File Binary:
- Save
Binary
to the persistence file store - Assert the returned filestore address on
Resource
asfile-location
- Save
-
System Data Munging:
- Add Version information
- On
Resource
, assertversion
(top level field) ==1
(integer). - On
Resource
, assertcurrentVersion
(top level) ==True
(boolean).
- On
- Add System Metadata
- On
Resource
, assertdepositor
(top level field,Agent
object) usingAgent
value (open policy question here).
- On
- Add Version information
-
Persist File Resource Metadata:
- Write
Resource
(map[string]interface{}
) to DynamoDB.
- Write
-
Notify Processing Stream:
- Send Message to Kinesis Router Stream with TACO Internal Identifier (
Resource.Id
[string, UUID]),File
, & Action ==Deposit
(this may and probably will continue to evolve).
- Send Message to Kinesis Router Stream with TACO Internal Identifier (
- Return to client the SDR Identifier (
Resource.identification.identifier
[string, UUID]).
—————————————————
-
Input:
operations.RetrieveResourceParams
(struct) >Params
-
Request handling: save
Params
data to variables:-
params.ID
to variablerequestedID
(string): provided resource identifier to retrieve. -
params.Version
to variablerequestedVersion
(integer | null): provided version of resource to retrieve. -
params.HTTPRequest.Header.["On-Behalf-Of"]
(string) toAgent
variable.
-
-
Query Resource (ID, Version) from Metadata Persistence Layer:
- If
Version
exists / was provided:- Query DynamoDB
resources
table forid
==ID
,version
==Version
- Save response
map[string]*dynamoAttribute
toGenericResource
map (i.e.map[string]interface{}
) - if no records are returned from Dynamo:
- return a Resource Not Found error to client
- if a record is found from Dynamo:
- Save response
map[string]*dynamoAttribute
toGenericResource
map (i.e.map[string]interface{}
) - Return
GenericResource
to Resource
- Save response
- Query DynamoDB
- If
Version
is null / was not provided:- Query DynamoDB
resources
table forid
==ID
&¤tVersion
==true
- if no records are returned from Dynamo:
- return a Resource Not Found error to client
- if a record is found from Dynamo:
- Save response
map[string]*dynamoAttribute
toGenericResource
map (i.e.map[string]interface{}
) - Return
GenericResource
toResource
- Save response
- Query DynamoDB
- If
-
Permissions check:
- Pass
Agent
,Resourcetype
,Retrieve
,requestedID
to Permissions Service via HTTP call- If response from Permissions Service is
True
, proceed - If response from Permissions Service is
False
, return a permissions error response to User (“You are not allowed etc.”)
- If response from Permissions Service is
- Pass
- Save
Resource
(map[string]interface{}
) as instance ofmodels.GenericResource
- Return to client
Resource
as payload throughoperations.NewRetrieveResourceOK().WithPayload(response)
—————————————————
-
Input:
operations.DepositResourceParams
(struct) >Params
-
Request handling: save
Params
data to variables:-
params.ID
to variablerequestedID
(string): provided resource identifier to retrieve. -
params.Payload
(map[string]interface{}
) toNewResource
variable -
params.HTTPRequest.Header.["On-Behalf-Of"]
(string) toAgent
variable -
resource["@type"]
value (URI string) toResourcetype
(string, controlled value) variable - If any of the above are empty or an unrecognized value (for
Resourcetype
), return data error to Client.
-
-
Query Resource (ID, Version) from Metadata Persistence Layer:
- Query DynamoDB
resources
table forid
==ID
&¤tVersion
==true
- If no records are returned from Dynamo:
- Return a
Resource Not Found
error to client
- Return a
- if a record is found from Dynamo:
- Save response
map[string]*dynamoAttribute
toGenericResource
map (i.e.map[string]interface{}
) - Return
GenericResource
toExistingResource
- Save response
- Query DynamoDB
-
Permissions check:
- Pass
Agent
,Resourcetype
,Update
,requestedID
to Permissions Service via HTTP call- If response from Permissions Service is
True
, proceed - If response from Permissions Service is
False
, return a permissions error response to User (“You are not allowed etc.”)
- If response from Permissions Service is
- Pass
-
Validation Checks: Based on
Resourcetype
value, map theNewResource
to the appropriate validation call- Input:
NewResource
(map[string]interface{}
) &Resourcetype
(string) - Encode / Marshal
NewResource
(map[string]interface{}
) to a JSON String - Run JSON Schema Validation on the
NewResource
JSON string against itsmaps/[ResourceType].json
- If invalid, return data error to API caller (e.g. “Missing %v”, field)
- If valid, proceed (below)
- Run any other type-dependent validation checks
- If
Resourcetype
isCollection
orObject
:- Check
NewResource
(map[string]interface{}
) for a new or changedIdentification.SourceId
(string: map
>string: string
, will require casting)- If
NewResource.Identification.SourceId
exists and is changed, retrieve & save tosourceId
(string):- Call to Dynamo’s SourceId Secondary Index to check that
sourceId
value does not already exist (except forOldRecord
)- If it already exists, return error to API caller (i.e. “Item is not unique; source ID already exists.”)
- If it does not, proceed
- Call to Dynamo’s SourceId Secondary Index to check that
- If
Identification.SourceId
is not inNewResource
or has not changed fromExistingResource
, proceed
- If
- Check
- If
Resourcetype
==Collection
:- Check if
NewResource
for aCollection
has new or changedStructural.HasMember
(array of string, druid + version)- If so, check that all members are either type
Collection
or typeObject
- If not (or it hasn't changed from
ExistingResource
), proceed
- If so, check that all members are either type
- Check if
- If
Resourcetype
==Object
:- Check if
Resource
for aObject
has new or changedStructural.HasMember
(array of string, druid + version)- If so, check that all members have
@type
==Object URI
- If not (or it hasn't changed from
ExistingResource
), proceed
- If so, check that all members have
- Check if
Resource
for aObject
has new or changedStructural.Contains
(array of string, UUID + version)- If so, check that all contained resources have
@type
==Fileset URI
- If not (or it hasn't changed from
ExistingResource
), proceed
- If so, check that all contained resources have
- Check if
- If
Resourcetype
==Fileset
:- Check if
Resource
for aFileset
has new or changedStructural.ContainedBy
(array of string, druid + version)- If so, check that all parents (
ContainedBys
) ave@type
==Object URI
- If not, return structural data error (e.g. "You are creating a Fileset without a representative Object")
- If it hasn't changed from
ExistingResource
, proceed
- If so, check that all parents (
- Check if
- If
Resourcetype
==File
:- Check if
Resource
for a File has new or changedStructural.ContainedBy
(array of string, UUID + version)- If so, check that all parents (
ContainedBys
) have@type
==Fileset URI
- If not, return structural data error (e.g. "You are creating a File without a container Fileset")
- If it hasn't changed from
ExistingResource
, proceed
- If so, check that all parents (
- Check if
- If
- Input:
-
System Data Munging:
- Handle Version changes
- If
NewResource.version
(integer) is same asExistingResource.version
(integer):- Proceed with overlaying
NewResource
onExistingResource
-
Add System Metadata:
- On merged
NewResource
, assertAdministrative.remediatedBy
(Agent
object) usingAgent
value.
- On merged
-
Persist Resource Metadata:
- Write merged
NewResource
(map[string]interface{}
) to DynamoDB.
- Write merged
-
Notify Processing Stream:
- Send Message to Kinesis Router Stream with TACO Internal Identifier (
NewResource.Id
[string, UUID]),Resourcetype
, & Action ==Update
(this may and probably will continue to evolve).
- Send Message to Kinesis Router Stream with TACO Internal Identifier (
-
Add System Metadata:
- Proceed with overlaying
- If
NewResource.version
(integer) differs fromExistingResource.version
(integer):- Proceed with overlaying
NewResource
onExistingResource
-
Create new DynamoDB record with merged
NewResource
:-
Identifier Minting: Request a new TACO Internal ID for merged
NewResource
- Generate a secondary UUID (TACO Internal Identifier) & overwrite the UUID to
Resource
atId
(string)- If UUID cannot be generated, error out / return a process cannot be completed at this time error to client.
- Generate a secondary UUID (TACO Internal Identifier) & overwrite the UUID to
-
Update Version Metadata on
NewResource
:- On merged
NewResource
, assertversion
(top level field) ==NewResource.version
+ 1 (integer). - On merged
NewResource
, assertcurrentVersion
(top level) ==True
(boolean). - On merged
NewResource
, assertprecedingVersion
(top level) ==OldResource.id
(string, UUID).
- On merged
-
Add System Metadata:
- On merged
NewResource
, assertAdministrative.remediatedBy
(Agent
object) usingAgent
value.
- On merged
-
Persist Resource Metadata:
- Write merged
NewResource
(map[string]interface{}
) to DynamoDB.
- Write merged
-
Notify Processing Stream:
- Send Message to Kinesis Router Stream with TACO Internal Identifier (
NewResource.Id
[string, UUID]),Resourcetype
, & Action ==NewVersion
(this may and probably will continue to evolve).
- Send Message to Kinesis Router Stream with TACO Internal Identifier (
-
Identifier Minting: Request a new TACO Internal ID for merged
-
Update existing DynamoDB record for
ExistingResource
:-
Update Version Metadata on
NewResource
:- On
ExistingResource
, assertcurrentVersion
(top level) ==False
(boolean). - On
ExistingResource
, assertfollowingVersion
(top level) == mergedNewResource.id
(string, UUID).
- On
-
Update System Metadata:
- On
ExistingResource
, assertAdministrative.remediatedBy
(Agent
object) usingAgent
value. - On
ExistingResource
, assertAccess.access
,Access.download
==Dark
(need to confirm). - On
ExistingResource
, assert Permissions to admin only editing (need to confirm).
- On
-
Persist Resource Metadata:
- Write updated
ExistingResource
(map[string]interface{}
) to DynamoDB.
- Write updated
-
Notify Processing Stream:
- Send Message to Kinesis Router Stream with TACO Internal Identifier (
ExistingResource.Id
[string, UUID]),Resourcetype
, & Action ==OldVersion
(this may and probably will continue to evolve).
- Send Message to Kinesis Router Stream with TACO Internal Identifier (
-
Update Version Metadata on
- Proceed with overlaying
- Return to client the SDR Identifier (
NewResource.identification.identifier
[string, DRUID], should not have changed).
- If
- Handle Version changes
—————————————————
-
Input:
operations.DepositFileParams
(struct) >Params
-
Request handling: save
Params
data to variables:- Save
Params.ID
(string) toResourceID
variable - Save
Params.Upload
(runtime.File
) toBinary
variable - Save
Params.Filename
(runtime.Filename
) toFilename
variable - Save
Params.MIMEType
value (string, MIME Type) toFileMIMEType
variable - Save (always)
File
value (string) toResourceType
variable - Save
params.HTTPRequest.Header.["On-Behalf-Of"]
(string) toAgent
variable - If any of the above are empty or an unrecognized value, return data error to Client.
- Save
-
Query File [metadata] Resource (ID, Version) from Metadata Persistence Layer:
- Query DynamoDB
resources
table forid
==ID
&¤tVersion
==true
- If no records are returned from Dynamo:
- Return a
Resource Not Found
error to client
- Return a
- if a record is found from Dynamo:
- Save response
map[string]*dynamoAttribute
toGenericResource
map (i.e.map[string]interface{}
) - Return
GenericResource
toExistingResource
- Save response
- Save DynamoDB response as
Resource
- Overlay
Resource
withParams.Filename
,Params.MIMEType
- Retrieve
Resource.structural.isContainedBy
and save toFilesetID
.
- Query DynamoDB
-
Permissions check:
- Pass
Agent
,Resourcetype
,Update
,Context
(FilesetID
) to Permissions Service via HTTP call- If response from Permissions Service is
True
, proceed - If response from Permissions Service is
False
, return a permissions error response to User (“You are not allowed etc.”)
- If response from Permissions Service is
- Pass
-
Identifiers Minting: Request a new ID(s) for
Resource
based onResourcetype
- Generate a UUID (SDR Identifier) & Assert UUID on
Resource
atIdentification.Identifier
(map, string)- If UUID cannot be generated, error out / return a process cannot be completed at this time error to client.
- Generate a secondary UUID (TACO Internal Identifier) & Assert the UUID to
Resource
atId
(string)- If UUID cannot be generated, error out / return a process cannot be completed at this time error to client.
- Generate a UUID (SDR Identifier) & Assert UUID on
-
Persist New File Binary:
- Save
Binary
to the persistence file store - Assert the returned filestore address on
Resource
asfile-location
- Save
-
Validation Checks: Based on
Resourcetype
value, map theNewResource
to the appropriate validation call- Run JSON Schema Validation on the
Resource
as encoded JSON string against itsmaps/File.json
- If invalid, return data error to API caller (e.g. “Missing %v”, field)
- If valid, proceed (below)
- Run any other type-dependent validation checks
- Check if
Resource
for a File has new or changedStructural.ContainedBy
(array of string, UUID + version)- If so, check that all parents (
ContainedBys
) have@type
==Fileset URI
- If not, return structural data error (e.g. "You are creating a File without a container Fileset")
- If it hasn't changed from
ExistingResource
, proceed
- If so, check that all parents (
- Check if
- Run JSON Schema Validation on the
-
System Data Munging:
- Handle Version changes (new binary File always triggers a version uptick)
-
Create new DynamoDB record with merged
Resource
:-
Identifier Minting: Request a new TACO Internal ID for merged
Resource
- Generate a secondary UUID (TACO Internal Identifier) & overwrite the UUID to
Resource
atId
(string)- If UUID cannot be generated, error out / return a process cannot be completed at this time error to client.
- Generate a secondary UUID (TACO Internal Identifier) & overwrite the UUID to
-
Update Version Metadata on
Resource
:- On merged
Resource
, assertversion
(top level field) ==NewResource.version
+ 1 (integer). - On merged
Resource
, assertcurrentVersion
(top level) ==True
(boolean). - On merged
Resource
, assertprecedingVersion
(top level) ==OldResource.id
(string, UUID).
- On merged
-
Add System Metadata:
- On merged
Resource
, assertAdministrative.remediatedBy
(Agent
object) usingAgent
value.
- On merged
-
Persist Resource Metadata:
- Write merged
Resource
(map[string]interface{}
) to DynamoDB.
- Write merged
-
Notify Processing Stream:
- Send Message to Kinesis Router Stream with TACO Internal Identifier (
Resource.Id
[string, UUID]),Resourcetype
, & Action ==NewVersion
(this may and probably will continue to evolve).
- Send Message to Kinesis Router Stream with TACO Internal Identifier (
-
Identifier Minting: Request a new TACO Internal ID for merged
-
Update exsting DynamoDB record for
ExistingResource
:-
Update Version Metadata on
NewResource
:- On
ExistingResource
, assertcurrentVersion
(top level) ==False
(boolean). - On
ExistingResource
, assertfollowingVersion
(top level) == mergedNewResource.id
(string, UUID).
- On
-
Update System Metadata:
- On
ExistingResource
, assertAdministrative.remediatedBy
(Agent
object) usingAgent
value. - On
ExistingResource
, assertAccess.access
,Access.download
==Dark
(need to confirm). - On
ExistingResource
, assert Permissions to admin only editing (need to confirm).
- On
-
Persist Resource Metadata:
- Write updated
ExistingResource
(map[string]interface{}
) to DynamoDB.
- Write updated
-
Notify Processing Stream:
- Send Message to Kinesis Router Stream with TACO Internal Identifier (
ExistingResource.Id
[string, UUID]),Resourcetype
, & Action ==OldVersion
(this may and probably will continue to evolve).
- Send Message to Kinesis Router Stream with TACO Internal Identifier (
-
Update Version Metadata on
- Return to client the SDR Identifier (
NewResource.identification.identifier
[string, DRUID], should not have changed).
-
Create new DynamoDB record with merged
- Handle Version changes (new binary File always triggers a version uptick)
—————————————————
-
Input:
operations.RetrieveResourceParams
(struct) >Params
-
Request handling: save
Params
data to variables:-
params.ID
to variablerequestedID
(string): provided resource identifier to retrieve. -
params.Version
to variablerequestedVersion
(integer | null): provided version of resource to retrieve. -
params.HTTPRequest.Header.["On-Behalf-Of"]
(string) toAgent
variable.
-
-
Query Resource (ID, Version) from Metadata Persistence Layer:
- If
Version
exists / was provided:- Query DynamoDB
resources
table forid
==ID
,version
==Version
- Save response
map[string]*dynamoAttribute
toGenericResource
map (i.e.map[string]interface{}
) - if no records are returned from Dynamo:
- return a Resource Not Found error to client
- if a record is found from Dynamo:
- Save response
map[string]*dynamoAttribute
toGenericResource
map (i.e.map[string]interface{}
) - Return
GenericResource
to Resource
- Save response
- Query DynamoDB
- If
Version
is null / was not provided:- Query DynamoDB
resources
table forid
==ID
&¤tVersion
==true
- if no records are returned from Dynamo:
- return a Resource Not Found error to client
- if a record is found from Dynamo:
- Save response
map[string]*dynamoAttribute
toGenericResource
map (i.e.map[string]interface{}
) - Return
GenericResource
toResource
- Save response
- Query DynamoDB
- If
-
Permissions check:
- Pass
Agent
,Resourcetype
,Delete
,requestedID
to Permissions Service via HTTP call- If response from Permissions Service is
True
, proceed - If response from Permissions Service is
False
, return a permissions error response to User (“You are not allowed etc.”)
- If response from Permissions Service is
- Pass
-
Delete Resource:
- If
ResourceType
==Collection
orObject
orFileset
:- Delete that DynamoDB record that matches
id
==requestedID
(string) andResource.version
==Version
(integer)
- Delete that DynamoDB record that matches
- If
ResourceType
==File
:- Delete the S3 file at
Resource.location
(string, IRI). - Delete that DynamoDB record that matches
id
==requestedID
(string) andResource.version
==Version
(integer)
- Delete the S3 file at
- If
-
Notify Processing Stream:
- Send Message to Kinesis Router Stream with TACO Internal Identifier (
Resource.Id
[string, UUID]),Resourcetype
, & Action ==Delete
(this may and probably will continue to evolve).
- Send Message to Kinesis Router Stream with TACO Internal Identifier (
- Return to client
Resource.Id
as payload throughoperations.NewRetrieveResourceOK().WithPayload(response)
- TACO API & Service Design
- Development Guide
- TACO Internal Steps
- Identifier schema
- Data Modeling & MAPs
- Data Expectations of TACO
- Auth & Permissions
- Benchmarking Goals & Scenarios
- Workflows & Robots Replacement Analysis