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

Ken Cox kenstir at gmail.com
Mon Sep 19 20:02:33 EDT 2016


Bill, awesome tips, thanks!  I look forward to benchmarking them.

In some places I am using the GatewayRequest class, but in many I am using
a new GatewayJsonObjectRequest class, which
extends com.android.volley.Request.  The volley library
<https://developer.android.com/training/volley/index.html> launches
multiple parallel requests.

Is there a version of Evergreen that supports websockets?  (I don't see any
happening on CW/MARS).  There is at least one active Android library for
websockets, it's part of https://github.com/koush/AndroidAsync.

Regards,
Ken

On Mon, Sep 19, 2016 at 11:04 AM, Bill Erickson <berickxx at gmail.com> wrote:

> Hi Ken,
>
> On Sat, Sep 17, 2016 at 2:44 PM, Ken Cox <kenstir at gmail.com> wrote:
>
>> 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*
>>
>> There is a batch version of this API:
>
> open-ils.search.biblio.record.mods_slim.batch.retrieve[.atomic] [id1,
> id2, id3, ...]
>
> Are you using the stock OSRF Java HTTP library -- the GatewayRequest
> class?  I ask because it does not support streaming API calls.  (I'm not
> seeing any stock Java libs that support streaming, no TranslatorRequest or
> WebsocketRequest classes).  This makes the batch API's somewhat less
> appealing, since you have to wait for the entire result set to return
> before you have any results to work with.  In some cases, though, it can
> still be an improvement.
>
> In the future, we need a Translator and/or Websocket client for the Java
> libs and we need to finish https://bugs.launchpad.
> net/evergreen/+bug/1251394 (metabib display fields), which support
> returning pre-compiled metadata via (presumably) the much faster PCRUD API.
>
>
>>    -
>>    - service=open-ils.pcrud & method=*open-ils.pcrud.retrieve.mra*
>>    & param=%22auth_token%22 & param=*item_id*
>>
>> For this one, you could probably get away with a single batch API call:
>
> open-ils.pcrud.search.mra.atomic {id : [id1, id2, id3...]}
>
> The result set for this call is relatively small and should be quick to
> build on the server, so a single call/response might be faster than a
> call/response per record.
>
> See also the "mraf" class, where you can further limit by "type", plus its
> result data is much easier to parse.
>
> -b
>
>
>


-- 
-Ken
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://libmail.georgialibraries.org/pipermail/open-ils-dev/attachments/20160919/8cf2b64a/attachment.html>


More information about the Open-ils-dev mailing list