Closed darupp closed 4 years ago
@darupp So, should we make any upload being asynchronous? Or would we want to remain small uploads to be synchronous?
I don't know if there are any negative implications of a asynchronous upload. If there are none, I would recommend to make all uploads asynchronous.
Theoretically, overwritings by interacting / conflicting requests might occur. This would happen, if different users upload related data at the same time. For the time being, I assume this disadvantage to be negligible.
I assume this also. So we could use asynchronous upload in all cases.
Using async upload would implicate another behaviour of the response panel:
/crossReferenceTitle
respective `/crossReferencePackage' for panel, but get job id/integration/getJobInfo/<id>
finished=false
: Message and progress tracker interpreting the progress
value with message: "Titles are being uploaded to GOKb" (for Title JSON) resp. "Package is being uploaded to GOKb" (for Package JSON). finished=true
: Use job_result
in the same was as the response before.
Right now, the YGOR-GOKb upload doesn't work with large packages, because you get a "504 Gateway timeout". This can be prevented by using asynchronous processing.
The documentation is here at the end of the wiki page: https://github.com/openlibraryenvironment/gokb/wiki/Integration-APIs%3A-Telling-GOKb-about-new-or-corresponding-resources-and-local-identifiers
Testing files attached: https://app.zenhub.com/files/76962941/9fa5ea09-54ed-4ba3-b56a-09c4e2042db6/download