Standard FindData Per Service
Jump to navigation
Jump to search
Overview
Standards for services that handle FindData requests
DynamoDB structure
FindDataMain
Cached result and status of requests
{
findDataId: "xxx", // hash of request params
fieldName: "xxx",
requestType: "xxx", // groups fieldNames, same as searchType from Search Result service
dataId: "xxx",
requestProperties: {},
dataValue: "xxx", // resulting data once ready
status: "xxx", // "processing"|"complete"|"error",
errorsFound: [],
expiryTime: "xx",
uniqueRequestId: "xx", used for idempotence when first process request called, in case that invocation fails and restarts, can be removed when set to complete
}
- partition key: findDataId
- sort key: (none)
FindDataAwaitingStep
FindDataSortedRequest
Temporary link/flow table for FindData requests that get passed to a sorted searchResult process, optionally some filtering applied.
{
searchTypeSortResultId: "xx",
findDataId: "xx",
aggregation "xx", // "max"|"min"|"average", required, pulls out one value from sortResult data to save into FindData
excludeEmpty: true,
timestamp: "xx", //when record created
}
- partition key: searchTypeSortResultId
- sort key: findDataId
- searchTypeSortResultId: {searchType}_{sortResultId}
- is temporary, after sortResult/copying is complete send OutFindDataComplete message and delete FindDataSortedRequest record
- flow starts searchResult with sortField, once complete triggers CompleteFindDataSortedRequest that copies the final data to FindDataMain and completes the FindData request