NYPL-Simplified / server_core

Shared data model and utilities for Library Simplified server applications
7 stars 11 forks source link

Asynchronous loan fulfillment #243

Closed leonardr closed 6 years ago

leonardr commented 8 years ago

Currently all loan-related operations are processed 'live'. This means that patrons are 'kept on the phone' while we go out to the API provider and process the following operations:

Possibly others I'm forgetting.

If the API provider is slow or broken, this leads to very bad experiences for the patron. Furthermore, since reading a book involves two API calls ('borrow' and 'fulfill') that nearly always happen in immediate sequence, there's usually a little bit of wasted time in the process.

If loan fulfillment was done asynchronously, the wasted time should mostly go away. If fulfilling a loan is fast, there's a good chance we can have the ACSM file ready by the time the client makes that second request asking for it.

And if fulfilling a loan is slow, or broken, we can pass the current status to the patron immediately, without the risk of timeouts or long delays.

leonardr commented 8 years ago

Talking with Amy uncovered a number of significant complications in this approach:

For these reasons we're putting this work on hold. There are too many edge cases and weird behaviors.

leonardr commented 6 years ago

Closing this issue -- it was a good idea but it didn't go anywhere.