Workflow#
For every notification sent by a client Repository, the COAR Notify server:
authenticates the call
checks some simple properties: is the payload structurally valid, is it a
typeof notification we’re able to handle?stores the notification object in a database
sends a 201 HTTP response to the client
process the notification depending on its
typestores raw extrinsic metadata to the storage
a dedicated indexer converts the notification to the CodeMeta format
this metadata is now stored and associated to a proper SWHID / origin URL
sends a COAR Notification indicating the result of the ingestion.
Graphically:
sequenceDiagram
participant Repository
participant inbox as SWH COAR Notify Server
participant handler as Notification handler
participant rawstorage as Raw Metadata Storage
participant storage as Metadata Storage
Repository->>inbox: Send Announce RelationshipAction Notification
inbox->>inbox: Authenticate sender with token
opt Invalid auth
inbox->>Repository: HTTP 401 response
end
inbox->>inbox: Validate Notification
opt Invalid payload
inbox->>Repository: HTTP 400 response
end
inbox->>Database: Store notification
inbox->>handler: process the notification
opt Unprocessable
inbox->>Repository: Unprocessable COAR Notification
end
opt Reject
inbox->>Repository: Reject COAR Notification
end
inbox->>Repository: HTTP 201 response
handler->>rawstorage: Store metadata
indexer-->rawstorage: fetch and process raw metadata
indexer->>storage: store CodeMeta metadata
handler->>inbox: send the processing result
inbox->>Database: Prepare & store Accept Notification
inbox->>Repository: Accept COAR Notification