pkp / ots

PKP XML Parsing Service
GNU General Public License v3.0
32 stars 19 forks source link

Migrate to newer CrossRef API for performance reasons #145

Open axfelix opened 6 years ago

axfelix commented 6 years ago

CrossRef has a new (actually not that new, the one we're using is just old) API that is supposed to be more performant for doing reference lookups:

https://github.com/CrossRef/rest-api-doc

I've verified that we can get the same "score threshold" behaviour from this new call:

https://api.crossref.org/works?query=%22E.%20Niedermeyer,%20F.%20H.%20Lopes%20da%20Silva.%201993.%20Electroencephalography:%20Basic%20principles,%20clinical%20applications%20and%20related%20fields,%203rd%20edition,%20Lippincott,%20Williams%20%20Wilkins,%20Philadelphia.%22

as from the old one:

https://search.crossref.org/dois?q=%22E.%20Niedermeyer,%20F.%20H.%20Lopes%20da%20Silva.%201993.%20Electroencephalography:%20Basic%20principles,%20clinical%20applications%20and%20related%20fields,%203rd%20edition,%20Lippincott,%20Williams%20&%20Wilkins,%20Philadelphia.%22

We also get the full metadata (albeit in an arbitrary JSON format that we'd have to parse) in the same call with the new API, so we don't need to make a second call to retrieve BibTeX like we're currently doing, which should definitely speed things up, but our stack is actually fairly BibTeX-centric right now, and I don't see any way to return BibTeX from this new API, which would mean a fair amount of extra development to harmonize the output from our ParsCit fallback method.

Therefore I'm not in a hurry to do this unless they kill the old API, unless performance is driving all of our users nuts. But worth being aware of.