[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: posix message queues and multiple receivers
>> Why do you think it is meant to connect only two processes? It is
>> [...] just a FIFO queue of messages. [...]
> So what is the purpose of those interface? When I inject a message,
> I don't know which of the possibly many receivers is getting it?
Right. To rephrase that, "when I make a request, I don't know which
worker process will service it". But you also don't _care_ which.
Consider nfsd: it typically has multiple worker processes (four by
default); when a client sends a request, it doesn't know which worker
will handle it, nor does it care. (It typically uses sockets, but they
are the same in this respect: each message goes to exactly one reader,
no matter how mnay readers are reading.)
> I somewhat fail to understand the utility of more than one receivers.
When serving a request takes nontrivial time, and multiple requests can
usefully be in progress at once, it is useful - it typically improves
performance - to have multiple workers serving requests. NFS, as
mentioned above, is a fairly good example (in these respects).
/~\ The ASCII Mouse
\ / Ribbon Campaign
X Against HTML mouse%rodents-montreal.org@localhost
/ \ Email! 7D C8 61 52 5D E7 2D 39 4E F1 31 3E E8 B3 27 4B
Main Index |
Thread Index |