[Date Prev][Date Next] [Chronological] [Thread] [Top]

RE: C API: minor comments



At 11:28 AM 11/16/99 -0800, Anoop Anantha (Exchange) wrote:
>>If the client always uses non-zero messageIDs in requests,
>>how could it get a solicited extended response of message
>>with message id of zero?
>
>It can't. It may however, get *unsolicited* extended responses with
>messageId 0. Currently, most clients don't expect this kind of response.
>Hence, it is worthy to make a mention of it.
>
>>Yes.  This should teach applications not to implicitly
>>ignore unsolicited notifications.
>
>Consider a simple application written using only the synchronous APIs
>(typical case). How does the app know that the server is even sending
>unsolicited notifications?

It should realize that an unsolicited notification may occur while
waiting for the results.  A client which blocks forever waiting for
results of a specific result is likely to do just that, block forever.

>It won't. This may cause the client library to
>run out of memory due to queued up notifications. This is just one of the
>reasons, IMO, for the default behavior of tossing notifications unless the
>app sets an option to receive them.

It seems to me that sync routines are only generally useful
in multithreaded environments... as the existance of unsolicited
responses may require multiplexing even when operations are
serialized.


----
Kurt D. Zeilenga		<kurt@boolean.net>
Net Boolean Incorporated	<http://www.boolean.net/>