[OPEN-ILS-DEV] Chunking of OSRF messages from C services

Scott McKellar mck9 at swbell.net
Tue Aug 3 23:43:51 EDT 2010


I just committed a change to the way the C services package their response messages.

In the past, when a service returned more than one result message to a client, it would package each result in a separate XMPP message.

With this change, the service will package multiple result messages into each XMPP message, up to a maximum length of about 10K.  This change should be transparent to all clients, because the client code already knows how to understand multiple OSRF messages per XMPP message.

The result is to reduce networking overhead and speed up the flow of results back to the client.  In my benchmarks, the total elapsed time of a method call (with 45 result messages returned to the client) was cut roughly in half.  Actual results will of course vary according to conditions, but there should be no case in which the new code is materially slower.

Mike Rylander has already committed a similar change to the corresponding perl code.  His version provides ways to tune the buffering behavior on a method-by-method basis.  Such tuning is not yet available for the C services -- and, given the nature of the current C services, will probably be less useful.

In the next few days I expect to revisit this code in order to clean up some cruft.  However those changes will be purely internal, and will not affect performance or otherwise be visible to the clients.  At some point I will probably add some capability for tuning, similar to that of the perl code, but again that will not be visible to the clients.

Scott McKellar



More information about the Open-ils-dev mailing list