NCEAS / metadig-webapp

Web service for interacting with the MDQ Engine API
1 stars 2 forks source link

Add a service to generate/upload a quality report #2

Closed gothub closed 6 years ago

gothub commented 6 years ago

The current service accessible from the /suites/id/run runs a suite on the provided metadata/sysmeta documents (provided in the HTTP request body) and synchronously returns a quality document.

For creating a large number of quality documents, it will be necessary to provide a service that asynchronously generates reports and sends them to a specified return endpoint when they are completed (in this case the DataONE MNStorage.create() endpoint of the MN, for uploading and indexing by the MN).

A new services needs to be added to this webapp, possibly /suites/id/generate or something similar. Calling this service would send a generate request to the 'metadig controller' described here. The controller, which is included in the webapp, dispatches a request to a worker task, which generates the report and returns it to the controller. The controller then uses the return endpoint (specified in the initial request) and sends the report there. With this scheme, the initial requestor doesn't have to keep track of request that it has made and listen for returns.

gothub commented 6 years ago

The new endpoint is /queue, added in commit fa9e72704e62d4dd6bb0235a8a4995381a1d7005