Closed leonardr closed 6 years ago
Talking with Amy uncovered a number of significant complications in this approach:
/loans
feed, and properly rendered in the client interface among other successful and unsuccessful loans and holds.For these reasons we're putting this work on hold. There are too many edge cases and weird behaviors.
Closing this issue -- it was a good idea but it didn't go anywhere.
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.