hbz / laser-ygor

A spare hand when needed ..
0 stars 1 forks source link

Use Async-Functionality of Crossreference API to prevent 504 Gateway Timeout #241

Closed darupp closed 4 years ago

darupp commented 4 years ago

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

philboeselager commented 4 years ago

@darupp So, should we make any upload being asynchronous? Or would we want to remain small uploads to be synchronous?

darupp commented 4 years ago

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.

philboeselager commented 4 years ago

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.

darupp commented 4 years ago

I assume this also. So we could use asynchronous upload in all cases.

darupp commented 4 years ago

Using async upload would implicate another behaviour of the response panel: