Boost logo

Boost :

From: Peter Dimov (pdimov_at_[hidden])
Date: 2007-04-29 17:26:27


Jeff Garland wrote:
> Peter Dimov wrote:
>> Jeff Garland wrote:
>>
>>> But you've already fallen into the trap. Just because the computers
>>> are next to each other doesn't mean you are going to get an
>>> immediate answer. For example, one of the computers you are
>>> communicating with might be really busy doing something (swapping
>>> perhaps if it's overloaded).
>>
>> The same can (and does) happen with local calls if the computer is
>> really busy or starts paging.
>
> Right, but the programmer has no way of reasonably detecting and
> handling that condition from within his program. If it's on a remote
> machine he can and should because it's a frequent issue with
> networked programs.

Right, that was kind of my point. It's not a black and white issue, but
rather a question of frequency or probability. If you can tolerate the slim
chances of blocking, you can go with synchronous calls. The fact that it's a
different machine doesn't increase the chances that much; interprocess calls
to the same machine have a similar chance of blocking, except that you now
need half the load, all else being equal. Async is better but requires more
coding investment that may not be worth it, pragmatically speaking.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk