[OPEN-ILS-DEV] Fastest way to load titles after catalog search (via OSRF)?

Ken Cox kenstir at gmail.com
Sat Sep 17 14:44:02 EDT 2016


Is there a way to load the basic metadata (title and author) about multiple
catalog items in one round-trip?

Currently after a search the Android app is making the following OSRF calls
for each item found:

   - service=open-ils.search & method=
   *open-ils.search.biblio.record.mods_slim.retrieve* & param=*item_id*
   - service=open-ils.pcrud & method=*open-ils.pcrud.retrieve.mra* &
param=%22auth_token%22
   & param=*item_id*

Is there a method for bulk loading data for multiple items?

*Background and more details*

I am trying to improve the search experience in the Android app.
Originally, the app loaded the metadata for all items synchronously before
allowing the user to interact with the search results.  This was lousy,
because it takes on the order of 15 seconds to search CW/MARS for "harry
potter" and then make 20 calls to load the title and search format (e.g.
"ebook") for each of the first 10 results.

So I changed the behavior so that all metadata is loaded asynchronously.
Now the results list appears as soon as the search is complete, on the
order of 5 seconds.  However, the titles and search then start appearing as
the web requests finish.  This can be slightly odd on a slow network.

The reason for the *open-ils.pcrud.retrieve.mra* call is so that I can
determine whether to enable the "Online Access" action, if the item is an
online resource, or the "Place Hold" action, if the item is a physical
resource.  This is not as easy as looking at the online_loc field in the
mra response, because some items have that field set even for physical
resources (e.g. https://bark.cwmars.org/eg/opac/record/3306629).

Thanks,
Ken
--
get the app at
https://play.google.com/store/apps/details?id=net.kenstir.apps.hemlock
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://libmail.georgialibraries.org/pipermail/open-ils-dev/attachments/20160917/67b1876e/attachment.html>


More information about the Open-ils-dev mailing list